Skip to content

Commit 46f4e32

Browse files
committed
Merge branch 'master' into arduifine
2 parents e8a3e61 + a4ee670 commit 46f4e32

File tree

286 files changed

+22359
-17914
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

286 files changed

+22359
-17914
lines changed

Diff for: .dependabot/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ update_configs:
77
- match:
88
update_type: "security"
99
default_labels:
10-
- "component/dependencies"
10+
- "topic: dependencies"

Diff for: .github/workflows/github-stats.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
const baseName = `arduino-cli_${rel.name}_`
3535
3636
// Get a list of assets for this release
37-
const opts = github.repos.listAssetsForRelease.endpoint.merge({
37+
const opts = github.repos.listReleaseAssets.endpoint.merge({
3838
...context.repo,
3939
release_id: rel.id
4040
})

Diff for: .github/workflows/i18n-nightly-push.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
uses: Arduino/actions/setup-taskfile@master
2525
with:
2626
repo-token: ${{ secrets.GITHUB_TOKEN }}
27+
version: 3.x
2728

2829
- name: Run task i18n:push
2930
run: task i18n:push

Diff for: .github/workflows/i18n-weekly-pull.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ jobs:
2828
uses: Arduino/actions/setup-taskfile@master
2929
with:
3030
repo-token: ${{ secrets.GITHUB_TOKEN }}
31+
version: 3.x
3132

3233
- name: Run task i18n:pull
3334
run: task i18n:pull

Diff for: .github/workflows/link-validation.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
uses: Arduino/actions/setup-taskfile@master
2121
with:
2222
repo-token: ${{ secrets.GITHUB_TOKEN }}
23+
version: 3.x
2324

2425
- name: Install Go
2526
uses: actions/setup-go@v2

Diff for: .github/workflows/nightly.yaml

+12-12
Original file line numberDiff line numberDiff line change
@@ -12,22 +12,22 @@ jobs:
1212
if: github.repository == 'arduino/arduino-cli'
1313
runs-on: ubuntu-latest
1414

15-
container:
16-
image: arduino/arduino-cli:builder-1
17-
volumes:
18-
# cache go dependencies across pipeline's steps
19-
- ${{ github.workspace }}/go:/go
20-
2115
steps:
2216
- name: checkout
2317
uses: actions/checkout@v1
2418
with:
2519
fetch-depth: 0
2620

27-
- name: build
21+
- name: Install Taskfile
22+
uses: arduino/actions/setup-taskfile@master
23+
with:
24+
repo-token: ${{ secrets.GITHUB_TOKEN }}
25+
version: 3.x
26+
27+
- name: Build
2828
env:
29-
PACKAGE_NAME_PREFIX: ${{ github.workflow }}
30-
run: goreleaser --snapshot
29+
NIGHTLY: true
30+
run: task dist:all
3131

3232
- name: Upload artifacts
3333
uses: actions/upload-artifact@v2
@@ -77,14 +77,14 @@ jobs:
7777
- name: Re-package binary and update checksum
7878
# This step performs the following:
7979
# 1. Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
80-
# 2. Recalculate package checksum and replace it in the goreleaser nnnnnn-checksums.txt file
80+
# 2. Recalculate package checksum and replace it in the nnnnnn-checksums.txt file
8181
run: |
8282
# GitHub's upload/download-artifact@v1 actions don't preserve file permissions,
8383
# so we need to add execution permission back until @v2 actions are released.
84-
chmod +x dist/arduino_cli_osx_darwin_amd64/arduino-cli
84+
chmod +x dist/arduino-cli_osx_darwin_amd64/arduino-cli
8585
PACKAGE_FILENAME="$(basename dist/arduino-cli_${{ github.workflow }}-*_macOS_64bit.tar.gz)"
8686
tar -czvf dist/$PACKAGE_FILENAME \
87-
-C dist/arduino_cli_osx_darwin_amd64/ arduino-cli \
87+
-C dist/arduino-cli_osx_darwin_amd64/ arduino-cli \
8888
-C ../../ LICENSE.txt
8989
CLI_CHECKSUM=$(shasum -a 256 dist/$PACKAGE_FILENAME | cut -d " " -f 1)
9090
perl -pi -w -e "s/.*${PACKAGE_FILENAME}/${CLI_CHECKSUM} ${PACKAGE_FILENAME}/g;" dist/*-checksums.txt

Diff for: .github/workflows/publish-docs.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
uses: Arduino/actions/setup-taskfile@master
4848
with:
4949
repo-token: ${{ secrets.GITHUB_TOKEN }}
50+
version: 3.x
5051

5152
- name: Setup Go
5253
uses: actions/setup-go@v2

Diff for: .github/workflows/python-lint.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ jobs:
2323
uses: Arduino/actions/setup-taskfile@master
2424
with:
2525
repo-token: ${{ secrets.GITHUB_TOKEN }}
26+
version: 3.x
2627

2728
- name: Activate Python
2829
uses: actions/setup-python@v1

Diff for: .github/workflows/release.yaml

+18-10
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,28 @@ jobs:
99
create-release-artifacts:
1010
runs-on: ubuntu-latest
1111

12-
container:
13-
image: arduino/arduino-cli:builder-1
14-
volumes:
15-
# cache go dependencies across pipeline's steps
16-
- ${{ github.workspace }}/go:/go
17-
1812
steps:
1913
- name: Checkout
2014
uses: actions/checkout@v1
2115
with:
2216
fetch-depth: 0
2317

18+
- name: Create changelog
19+
uses: arduino/create-changelog@v1
20+
with:
21+
tag-regex: '^[0-9]+\.[0-9]+\.[0-9]+$'
22+
filter-regex: '^\[(skip|changelog)[ ,-](skip|changelog)\].*'
23+
case-insensitive-regex: true
24+
changelog-file-path: "dist/CHANGELOG.md"
25+
26+
- name: Install Taskfile
27+
uses: arduino/actions/setup-taskfile@master
28+
with:
29+
repo-token: ${{ secrets.GITHUB_TOKEN }}
30+
version: 3.x
31+
2432
- name: Build
25-
run: goreleaser
33+
run: task dist:all
2634

2735
- name: Upload artifacts
2836
uses: actions/upload-artifact@v2
@@ -72,14 +80,14 @@ jobs:
7280
- name: Re-package binary and update checksum
7381
# This step performs the following:
7482
# 1. Repackage the signed binary replaced in place by Gon (ignoring the output zip file)
75-
# 2. Recalculate package checksum and replace it in the goreleaser nnnnnn-checksums.txt file
83+
# 2. Recalculate package checksum and replace it in the nnnnnn-checksums.txt file
7684
run: |
7785
# GitHub's upload/download-artifact@v1 actions don't preserve file permissions,
7886
# so we need to add execution permission back until @v2 actions are released.
79-
chmod +x dist/arduino_cli_osx_darwin_amd64/arduino-cli
87+
chmod +x dist/arduino-cli_osx_darwin_amd64/arduino-cli
8088
TAG=${GITHUB_REF/refs\/tags\//}
8189
tar -czvf dist/arduino-cli_${TAG}_macOS_64bit.tar.gz \
82-
-C dist/arduino_cli_osx_darwin_amd64/ arduino-cli \
90+
-C dist/arduino-cli_osx_darwin_amd64/ arduino-cli \
8391
-C ../../ LICENSE.txt
8492
CLI_CHECKSUM=$(shasum -a 256 dist/arduino-cli_${TAG}_macOS_64bit.tar.gz | cut -d " " -f 1)
8593
perl -pi -w -e "s/.*arduino-cli_${TAG}_macOS_64bit.tar.gz/${CLI_CHECKSUM} arduino-cli_${TAG}_macOS_64bit.tar.gz/g;" dist/*-checksums.txt

Diff for: .github/workflows/stale.yaml

-107
This file was deleted.

Diff for: .github/workflows/test.yaml

+29-18
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
test-matrix:
99
strategy:
1010
matrix:
11-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
11+
operating-system: [ubuntu-20.04, windows-latest, macOS-latest]
1212

1313
runs-on: ${{ matrix.operating-system }}
1414

@@ -22,7 +22,7 @@ jobs:
2222
- name: Install Go
2323
uses: actions/setup-go@v2
2424
with:
25-
go-version: "1.14"
25+
go-version: "1.16"
2626

2727
- name: Install Go deps
2828
# Since 10/23/2019 pwsh is the default shell
@@ -39,6 +39,7 @@ jobs:
3939
uses: Arduino/actions/setup-taskfile@master
4040
with:
4141
repo-token: ${{ secrets.GITHUB_TOKEN }}
42+
version: 3.x
4243

4344
- name: Install Python
4445
uses: actions/setup-python@v1
@@ -49,16 +50,27 @@ jobs:
4950
- name: Install Poetry
5051
run: pip install poetry
5152

53+
- name: Install buf (protoc linter)
54+
if: runner.os == 'Linux'
55+
run: |
56+
go install github.com/bufbuild/buf/cmd/buf@latest
57+
go install github.com/bufbuild/buf/cmd/protoc-gen-buf-breaking@latest
58+
go install github.com/bufbuild/buf/cmd/protoc-gen-buf-lint@latest
59+
shell: bash
60+
5261
- name: Check the code is good
62+
if: runner.os == 'Linux'
5363
run: task check
5464

5565
- name: Install protoc compiler
66+
if: runner.os == 'Linux'
5667
uses: arduino/setup-protoc@v1
5768
with:
5869
repo-token: ${{ secrets.GITHUB_TOKEN }}
5970

6071
- name: Check protocol buffers compile correctly
61-
run: task protoc
72+
if: runner.os == 'Linux'
73+
run: task protoc:compile
6274

6375
- name: Build the CLI
6476
run: task build
@@ -68,15 +80,15 @@ jobs:
6880

6981
- name: Run unit tests on the legacy package
7082
# Run legacy tests on one platform only
71-
if: matrix.operating-system == 'ubuntu-latest'
83+
if: matrix.operating-system == 'ubuntu-20.04'
7284
run: task test-legacy
7385

7486
- name: Run integration tests
7587
run: task test-integration
7688

7789
- name: Send unit tests coverage to Codecov
7890
if: >
79-
matrix.operating-system == 'ubuntu-latest' &&
91+
matrix.operating-system == 'ubuntu-20.04' &&
8092
github.event_name == 'push'
8193
uses: codecov/codecov-action@v1
8294
with:
@@ -85,7 +97,7 @@ jobs:
8597

8698
- name: Send legacy tests coverage to Codecov
8799
if: >
88-
matrix.operating-system == 'ubuntu-latest' &&
100+
matrix.operating-system == 'ubuntu-20.04' &&
89101
github.event_name == 'push'
90102
uses: codecov/codecov-action@v1
91103
with:
@@ -94,39 +106,38 @@ jobs:
94106

95107
- name: Send integration tests coverage to Codecov
96108
if: >
97-
matrix.operating-system == 'ubuntu-latest' &&
109+
matrix.operating-system == 'ubuntu-20.04' &&
98110
github.event_name == 'push'
99111
uses: codecov/codecov-action@v1
100112
with:
101113
file: ./coverage_integ.txt
102114
flags: integ
103115

104116
create-test-artifacts:
105-
runs-on: ubuntu-latest
117+
runs-on: ubuntu-20.04
106118
needs: test-matrix
107119

108-
container:
109-
image: arduino/arduino-cli:builder-1
110-
volumes:
111-
# cache go dependencies across pipeline's steps
112-
- ${{ github.workspace }}/go:/go
113-
114120
steps:
115121
- name: checkout
116122
uses: actions/checkout@v1
117123
with:
118124
fetch-depth: 0
119125

120-
- name: build
121-
shell: bash
126+
- name: Install Taskfile
127+
uses: arduino/actions/setup-taskfile@master
128+
with:
129+
repo-token: ${{ secrets.GITHUB_TOKEN }}
130+
version: 3.x
131+
132+
- name: Build
122133
run: |
123134
PACKAGE_NAME_PREFIX="${{ github.workflow }}"
124135
if [ "${{ github.event_name }}" = "pull_request" ]; then
125136
PACKAGE_NAME_PREFIX="$PACKAGE_NAME_PREFIX-${{ github.event.number }}"
126137
fi
127-
PACKAGE_NAME_PREFIX="$PACKAGE_NAME_PREFIX-${{ github.sha }}"
138+
PACKAGE_NAME_PREFIX="$PACKAGE_NAME_PREFIX-${{ github.sha }}-"
128139
export PACKAGE_NAME_PREFIX
129-
goreleaser --snapshot
140+
task dist:all
130141
131142
# Uploads all architectures as separate artifacts
132143
- name: Upload Linux 32 bit artifact

0 commit comments

Comments
 (0)