forked from samizdatco/skia-canvas
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add custom build workflow for alternate deployment.
- Loading branch information
Showing
1 changed file
with
86 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
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/skia-canvas-{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: airvzxf/ftp-deployment-action@latest | ||
with: | ||
server: ${{ secrets.FTP_SERVER }} | ||
user: ${{ secrets.FTP_USER }} | ||
password: ${{ secrets.FTP_PASS }} | ||
ftp_use_feat: true | ||
local_dir: "./skia-canvas/build/stage/tpp/" | ||
remote_dir: "./" | ||
|
||
|
||
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: airvzxf/ftp-deployment-action@latest | ||
with: | ||
server: ${{ secrets.FTP_SERVER }} | ||
user: ${{ secrets.FTP_USER }} | ||
password: ${{ secrets.FTP_PASS }} | ||
ftp_use_feat: true | ||
local_dir: "./build/stage/tpp/" | ||
remote_dir: "./" | ||
|