Skip to content

Commit 454e811

Browse files
committed
tools: update GitHub Actions workflows
1 parent adf73ee commit 454e811

File tree

3 files changed

+37
-29
lines changed

3 files changed

+37
-29
lines changed

.github/workflows/ci.yaml

+11-6
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ on:
1010
jobs:
1111
Linux:
1212
name: Test on Linux
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-22.04
1414
strategy:
1515
matrix:
1616
node: [10, 12, 14, 16, 18, 20]
1717
steps:
1818
- uses: actions/setup-node@v3
1919
with:
2020
node-version: ${{ matrix.node }}
21+
check-latest: true
2122
- uses: actions/checkout@v3
2223
- name: Install Dependencies
2324
run: |
@@ -30,20 +31,22 @@ jobs:
3031

3132
Windows:
3233
name: Test on Windows
33-
runs-on: windows-2019
34+
runs-on: windows-2022
3435
strategy:
3536
matrix:
3637
node: [10, 12, 14, 16, 18, 20]
3738
steps:
3839
- uses: actions/setup-node@v3
3940
with:
4041
node-version: ${{ matrix.node }}
42+
check-latest: true
4143
- uses: actions/checkout@v3
4244
- name: Install Dependencies
4345
run: |
46+
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
4447
Invoke-WebRequest "https://ftp-osl.osuosl.org/pub/gnome/binaries/win64/gtk+/2.22/gtk+-bundle_2.22.1-20101229_win64.zip" -OutFile "gtk.zip"
4548
Expand-Archive gtk.zip -DestinationPath "C:\GTK"
46-
Invoke-WebRequest "https://downloads.sourceforge.net/project/libjpeg-turbo/2.0.4/libjpeg-turbo-2.0.4-vc64.exe" -OutFile "libjpeg.exe" -UserAgent NativeHost
49+
Invoke-WebRequest "https://downloads.sourceforge.net/project/libjpeg-turbo/2.1.5.1/libjpeg-turbo-2.1.5.1-vc64.exe" -OutFile "libjpeg.exe" -UserAgent NativeHost
4750
.\libjpeg.exe /S
4851
npm install -g node-gyp@8
4952
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
@@ -54,14 +57,15 @@ jobs:
5457

5558
macOS:
5659
name: Test on macOS
57-
runs-on: macos-latest
60+
runs-on: macos-12
5861
strategy:
5962
matrix:
6063
node: [10, 12, 14, 16, 18, 20]
6164
steps:
6265
- uses: actions/setup-node@v3
6366
with:
6467
node-version: ${{ matrix.node }}
68+
check-latest: true
6569
- uses: actions/checkout@v3
6670
- name: Install Dependencies
6771
run: |
@@ -75,11 +79,12 @@ jobs:
7579

7680
Lint:
7781
name: Lint
78-
runs-on: ubuntu-latest
82+
runs-on: ubuntu-22.04
7983
steps:
8084
- uses: actions/setup-node@v3
8185
with:
82-
node-version: 14
86+
node-version: 18
87+
check-latest: true
8388
- uses: actions/checkout@v3
8489
- name: Install
8590
run: npm install --ignore-scripts

.github/workflows/prebuild.yaml

+19-22
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,21 @@ jobs:
2626
matrix:
2727
node: [8, 9, 10, 11, 12, 13, 14, 16, 18, 20]
2828
canvas_tag: [] # e.g. "v2.6.1"
29-
name: ${{ matrix.canvas_tag}}, Node.js ${{ matrix.node }}, Linux
30-
runs-on: ubuntu-latest
29+
name: ${{ matrix.canvas_tag }}, Node.js ${{ matrix.node }}, Linux
30+
runs-on: ubuntu-22.04
3131
container:
3232
image: chearon/canvas-prebuilt:7
3333
env:
3434
CANVAS_VERSION_TO_BUILD: ${{ matrix.canvas_tag }}
3535
steps:
36-
- uses: actions/checkout@v2
36+
- uses: actions/checkout@v3
3737
with:
3838
ref: ${{ matrix.canvas_tag }}
3939

40-
- uses: actions/setup-node@v1
40+
- uses: actions/setup-node@v3
4141
with:
4242
node-version: ${{ matrix.node }}
43+
check-latest: true
4344

4445
- name: Build
4546
run: |
@@ -65,7 +66,7 @@ jobs:
6566
run: . prebuild/tarball.sh
6667

