diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c21812da6..732a89e58 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,7 +10,7 @@ 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] @@ -18,6 +18,7 @@ jobs: - uses: actions/setup-node@v3 with: node-version: ${{ matrix.node }} + check-latest: true - uses: actions/checkout@v3 - name: Install Dependencies run: | @@ -30,7 +31,7 @@ jobs: Windows: name: Test on Windows - runs-on: windows-2019 + runs-on: windows-2022 strategy: matrix: node: [10, 12, 14, 16, 18, 20] @@ -38,12 +39,14 @@ jobs: - 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,7 +57,7 @@ jobs: macOS: name: Test on macOS - runs-on: macos-latest + runs-on: macos-12 strategy: matrix: node: [10, 12, 14, 16, 18, 20] @@ -62,6 +65,7 @@ jobs: - 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 diff --git a/.github/workflows/prebuild.yaml b/.github/workflows/prebuild.yaml index 784069e06..fa72e946f 100644 --- a/.github/workflows/prebuild.yaml +++ b/.github/workflows/prebuild.yaml @@ -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"); diff --git a/CHANGELOG.md b/CHANGELOG.md index e0768f8c3..ad66c7cb1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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