Skip to content

version 2.0.1

version 2.0.1 #33

Workflow file for this run

name: Compile binaries
on:
workflow_dispatch:
push:
tags:
- "v*"
jobs:
linux-x86:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
libc: [glibc, musl]
container:
image: ${{ format('ghcr.io/{0}-{1}:latest', github.repository, matrix.libc) }}
options: --user github
steps:
- name: Use Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Checkout skia-canvas
uses: actions/checkout@v4
- name: Build module
run: |
mkdir -p $CARGO_HOME/registry
chown -R github $CARGO_HOME/registry
make optimized
- name: Package module
run: |
npm test && npm run package
- name: Add to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run upload
linux-arm64:
runs-on: [self-hosted, linux, ARM64]
strategy:
fail-fast: false
matrix:
libc: [glibc, musl]
container:
image: ${{ format('ghcr.io/{0}-{1}:latest', github.repository, matrix.libc) }}
options: --user github
steps:
- name: Prepare workspace
run: |
rm -rf "$GITHUB_WORKSPACE"
mkdir -p "$GITHUB_WORKSPACE"
- name: Install rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
echo CARGO_TERM_COLOR=always >> $GITHUB_ENV
- name: Checkout skia-canvas
env:
SERVER: ${{ github.server_url }}
REPO: ${{ github.repository }}
REF: ${{ github.ref_name }}
run: |
git clone --depth 1 --branch $REF ${SERVER}/${REPO} .
- name: Build module
run: |
make optimized
- name: Package module
run: |
npm test && npm run package
- name: Add to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run upload
mac:
strategy:
fail-fast: false
matrix:
arch: [x86, arm64]
runs-on: ${{ matrix.arch == 'x86' && 'macos-13' || 'macos-14' }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 16
- name: Use Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Use Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Build module
env:
MACOSX_DEPLOYMENT_TARGET: 10.14
run: make optimized
- name: Package module
run: npm test && npm run package
- name: Add to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm run upload
windows-x86:
runs-on: windows-latest
steps:
- name: Enable long paths
run: git config --system core.longpaths true
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 16
- name: Use Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Use Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Build module
run: make optimized
- name: Package module
run: npm test && npm run package
- name: Add to release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npm config set script-shell bash
npm run upload