Skip to content

Commit d71d3ec

Browse files
authored
pin github actions virtual environment versions (#573)
1 parent 1e420e1 commit d71d3ec

File tree

3 files changed

+35
-33
lines changed

3 files changed

+35
-33
lines changed

.github/workflows/check-certificates.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ env:
1515

1616
jobs:
1717
check-certificates:
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-18.04
1919

2020
strategy:
2121
fail-fast: false

.github/workflows/release.yml

+28-26
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
build:
1111
strategy:
1212
matrix:
13-
operating-system: [ubuntu-latest, windows-latest, macos-latest]
13+
operating-system: [ubuntu-18.04, windows-2019, macos-10.15]
1414

1515
runs-on: ${{ matrix.operating-system }}
1616

@@ -29,7 +29,7 @@ jobs:
2929
# dependencies used for compiling the GUI
3030
- name: Install Dependencies (Linux)
3131
run: sudo apt update && sudo apt install -y --no-install-recommends build-essential libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev
32-
if: matrix.operating-system == 'ubuntu-latest'
32+
if: matrix.operating-system == 'ubuntu-18.04'
3333

3434
- name: Install Go deps
3535
# Since 10/23/2019 pwsh is the default shell
@@ -54,28 +54,28 @@ jobs:
5454

5555
- name: Build the Agent
5656
run: task build
57-
if: matrix.operating-system != 'windows-latest'
57+
if: matrix.operating-system != 'windows-2019'
5858

5959
# build the agent without GUI support (no tray icon)
6060
- name: Build the Agent-cli
6161
run: task build-cli
62-
if: matrix.operating-system == 'ubuntu-latest'
62+
if: matrix.operating-system == 'ubuntu-18.04'
6363

6464
# the manifest is required by windows GUI apps, otherwise the binary will crash with: "Unable to create main window: TTM_ADDTOOL failed" (for reference https://github.com/lxn/walk/issues/28)
6565
# rsrc will produce *.syso files that should get automatically recognized by go build command and linked into an executable.
6666
- name: Embed manifest in win binary
6767
run: |
6868
go get github.com/akavel/rsrc
6969
rsrc -arch 386 -manifest manifest.xml
70-
if: matrix.operating-system == 'windows-latest'
70+
if: matrix.operating-system == 'windows-2019'
7171

7272
# building the agent for win requires a different task because of an extra flag
7373
- name: Build the Agent for win32
7474
env:
7575
GOARCH: 386 # 32bit architecture (for support)
7676
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)
7777
run: task build-win32
78-
if: matrix.operating-system == 'windows-latest'
78+
if: matrix.operating-system == 'windows-2019'
7979

8080
# config.ini is required by the executable when it's run
8181
- name: Upload artifacts
@@ -90,7 +90,9 @@ jobs:
9090
# The code-sign-mac-executable job will download the macos artifact from the previous job, sign e notarize the binary and re-upload it.
9191
code-sign-mac-executable:
9292
needs: build
93-
runs-on: macos-latest
93+
runs-on: macos-10.15
94+
env:
95+
RUNS_ON: macos-10.15 # used to parametrize filenames
9496

9597
steps:
9698
- name: Checkout
@@ -102,8 +104,8 @@ jobs:
102104
- name: Download artifact
103105
uses: actions/download-artifact@v2
104106
with:
105-
name: arduino-create-agent-macos-latest
106-
path: arduino-create-agent-macos-latest
107+
name: arduino-create-agent-${{ env.RUNS_ON }}
108+
path: arduino-create-agent-${{ env.RUNS_ON }}
107109

108110
- name: Import Code-Signing Certificates
109111
env:
@@ -128,22 +130,22 @@ jobs:
128130
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
129131
run: |
130132
gon -log-level=debug -log-json gon.config.hcl
131-
# gon will notarize executable in "arduino-create-agent-macos-latest/arduino-create-agent
133+
# gon will notarize executable in "arduino-create-agent-${{ env.RUNS_ON }}/arduino-create-agent
132134
# The CI will ignore the zip output, using the signed binary only.
133135
timeout-minutes: 30
134136

