workflows: work around missing node-canvas binaries for node 18

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-08-31 23:36:43 +02:00
parent cfb30b700c
commit 7bcb96a668
8 changed files with 55 additions and 0 deletions
+7
View File
@@ -32,6 +32,13 @@ jobs:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
# Needed until there are pre-built binaries of node-canvas for Node 18
- name: node-canvas dependencies
if: matrix.node-version == '18.x'
run: |
sudo apt update
sudo apt install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.6
with:
+2
View File
@@ -25,6 +25,8 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
# Needed until there are pre-built binaries for Node 18
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.6
with:
+8
View File
@@ -66,6 +66,14 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
# Needed until there are pre-built binaries of node-canvas for Node 18
- name: node-canvas dependencies
if: matrix.node-version == '18.x'
run: |
sudo apt update
sudo apt install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.6
with:
+6
View File
@@ -51,6 +51,12 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
# Needed until there are pre-built binaries of node-canvas for Node 18
- name: node-canvas dependencies
if: matrix.node-version == '18.x'
run: |
sudo apt update
sudo apt install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.6
with:
@@ -28,6 +28,13 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
# Needed until there are pre-built binaries of node-canvas for Node 18
- name: node-canvas dependencies
if: matrix.node-version == '18.x'
run: |
sudo apt update
sudo apt install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- name: install dependencies
run: yarn install --immutable
+10
View File
@@ -52,6 +52,16 @@ jobs:
uses: microsoft/setup-msbuild@v1.0.3
- name: setup chrome
uses: browser-actions/setup-chrome@latest
# Needed until there are pre-built binaries of node-canvas for Node 18
- name: node-canvas dependencies
if: matrix.node-version == '18.x'
# From https://github.com/Automattic/node-canvas/blob/master/.github/workflows/ci.yaml
run: |
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
- name: yarn install
run: yarn install --immutable
+6
View File
@@ -27,6 +27,12 @@ jobs:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
# Needed until there are pre-built binaries of node-canvas for Node 18
- name: node-canvas dependencies
if: matrix.node-version == '18.x'
run: |
sudo apt update
sudo apt install -y build-essential libcairo2-dev libpango1.0-dev libjpeg-dev libgif-dev librsvg2-dev
- name: yarn install
uses: backstage/actions/yarn-install@v0.5.6
with:
+9
View File
@@ -32,6 +32,15 @@ jobs:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/ # Needed for auth
# Needed until there are pre-built binaries of node-canvas for Node 18
- name: node-canvas dependencies
if: matrix.node-version == '18.x'
# From https://github.com/Automattic/node-canvas/blob/master/.github/workflows/ci.yaml
run: |
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
# Windows file operation slowness means there's no point caching this
- name: yarn install
run: yarn install --immutable