Compile and upload binaries #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Compile and upload binaries | |
on: | |
workflow_dispatch: | |
jobs: | |
linux-x86: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
libc: [glibc, musl] | |
container: | |
image: ${{ format('ghcr.io/samizdatco-{0}:latest', matrix.libc) }} | |
steps: | |
- 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 | |
- name: Checkout skia-canvas | |
uses: actions/checkout@v2 | |
with: | |
path: skia-canvas | |
- name: Build module | |
run: | | |
cd skia-canvas | |
npm ci --ignore-scripts | |
npm run build -- --release --features vulkan,window,skia-safe/embed-freetype | |
- name: Package module | |
run: | | |
cd skia-canvas | |
npm test && npm run package | |
- name: Upload | |
uses: sand4rt/ftp-deployer@v1.7 | |
with: | |
host: ${{ secrets.FTP_SERVER }} | |
username: ${{ secrets.FTP_USER }} | |
password: ${{ secrets.FTP_PASS }} | |
local_folder: ./skia-canvas/build/stage/tpp/ | |
remote_folder: ./ | |
mac-x86: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Use Rust | |
uses: actions-rs/toolchain@v1.0.6 | |
with: | |
toolchain: stable | |
- name: Build module | |
env: | |
MACOSX_DEPLOYMENT_TARGET: 10.13 | |
run: | | |
npm ci --ignore-scripts | |
npm run build -- --release --features metal,window | |
- name: Package module | |
run: | | |
npm test && npm run package | |
- name: Upload | |
uses: sand4rt/ftp-deployer@v1.7 | |
with: | |
host: ${{ secrets.FTP_SERVER }} | |
username: ${{ secrets.FTP_USER }} | |
password: ${{ secrets.FTP_PASS }} | |
local_folder: ./build/stage/tpp/ | |
remote_folder: ./ | |