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 18, 2023
1 parent 5bd5b24 commit 03457be
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 29 deletions.
18 changes: 12 additions & 6 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
strategy:
matrix:
node: [10, 12, 14, 16, 18]
node: [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,21 +31,24 @@ jobs:

Windows:
name: Test on Windows
runs-on: windows-2019
runs-on: windows-latest
strategy:
matrix:
node: [10, 12, 14, 16, 18]
node: [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
.\libjpeg.exe /S
npm install -g npm
npm install -g node-gyp@8
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
- name: Install
Expand All @@ -57,11 +61,12 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
node: [10, 12, 14, 16, 18]
node: [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 @@ -79,7 +84,8 @@ jobs:
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 @@ -24,22 +24,23 @@ jobs:
Linux:
strategy:
matrix:
node: [8, 9, 10, 11, 12, 13, 14, 16, 18]
node: [14, 16, 18]
canvas_tag: [] # e.g. "v2.6.1"
name: ${{ matrix.canvas_tag}}, Node.js ${{ matrix.node }}, Linux
name: ${{ matrix.canvas_tag }}, Node.js ${{ matrix.node }}, Linux
runs-on: ubuntu-latest
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 @@ -97,20 +98,21 @@ jobs:
macOS:
strategy:
matrix:
node: [8, 9, 10, 11, 12, 13, 14, 16, 18]
node: [14, 16, 18]
canvas_tag: [] # e.g. "v2.6.1"
name: ${{ matrix.canvas_tag}}, Node.js ${{ matrix.node }}, macOS
name: ${{ matrix.canvas_tag }}, Node.js ${{ matrix.node }}, macOS
runs-on: macos-latest
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 @@ -163,24 +165,19 @@ jobs:
Win:
strategy:
matrix:
node: [8, 9, 10, 11, 12, 13, 14, 16, 18]
node: [14, 16, 18]
canvas_tag: [] # e.g. "v2.6.1"
name: ${{ matrix.canvas_tag}}, Node.js ${{ matrix.node }}, Windows
name: ${{ matrix.canvas_tag }}, Node.js ${{ matrix.node }}, Windows
runs-on: windows-latest
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
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ 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)
* Use the latest Windows runner image in the GitHub Actions workflows. (#2231)
* Stop testing on EoL (End-of-Life) Node.js versions (v10 and v12). (#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)
### Added
* Added string tags to support class detection
### Fixed
Expand Down

0 comments on commit 03457be

Please sign in to comment.