From 25f739c2834ff069bd79f426cf8ac85253679d13 Mon Sep 17 00:00:00 2001 From: Mohammed Keyvanzadeh Date: Tue, 18 Apr 2023 14:57:19 +0330 Subject: [PATCH] tools: update GitHub Actions workflows --- .github/workflows/ci.yaml | 19 +++++++++------ .github/workflows/prebuild.yaml | 41 +++++++++++++++------------------ CHANGELOG.md | 8 ++++++- 3 files changed, 38 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 613c91740..15a42e711 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,10 +7,10 @@ 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] @@ -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] @@ -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] @@ -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 + chexk-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 a112eef87..8ae52e8dc 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] 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] 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] 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 b3ba9a13b..19b72327e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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