Skip to content

tools: update GitHub Actions workflows #2231

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 11 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -10,14 +10,15 @@ on:
jobs:
Linux:
name: Test on Linux
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
node: [10, 12, 14, 16, 18, 20]
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
@@ -30,20 +31,22 @@ jobs:

Windows:
name: Test on Windows
runs-on: windows-2019
runs-on: windows-2022
strategy:
matrix:
node: [10, 12, 14, 16, 18, 20]
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
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"
Expand-Archive gtk.zip -DestinationPath "C:\GTK"
Invoke-WebRequest "https://downloads.sourceforge.net/project/libjpeg-turbo/2.0.4/libjpeg-turbo-2.0.4-vc64.exe" -OutFile "libjpeg.exe" -UserAgent NativeHost
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
.\libjpeg.exe /S
npm install -g node-gyp@8
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
@@ -54,14 +57,15 @@ jobs:

macOS:
name: Test on macOS
runs-on: macos-latest
runs-on: macos-12
strategy:
matrix:
node: [10, 12, 14, 16, 18, 20]
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
@@ -75,11 +79,12 @@ jobs:

Lint:
name: Lint
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/setup-node@v3
with:
node-version: 14
node-version: 18
check-latest: true
- uses: actions/checkout@v3
- name: Install
run: npm install --ignore-scripts
41 changes: 19 additions & 22 deletions .github/workflows/prebuild.yaml
Original file line number Diff line number Diff line change
@@ -26,20 +26,21 @@ jobs:
matrix:
node: [8, 9, 10, 11, 12, 13, 14, 16, 18, 20]
canvas_tag: [] # e.g. "v2.6.1"
name: ${{ matrix.canvas_tag}}, Node.js ${{ matrix.node }}, Linux
runs-on: ubuntu-latest
name: ${{ matrix.canvas_tag }}, Node.js ${{ matrix.node }}, Linux
runs-on: ubuntu-22.04
container:
image: chearon/canvas-prebuilt:7
env:
CANVAS_VERSION_TO_BUILD: ${{ matrix.canvas_tag }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ matrix.canvas_tag }}

- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true

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

- name: Upload
uses: actions/github-script@0.9.0
uses: actions/github-script@v6
with:
script: |
const fs = require("fs");
@@ -99,18 +100,19 @@ jobs:
matrix:
node: [8, 9, 10, 11, 12, 13, 14, 16, 18, 20]
canvas_tag: [] # e.g. "v2.6.1"
name: ${{ matrix.canvas_tag}}, Node.js ${{ matrix.node }}, macOS
runs-on: macos-latest
name: ${{ matrix.canvas_tag }}, Node.js ${{ matrix.node }}, macOS
runs-on: macos-12
env:
CANVAS_VERSION_TO_BUILD: ${{ matrix.canvas_tag }}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ matrix.canvas_tag }}

- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true

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

- name: Upload
uses: actions/github-script@0.9.0
uses: actions/github-script@v6
with:
script: |
const fs = require("fs");
@@ -165,22 +167,17 @@ jobs:
matrix:
node: [8, 9, 10, 11, 12, 13, 14, 16, 18, 20]
canvas_tag: [] # e.g. "v2.6.1"
name: ${{ matrix.canvas_tag}}, Node.js ${{ matrix.node }}, Windows
runs-on: windows-latest
name: ${{ matrix.canvas_tag }}, Node.js ${{ matrix.node }}, Windows
runs-on: windows-2022
env:
CANVAS_VERSION_TO_BUILD: ${{ matrix.canvas_tag }}
steps:
# TODO drop when https://github.com/actions/virtual-environments/pull/632 lands
- uses: numworks/setup-msys2@v1
with:
update: true
path-type: inherit

- uses: actions/setup-node@v1
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ matrix.canvas_tag }}

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

- name: Upload
uses: actions/github-script@0.9.0
uses: actions/github-script@v6
with:
script: |
const fs = require("fs");
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -9,11 +9,17 @@ project adheres to [Semantic Versioning](http://semver.org/).
==================
### Changed
* Defer the initialization of the `op` variable to the `default` switch case to avoid a compiler warning. (#2229)
* 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)
* 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)
* 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)
* Avoid calling virtual methods in constructors/destructors to avoid bypassing virtual dispatch. (#2229)
* Remove unused private field `backend` in the `Backend` class. (#2229)
* Add Node.js v20 to CI. (#2237)
* Update actions in the GitHub Actions workflows to their latest versions. (#2231)
* Pin the platform versions in the GitHub Actions workflows. (#2231)
* Use the latest Windows runner image in the GitHub Actions workflows. (#2231)
* Remove action to setup MSYS2 on Windows as it's done by default now. (#2231)
* 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)
* Update the libjpeg-turbo version in the Windows GitHub Actions CI test. (#2231)
### Added
* Added string tags to support class detection
### Fixed