6768
- name: Upload
68-
uses: actions/github-script@0.9.0
69+
uses: actions/github-script@v6
6970
with:
7071
script: |
7172
const fs = require("fs");
@@ -99,18 +100,19 @@ jobs:
99100
matrix:
100101
node: [8, 9, 10, 11, 12, 13, 14, 16, 18, 20]
101102
canvas_tag: [] # e.g. "v2.6.1"
102-
name: ${{ matrix.canvas_tag}}, Node.js ${{ matrix.node }}, macOS
103-
runs-on: macos-latest
103+
name: ${{ matrix.canvas_tag }}, Node.js ${{ matrix.node }}, macOS
104+
runs-on: macos-12
104105
env:
105106
CANVAS_VERSION_TO_BUILD: ${{ matrix.canvas_tag }}
106107
steps:
107-
- uses: actions/checkout@v2
108+
- uses: actions/checkout@v3
108109
with:
109110
ref: ${{ matrix.canvas_tag }}
110111

111-
- uses: actions/setup-node@v1
112+
- uses: actions/setup-node@v3
112113
with:
113114
node-version: ${{ matrix.node }}
115+
check-latest: true
114116

115117
- name: Build
116118
run: |
@@ -131,7 +133,7 @@ jobs:
131133
run: . prebuild/tarball.sh
132134

133135
- name: Upload
134-
uses: actions/github-script@0.9.0
136+
uses: actions/github-script@v6
135137
with:
136138
script: |
137139
const fs = require("fs");
@@ -165,22 +167,17 @@ jobs:
165167
matrix:
166168
node: [8, 9, 10, 11, 12, 13, 14, 16, 18, 20]
167169
canvas_tag: [] # e.g. "v2.6.1"
168-
name: ${{ matrix.canvas_tag}}, Node.js ${{ matrix.node }}, Windows
169-
runs-on: windows-latest
170+
name: ${{ matrix.canvas_tag }}, Node.js ${{ matrix.node }}, Windows
171+
runs-on: windows-2022
170172
env:
171173
CANVAS_VERSION_TO_BUILD: ${{ matrix.canvas_tag }}
172174
steps:
173-
# TODO drop when https://github.com/actions/virtual-environments/pull/632 lands
174-
- uses: numworks/setup-msys2@v1
175-
with:
176-
update: true
177-
path-type: inherit
178-
179-
- uses: actions/setup-node@v1
175+
- uses: actions/setup-node@v3
180176
with:
181177
node-version: ${{ matrix.node }}
178+
check-latest: true
182179

183-
- uses: actions/checkout@v2
180+
- uses: actions/checkout@v3
184181
with:
185182
ref: ${{ matrix.canvas_tag }}
186183

@@ -203,10 +200,10 @@ jobs:
203200
- name: Make asset
204201
id: make_bundle
205202
# I can't figure out why this isn't an env var already. It shows up with `env`.
206-
run: msys2do UPLOAD_TO=${{ env.UPLOAD_TO }} CANVAS_VERSION_TO_BUILD=${{ env.CANVAS_VERSION_TO_BUILD}} . prebuild/tarball.sh
203+
run: msys2do UPLOAD_TO=${{ env.UPLOAD_TO }} CANVAS_VERSION_TO_BUILD=${{ env.CANVAS_VERSION_TO_BUILD }} . prebuild/tarball.sh
207204

208205
- name: Upload
209-
uses: actions/github-script@0.9.0
206+
uses: actions/github-script@v6
210207
with:
211208
script: |
212209
const fs = require("fs");

CHANGELOG.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@ project adheres to [Semantic Versioning](http://semver.org/).
99
==================
1010
### Changed
1111
* Defer the initialization of the `op` variable to the `default` switch case to avoid a compiler warning. (#2229)
12-
* Use a `default` switch case with a null statement if some enum values aren't suppsed to be handled, this avoids a compiler warning. (#2229)
12+
* Use a `default` switch case with a null statement if some enum values aren't supposed to be handled, this avoids a compiler warning. (#2229)
1313
* Migrate from librsvg's deprecated `rsvg_handle_get_dimensions()` and `rsvg_handle_render_cairo()` functions to the new `rsvg_handle_get_intrinsic_size_in_pixels()` and `rsvg_handle_render_document()` respectively. (#2229)
1414
* Avoid calling virtual methods in constructors/destructors to avoid bypassing virtual dispatch. (#2229)
1515
* Remove unused private field `backend` in the `Backend` class. (#2229)
1616
* Add Node.js v20 to CI. (#2237)
17+
* Update actions in the GitHub Actions workflows to their latest versions. (#2231)
18+
* Pin the platform versions in the GitHub Actions workflows. (#2231)
19+
* Use the latest Windows runner image in the GitHub Actions workflows. (#2231)
20+
* Remove action to setup MSYS2 on Windows as it's done by default now. (#2231)
21+
* Set the `check-latest` field of the `actions/setup-node` action to use the latest specified Node.js version instead of the cached ones. (#2231)
22+
* Update the libjpeg-turbo version in the Windows GitHub Actions CI test. (#2231)
1723
### Added
1824
* Added string tags to support class detection
1925
### Fixed

0 commit comments

Comments
 (0)