135-
# This step will overwrite the non signed mac artifact (arduino-create-agent-macos-latest)
137+
# This step will overwrite the non signed mac artifact (arduino-create-agent-${{ env.RUNS_ON }})
136138
- name: Upload artifact
137139
uses: actions/upload-artifact@v2
138140
with:
139-
name: arduino-create-agent-macos-latest
140-
path: arduino-create-agent-macos-latest
141+
name: arduino-create-agent-${{ env.RUNS_ON }}
142+
path: arduino-create-agent-${{ env.RUNS_ON }}
141143
if-no-files-found: error
142144

143145
# This job is responsible for generating the installers (using installbuilder)
144146
package:
145147
needs: code-sign-mac-executable
146-
runs-on: ubuntu-latest
148+
runs-on: ubuntu-18.04
147149

148150
env:
149151
# vars used by installbuilder
@@ -163,19 +165,19 @@ jobs:
163165
strategy:
164166
fail-fast: false # if one os is failing continue nonetheless
165167
matrix: # used to generate installers for different OS and not for runs-on
166-
operating-system: [ubuntu-latest, windows-latest, macos-latest]
168+
operating-system: [ubuntu-18.04, windows-2019, macos-10.15]
167169

168170
include:
169-
- operating-system: ubuntu-latest
171+
- operating-system: ubuntu-18.04
170172
install-builder-name: linux-x64
171173
executable-path: artifacts/linux-amd64/
172-
- operating-system: windows-latest
174+
- operating-system: windows-2019
173175
browser: edge
174176
install-builder-name: windows
175177
executable-path: artifacts/windows/
176178
extension: .exe
177179
installer-extension: .exe
178-
- operating-system: macos-latest
180+
- operating-system: macos-10.15
179181
browser: safari
180182
install-builder-name: osx
181183
executable-path: 'skel/ArduinoCreateAgent.app/Contents/MacOS/'
@@ -211,25 +213,25 @@ jobs:
211213
# zip artifacts do not mantain executable permission
212214
- name: Make executable
213215
run: chmod -v +x ${{ matrix.executable-path }}arduino-create-agent*
214-
if: matrix.operating-system == 'ubuntu-latest' || matrix.operating-system == 'macos-latest'
216+
if: matrix.operating-system == 'ubuntu-18.04' || matrix.operating-system == 'macos-10.15'
215217

216218
- name: Rename executable to Arduino_Create_Bridge
217219
run: mv -v ${{ matrix.executable-path }}arduino-create-agent${{ matrix.extension }} ${{ matrix.executable-path }}Arduino_Create_Bridge${{ matrix.extension }}
218220

219221
- name: Rename executable to Arduino_Create_Bridge_cli
220222
run: mv -v ${{ matrix.executable-path }}arduino-create-agent_cli${{ matrix.extension }} ${{ matrix.executable-path }}Arduino_Create_Bridge_cli${{ matrix.extension }}
221-
if: matrix.operating-system == 'ubuntu-latest'
223+
if: matrix.operating-system == 'ubuntu-18.04'
222224

223225
- name: Save InstallBuilder license to file
224226
run: echo "${{ secrets.INSTALLER_LICENSE }}" > /tmp/license.xml
225227

226228
- name: Save Win signing certificate to file
227229
run: echo "${{ secrets.INSTALLER_CERT_WINDOWS_PFX }}" | base64 --decode > ${{ env.INSTALLER_CERT_WINDOWS_PFX}}
228-
if: matrix.operating-system == 'windows-latest'
230+
if: matrix.operating-system == 'windows-2019'
229231

230232
- name: Save macos signing certificate to file
231233
run: echo "${{ secrets.INSTALLER_CERT_MAC_P12 }}" | base64 --decode > ${{ env.INSTALLER_CERT_MAC_P12 }}
232-
if: matrix.operating-system == 'macos-latest'
234+
if: matrix.operating-system == 'macos-10.15'
233235

