Skip to content

Commit

Permalink
tools: update GitHub Actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
VoltrexKeyva committed Apr 19, 2023
1 parent 5bd5b24 commit 25f739c
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 30 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,18 @@ on:
paths-ignore:
- ".github/workflows/prebuild.yaml"

jobs:
jobs:
Linux:
name: Test on Linux
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
node: [10, 12, 14, 16, 18]
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
Expand All @@ -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]
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"}
Expand All @@ -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]
steps:
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
check-latest: true
- uses: actions/checkout@v3
- name: Install Dependencies
run: |
Expand All @@ -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
chexk-latest: true
- uses: actions/checkout@v3
- name: Install
run: npm install --ignore-scripts
Expand Down
41 changes: 19 additions & 22 deletions .github/workflows/prebuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,21 @@ jobs:
matrix:
node: [8, 9, 10, 11, 12, 13, 14, 16, 18]
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: |
Expand All @@ -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");
Expand Down Expand Up @@ -99,18 +100,19 @@ jobs:
matrix:
node: [8, 9, 10, 11, 12, 13, 14, 16, 18]
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: |
Expand All @@ -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");
Expand Down Expand Up @@ -165,22 +167,17 @@ jobs:
matrix:
node: [8, 9, 10, 11, 12, 13, 14, 16, 18]
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 }}

Expand All @@ -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");
Expand Down
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,16 @@ 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)
* 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
Expand Down

0 comments on commit 25f739c

Please sign in to comment.