Skip to content

Commit

Permalink
if: runner.os == 'Linux'
Browse files Browse the repository at this point in the history
  • Loading branch information
cclauss authored Jul 16, 2024
1 parent f0fa776 commit b136f8d
Showing 1 changed file with 12 additions and 48 deletions.
60 changes: 12 additions & 48 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,70 +8,34 @@ on:
- ".github/workflows/prebuild.yaml"

jobs:
Linux:
Test:
name: Test on Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [18, 20, 22]
os: [macos-13, macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v4
- name: Install Dependencies
- name: Install Linux Dependencies
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install -y libcairo2-dev libjpeg-dev libpango1.0-dev libgif-dev librsvg2-dev
- name: Install
run: npm install --build-from-source
- name: Test
run: npm test

Windows:
name: Test on Windows
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
node: [18, 20, 22]
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v4
- name: Install Dependencies
sudo apt install -y libcairo2-dev libgif-dev libjpeg-dev libpango1.0-dev librsvg2-dev
- name: Install macOS Dependencies
if: runner.os == 'macOS'
run: brew install cairo giflib jpeg libpng librsvg pango pkg-config
- name: Install Windows Dependencies
if: runner.os == 'Windows'
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
# npm install -g node-gyp@8
# npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
- name: Install
run: npm install --build-from-source
- name: Test
run: npm test

macOS:
name: Test on macOS
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-latest]
node: [18, 20, 22] # Node 18 on macOS has node-gyp < v10 which is incompatible with Python 3.12
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
brew update
brew install cairo giflib jpeg libpng librsvg pango pkg-config
pip install setuptools
.\libjpeg.exe /S
- name: Install
run: npm install --build-from-source
- name: Test
Expand Down

0 comments on commit b136f8d

Please sign in to comment.