234236
# win(edge),mac(safari) -> CERT_INSTALL and win,mac:(ff,chrome) -> CHOICE_CERT_INSTALL
235237
# installbuilder reads the env vars with certs paths and use it to sign the installer.
@@ -241,7 +243,7 @@ jobs:
241243
cp -vr ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-CC${{matrix.installer-extension}} ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-chrome${{matrix.installer-extension}}
242244
mv -v ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-CC${{matrix.installer-extension}} ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-firefox${{matrix.installer-extension}}
243245
rm -r ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-C*
244-
if: matrix.operating-system == 'windows-latest' || matrix.operating-system == 'macos-latest'
246+
if: matrix.operating-system == 'windows-2019' || matrix.operating-system == 'macos-10.15'
245247

246248
# linux
247249
- name: Launch Bitrock installbuilder-20 with NO_CERT_INSTALL
@@ -251,7 +253,7 @@ jobs:
251253
mv -v ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-CS.run ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-firefox.run
252254
cp -v ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-CS.tar.gz ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-chrome.tar.gz
253255
mv -v ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-CS.tar.gz ArduinoCreateAgent-${VERSION%.*}-${{ matrix.install-builder-name }}-installer-firefox.tar.gz
254-
if: matrix.operating-system == 'ubuntu-latest'
256+
if: matrix.operating-system == 'ubuntu-18.04'
255257

256258
- name: Upload artifacts
257259
uses: actions/upload-artifact@v2
@@ -263,7 +265,7 @@ jobs:
263265
# This job will sign and notarize mac installers
264266
code-sign-mac-installers:
265267
needs: package
266-
runs-on: macos-latest
268+
runs-on: macos-10.15
267269

268270
strategy:
269271
matrix:
@@ -342,7 +344,7 @@ jobs:
342344
if-no-files-found: error
343345

344346
create-release:
345-
runs-on: ubuntu-latest
347+
runs-on: ubuntu-18.04
346348
needs: code-sign-mac-installers
347349
env:
348350
PLUGIN_TARGET: "/CreateBridgeStable/"

.github/workflows/test.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
test-matrix:
88
strategy:
99
matrix:
10-
operating-system: [ubuntu-latest, windows-latest, macOS-latest]
10+
operating-system: [ubuntu-18.04, windows-2019, macos-10.15]
1111

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

@@ -26,7 +26,7 @@ jobs:
2626
# dependencies used for compiling the GUI
2727
- name: Install Dependencies (Linux)
2828
run: sudo apt update && sudo apt install -y --no-install-recommends build-essential libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev
29-
if: matrix.operating-system == 'ubuntu-latest'
29+
if: matrix.operating-system == 'ubuntu-18.04'
3030

3131
- name: Install Go deps
3232
# Since 10/23/2019 pwsh is the default shell
@@ -51,25 +51,25 @@ jobs:
5151

5252
- name: Build the Agent
5353
run: task build
54-
if: matrix.operating-system != 'windows-latest'
54+
if: matrix.operating-system != 'windows-2019'
5555

5656
# build the agent without GUI support (no tray icon)
5757
- name: Build the Agent-cli
5858
run: task build-cli
59-
if: matrix.operating-system == 'ubuntu-latest'
59+
if: matrix.operating-system == 'ubuntu-18.04'
6060

6161
# the manifest is required by windows GUI apps, otherwise the binary will crash with: "Unable to create main window: TTM_ADDTOOL failed" (for reference https://github.com/lxn/walk/issues/28)
6262
# rsrc will produce *.syso files that should get automatically recognized by go build command and linked into an executable.
6363
- name: Embed manifest in win binary
6464
run: |
6565
go get github.com/akavel/rsrc
6666
rsrc -arch 386 -manifest manifest.xml
67-
if: matrix.operating-system == 'windows-latest'
67+
if: matrix.operating-system == 'windows-2019'
6868

6969
# building the agent for win requires a different task because of an extra flag
7070
- name: Build the Agent for win32
7171
env:
7272
GOARCH: 386 # 32bit architecture (for support)
7373
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)
7474
run: task build-win32
75-
if: matrix.operating-system == 'windows-latest'
75+
if: matrix.operating-system == 'windows-2019'

0 commit comments

Comments
 (0)