Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit aa137d4

Browse files
authored
Merge pull request #128 from arduino/per1234/nightly
Make nightly builds
2 parents 59eee5a + 0140ea5 commit aa137d4

File tree

6 files changed

+193
-6
lines changed

6 files changed

+193
-6
lines changed

‎.github/workflows/nightly.yml‎

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
name: Nightly build
2+
3+
on:
4+
schedule:
5+
# run every day at 1AM
6+
- cron: "0 1 * * *"
7+
8+
jobs:
9+
create-nightly-artifacts:
10+
# This workflow is only of value to the arduino/arduino-arduino-lint repository and
11+
# would always fail in forks
12+
if: github.repository == 'arduino/arduino-lint'
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
- name: Install Taskfile
20+
uses: arduino/actions/setup-taskfile@master
21+
with:
22+
repo-token: ${{ secrets.GITHUB_TOKEN }}
23+
version: 3.x
24+
25+
- name: Build
26+
env:
27+
CUSTOM_VERSION: nightly
28+
run: task dist:all
29+
30+
- name: Upload artifacts
31+
uses: actions/upload-artifact@v2
32+
with:
33+
name: dist
34+
path: dist
35+
36+
notarize-macos:
37+
runs-on: macos-latest
38+
needs: create-nightly-artifacts
39+
40+
steps:
41+
- name: Checkout
42+
uses: actions/checkout@v2
43+
44+
- name: Download artifacts
45+
uses: actions/download-artifact@v2
46+
with:
47+
name: dist
48+
# to ensure compatibility with v1
49+
path: dist
50+
51+
- name: Import Code-Signing Certificates
52+
env:
53+
KEYCHAIN: "sign.keychain"
54+
INSTALLER_CERT_MAC_PATH: "/tmp/ArduinoCerts2020.p12"
55+
KEYCHAIN_PASSWORD: keychainpassword # Arbitrary password for a keychain that exists only for the duration of the job, so not secret
56+
run: |
57+
echo "${{ secrets.INSTALLER_CERT_MAC_P12 }}" | base64 --decode > ${{ env.INSTALLER_CERT_MAC_PATH }}
58+
security create-keychain -p ${{ env.KEYCHAIN_PASSWORD }} ${{ env.KEYCHAIN }}
59+
security default-keychain -s ${{ env.KEYCHAIN }}
60+
security unlock-keychain -p ${{ env.KEYCHAIN_PASSWORD }} ${{ env.KEYCHAIN }}
61+
security import ${{ env.INSTALLER_CERT_MAC_PATH }} -k ${{ env.KEYCHAIN }} -f pkcs12 -A -T /usr/bin/codesign -P ${{ secrets.INSTALLER_CERT_MAC_PASSWORD }}
62+
security set-key-partition-list -S apple-tool:,apple: -s -k ${{ env.KEYCHAIN_PASSWORD }} ${{ env.KEYCHAIN }}
63+
64+
- name: Install gon for code signing and app notarization
65+
run: |
66+
wget -q https://github.com/mitchellh/gon/releases/download/v0.2.3/gon_macos.zip
67+
unzip gon_macos.zip -d /usr/local/bin
68+
69+
- name: Sign and notarize binary
70+
env:
71+
AC_USERNAME: ${{ secrets.AC_USERNAME }}
72+
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
73+
run: |
74+
gon gon.config.hcl
75+
76+
- name: Re-package binary and update checksum
77+
# This step performs the following:
78+
# 1. Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
79+
# 2. Recalculate package checksum and replace it in the goreleaser nnnnnn-checksums.txt file
80+
run: |
81+
# GitHub's upload/download-artifact@v2 action doesn't preserve file permissions,
82+
# so we need to add execution permission back until the action is made to do this.
83+
chmod +x dist/arduino-lint_osx_darwin_amd64/arduino-lint
84+
PACKAGE_FILENAME="$(basename dist/arduino-lint_nightly-*_macOS_64bit.tar.gz)"
85+
tar -czvf dist/$PACKAGE_FILENAME \
86+
-C dist/arduino-lint_osx_darwin_amd64/ arduino-lint \
87+
-C ../../ LICENSE.txt
88+
CLI_CHECKSUM=$(shasum -a 256 dist/$PACKAGE_FILENAME | cut -d " " -f 1)
89+
perl -pi -w -e "s/.*${PACKAGE_FILENAME}/${CLI_CHECKSUM} ${PACKAGE_FILENAME}/g;" dist/*-checksums.txt
90+
91+
- name: Upload artifacts
92+
uses: actions/upload-artifact@v2
93+
with:
94+
name: dist
95+
path: dist
96+
97+
publish-nightly:
98+
runs-on: ubuntu-latest
99+
needs: notarize-macos
100+
101+
steps:
102+
- name: Checkout
103+
uses: actions/checkout@v2
104+
105+
- name: Download artifact
106+
uses: actions/download-artifact@v2
107+
with:
108+
name: dist
109+
# to ensure compatibility with v1
110+
path: dist
111+
112+
- name: Upload release files on Arduino downloads servers
113+
uses: docker://plugins/s3
114+
env:
115+
PLUGIN_SOURCE: "dist/*"
116+
PLUGIN_TARGET: "/arduino-lint/nightly"
117+
PLUGIN_STRIP_PREFIX: "dist/"
118+
PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
119+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
120+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
121+
122+
- name: Report failure
123+
if: failure()
124+
uses: masci/datadog@v1
125+
with:
126+
api-key: ${{ secrets.DD_API_KEY }}
127+
events: |
128+
- title: "arduino-lint nightly build failed"
129+
text: "Nightly build workflow has failed"
130+
alert_type: "error"
131+
host: ${{ github.repository }}
132+
tags:
133+
- "project:arduino-lint"
134+
- "workflow:${{ github.workflow }}"

‎DistTasks.yml‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -190,17 +190,18 @@ tasks:
190190
PACKAGE_NAME: "{{ .PROJECT_NAME }}_{{ .VERSION }}_{{ .PACKAGE_PLATFORM }}.tar.gz"
191191

192192
vars:
193-
VERSION:
193+
TAG:
194194
sh: echo "`git describe --tags --abbrev=0`"
195195
TIMESTAMP_SHORT:
196196
sh: echo "{{now | date "20060102"}}"
197+
VERSION: "{{if .CUSTOM_VERSION}}{{.CUSTOM_VERSION}}-{{.TIMESTAMP_SHORT}}{{else}}{{.TAG}}{{end}}"
197198
DIST_LDFLAGS: >-
198199
-ldflags
199200
'
200-
-X {{ .CONFIGURATION_PACKAGE }}.version={{.VERSION}}
201+
-X {{ .CONFIGURATION_PACKAGE }}.version={{.TAG}}
201202
-X {{ .CONFIGURATION_PACKAGE }}.commit={{.COMMIT}}
202203
-X {{ .CONFIGURATION_PACKAGE }}.buildTimestamp={{.TIMESTAMP}}
203204
'
204205
CONTAINER: "docker.elastic.co/beats-dev/golang-crossbuild"
205206
GO_VERSION: "1.14.7"
206-
CHECKSUM_FILE: "{{ .VERSION }}-{{ .TIMESTAMP_SHORT }}-checksums.txt"
207+
CHECKSUM_FILE: "{{ .VERSION }}-checksums.txt"

‎README.md‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,32 @@
11
# arduino-lint
22

33
[![Tests Status](https://github.com/arduino/arduino-lint/workflows/Run%20tests/badge.svg)](https://github.com/arduino/arduino-lint/actions?workflow=Run+tests)
4+
[![Nightly Status](https://github.com/arduino/arduino-lint/workflows/Nightly%20build/badge.svg)](https://github.com/arduino/arduino-lint/actions?workflow=Nightly+build)
45
[![Docs Status](https://github.com/arduino/arduino-lint/workflows/Publish%20documentation/badge.svg)](https://github.com/arduino/arduino-lint/actions?workflow=Publish+documentation)
56

67
**arduino-lint** is a command line tool that checks for common problems in [Arduino](https://www.arduino.cc/) projects:
78

89
- Sketches
910
- Libraries
1011

12+
## Documentation
13+
1114
For usage instructions, see [the documentation](https://arduino.github.io/arduino-lint/latest/)
1215

1316
## Continuous Integration
1417

1518
There is a GitHub Actions action that makes it easy to use **arduino-lint**` in your CI workflows!
1619

1720
See https://github.com/arduino/arduino-lint-action for more information.
21+
22+
## How to contribute
23+
24+
Contributions are welcome!
25+
26+
Please see the [How to contribute](https://arduino.github.io/arduino-lint/latest/CONTRIBUTING/) page for information on
27+
building the source code, running tests, and contributing your changes to the project.
28+
29+
### Beta testing
30+
31+
[Nightly builds](https://arduino.github.io/arduino-lint/latest/installation/#nightly-builds) are available for beta
32+
testing.

‎docs/CONTRIBUTING.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@ There are several ways you can get involved:
88
| ------------------------------------------------- | ------------------------------------------------------- |
99
| - Support request<br/>- Question<br/>- Discussion | Post on the [Arduino Forum][forum] |
1010
| - Bug report<br/>- Feature request | Issue report (read the [issue guidelines][issues]) |
11+
| Beta testing | Try out the [nightly build][nightly] |
1112
| - Bug fix<br/>- Enhancement | Pull Request (read the [pull request guidelines][prs]) |
1213
| Monetary | - [Donate][donate]<br/>- [Buy official products][store] |
1314

1415
[forum]: https://forum.arduino.cc/index.php?board=3.0
1516
[issues]: #issue-reports
17+
[nightly]: installation.md#nightly-builds
1618
[prs]: #pull-requests
1719
[donate]: https://www.arduino.cc/en/Main/Contribute
1820
[store]: https://store.arduino.cc
@@ -26,6 +28,7 @@ High quality bug reports and feature requests are valuable contributions to the
2628

2729
### Before reporting an issue
2830

31+
- Give the [nightly build](installation.md#nightly-builds) a test drive to see if your issue was already resolved.
2932
- Search [existing pull requests and issues](https://github.com/arduino/arduino-lint/issues?q=) to see if it was already
3033
reported. If you have additional information to provide about an existing issue, please comment there. You can use
3134
[GitHub's "Reactions" feature](https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments) if you

‎docs/installation.md‎

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ curl -fsSL https://raw.githubusercontent.com/arduino/arduino-lint/main/etc/insta
1818
If you would like to use the `arduino-lint` command from any location, install arduino-lint to a directory already in
1919
your `PATH` or add the arduino-lint installation path to your `PATH` environment variable.
2020

21-
If you want to download a specific arduino-lint version, for example `0.9.0`, pass the version number as a parameter
22-
like this:
21+
If you want to download a specific arduino-lint version, for example `0.9.0` or `nightly-latest`, pass the version
22+
number as a parameter like this:
2323

2424
```
2525
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-lint/main/etc/install.sh | sh -s 0.9.0
@@ -53,6 +53,30 @@ already in your `PATH` or add the arduino-lint installation path to your `PATH`
5353

5454
These are available from the "Assets" sections on the [releases page](https://github.com/arduino/arduino-lint/releases).
5555

56+
#### Nightly builds
57+
58+
These builds are generated every day at 01:00 GMT from the `main` branch and should be considered unstable. In order to
59+
get the latest nightly build available for the supported platform, use the following links:
60+
61+
| Platform | | |
62+
| --------- | ---------------------------- | ---------------------------- |
63+
| Linux | [32 bit][linux32-nightly] | [64 bit][linux64-nightly] |
64+
| Linux ARM | [32 bit][linuxarm32-nightly] | [64 bit][linuxarm64-nightly] |
65+
| Windows | [32 bit][windows32-nightly] | [64 bit][windows64-nightly] |
66+
| macOS | | [64 bit][macos-nightly] |
67+
68+
[linux64-nightly]: https://downloads.arduino.cc/arduino-lint/nightly/arduino-lint_nightly-latest_Linux_64bit.tar.gz
69+
[linux32-nightly]: https://downloads.arduino.cc/arduino-lint/nightly/arduino-lint_nightly-latest_Linux_32bit.tar.gz
70+
[linuxarm64-nightly]: https://downloads.arduino.cc/arduino-lint/nightly/arduino-lint_nightly-latest_Linux_ARM64.tar.gz
71+
[linuxarm32-nightly]: https://downloads.arduino.cc/arduino-lint/nightly/arduino-lint_nightly-latest_Linux_ARMv7.tar.gz
72+
[windows64-nightly]: https://downloads.arduino.cc/arduino-lint/nightly/arduino-lint_nightly-latest_Windows_64bit.zip
73+
[windows32-nightly]: https://downloads.arduino.cc/arduino-lint/nightly/arduino-lint_nightly-latest_Windows_32bit.zip
74+
[macos-nightly]: https://downloads.arduino.cc/arduino-lint/nightly/arduino-lint_nightly-latest_macOS_64bit.tar.gz
75+
76+
> These links return a `302: Found` response, redirecting to latest generated builds by replacing `latest` with the
77+
> latest available build date, using the format YYYYMMDD (i.e for 2019年08月06日 `latest` is replaced with `20190806` )
78+
79+
Checksums for the nightly builds are available at
5680
`https://downloads.arduino.cc/arduino-lint/nightly/nightly-<DATE>-checksums.txt`
5781

5882
### Build from source

‎etc/install.sh‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,17 @@ downloadFile() {
139139
else
140140
ARDUINO_LINT_DIST="${PROJECT_NAME}_${TAG}_${OS}_${ARCH}.tar.gz"
141141
fi
142-
DOWNLOAD_URL="https://downloads.arduino.cc/${PROJECT_NAME}/${ARDUINO_LINT_DIST}"
142+
143+
# Support specifying nightly build versions (e.g., "nightly-latest") via the script argument.
144+
case "$TAG" in
145+
nightly*)
146+
DOWNLOAD_URL="https://downloads.arduino.cc/${PROJECT_NAME}/nightly/${ARDUINO_LINT_DIST}"
147+
;;
148+
*)
149+
DOWNLOAD_URL="https://downloads.arduino.cc/${PROJECT_NAME}/${ARDUINO_LINT_DIST}"
150+
;;
151+
esac
152+
143153
ARDUINO_LINT_TMP_FILE="/tmp/$ARDUINO_LINT_DIST"
144154
echo "Downloading $DOWNLOAD_URL"
145155
httpStatusCode=$(getFile "$DOWNLOAD_URL" "$ARDUINO_LINT_TMP_FILE")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /