Skip to content

Commit a26b42b

Browse files
committed
add win 32/64 to all the jobs in the release workflow & optimizations 🧙🏻
1 parent bf32db6 commit a26b42b

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

.github/workflows/release.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
include:
1414
- operating-system: ubuntu-18.04
1515
- operating-system: windows-2019
16-
arch: 386
16+
arch: -386
1717
- operating-system: windows-2019
18-
arch: amd64
18+
arch: -amd64
1919
- operating-system: macos-10.15
2020

2121
runs-on: ${{ matrix.operating-system }}
@@ -81,11 +81,11 @@ jobs:
8181
GOARCH: 386 # 32bit architecture (for support)
8282
GO386: 387 # support old instruction sets without MMX (used in the Pentium 4) (will be deprecated in GO > 1.15 https://golang.org/doc/go1.15)
8383
run: task build-win
84-
if: matrix.operating-system == 'windows-2019' && matrix.arch == '386'
84+
if: matrix.operating-system == 'windows-2019' && matrix.arch == '-386'
8585

8686
- name: Build the Agent for win64
8787
run: task build-win # GOARCH=amd64 by default on the runners
88-
if: matrix.operating-system == 'windows-2019' && matrix.arch == 'amd64'
88+
if: matrix.operating-system == 'windows-2019' && matrix.arch == '-amd64'
8989

9090
- name: Build the Agent for macos
9191
env:
@@ -192,13 +192,20 @@ jobs:
192192
strategy:
193193
fail-fast: false # if one os is failing continue nonetheless
194194
matrix: # used to generate installers for different OS and not for runs-on
195-
operating-system: [ubuntu-18.04, windows-2019, macos-10.15]
196195

197196
include:
198197
- operating-system: ubuntu-18.04
199198
install-builder-name: linux-x64
200199
executable-path: artifacts/linux-amd64/
201200
- operating-system: windows-2019
201+
arch: -386
202+
browser: edge
203+
install-builder-name: windows
204+
executable-path: artifacts/windows/
205+
extension: .exe
206+
installer-extension: .exe
207+
- operating-system: windows-2019
208+
arch: -amd64
202209
browser: edge
203210
install-builder-name: windows
204211
executable-path: artifacts/windows/
@@ -234,7 +241,7 @@ jobs:
234241
- name: Download artifact
235242
uses: actions/download-artifact@v2
236243
with:
237-
name: arduino-create-agent-${{ matrix.operating-system }}
244+
name: arduino-create-agent-${{ matrix.operating-system }}${{ matrix.arch }}
238245
path: ${{ matrix.executable-path }} # path expected by installbuilder
239246

240247
# zip artifacts do not mantain executable permission
@@ -265,10 +272,10 @@ jobs:
265272
- name: Launch Bitrock installbuilder-20 with CERT_INSTALL && CHOICE_CERT_INSTALL
266273
run: |
267274
${{ env.INSTALLBUILDER_PATH }} build installer.xml ${{ matrix.install-builder-name }} --verbose --license /tmp/license.xml --setvars ${INSTALLER_VARS} ${{ env.CERT_INSTALL }}
268-
mv -v ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-CI${{matrix.installer-extension}} ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-${{matrix.browser}}${{matrix.installer-extension}}
275+
mv -v ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-CI${{matrix.installer-extension}} ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-${{matrix.browser}}${{matrix.installer-extension}}
269276
${{ env.INSTALLBUILDER_PATH }} build installer.xml ${{ matrix.install-builder-name }} --verbose --license /tmp/license.xml --setvars ${INSTALLER_VARS} ${{ env.CHOICE_CERT_INSTALL }}
270-
cp -vr ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-CC${{matrix.installer-extension}} ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-chrome${{matrix.installer-extension}}
271-
mv -v ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-CC${{matrix.installer-extension}} ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-firefox${{matrix.installer-extension}}
277+
cp -vr ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-CC${{matrix.installer-extension}} ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-chrome${{matrix.installer-extension}}
278+
mv -v ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-CC${{matrix.installer-extension}} ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}${{ matrix.arch }}-installer-firefox${{matrix.installer-extension}}
272279
rm -r ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-C*
273280
if: matrix.operating-system == 'windows-2019' || matrix.operating-system == 'macos-10.15'
274281

@@ -285,7 +292,7 @@ jobs:
285292
- name: Upload artifacts
286293
uses: actions/upload-artifact@v2
287294
with:
288-
name: ArduinoCreateAgent-${{ matrix.install-builder-name }}
295+
name: ArduinoCreateAgent-${{ matrix.install-builder-name }}${{ matrix.arch }}
289296
path: ArduinoCreateAgent*
290297
if-no-files-found: error
291298

@@ -399,7 +406,7 @@ jobs:
399406
mv -v ArduinoCreateAgent-linux-x64/* release/
400407
cat ArduinoCreateAgent-osx/*.tar | tar -xvf - -i -C release/
401408
rm -v release/._ArduinoCreateAgent*.dmg
402-
mv -v ArduinoCreateAgent-windows/* release/
409+
mv -v ArduinoCreateAgent-windows*/* release/
403410
404411
- name: Create Github Release
405412
uses: actions/create-release@v1

.github/workflows/test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
include:
1111
- operating-system: ubuntu-18.04
1212
- operating-system: windows-2019
13-
arch: 386
13+
arch: -386
1414
- operating-system: windows-2019
15-
arch: amd64
15+
arch: -amd64
1616
- operating-system: macos-10.15
1717

1818
runs-on: ${{ matrix.operating-system }}
@@ -76,11 +76,11 @@ jobs:
7676
GOARCH: 386 # 32bit architecture (for support)
7777
GO386: 387 # support old instruction sets without MMX (used in the Pentium 4) (will be deprecated in GO > 1.15 https://golang.org/doc/go1.15)
7878
run: task build-win
79-
if: matrix.operating-system == 'windows-2019' && matrix.arch == '386'
79+
if: matrix.operating-system == 'windows-2019' && matrix.arch == '-386'
8080

8181
- name: Build the Agent for win64
8282
run: task build-win # GOARCH=amd64 by default on the runners
83-
if: matrix.operating-system == 'windows-2019' && matrix.arch == 'amd64'
83+
if: matrix.operating-system == 'windows-2019' && matrix.arch == '-amd64'
8484

8585
- name: Build the Agent for macos
8686
env:

0 commit comments

Comments
 (0)