forked from ceifa/steamworks.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d23b91f
commit 299b7fc
Showing
1 changed file
with
97 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,97 @@ | ||
name: Build | ||
|
||
on: workflow_dispatch | ||
|
||
env: | ||
DEBUG: 'napi:*' | ||
MACOSX_DEPLOYMENT_TARGET: '10.13' | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
|
||
- name: Check formatting | ||
run: cargo fmt --all --check | ||
|
||
- name: Clippy | ||
run: cargo clippy | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Setup Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
targets: x86_64-pc-windows-msvc, x86_64-unknown-linux-gnu | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- run: cargo install cargo-xwin | ||
|
||
- name: Node install | ||
run: npm ci | ||
|
||
- name: Build Linux | ||
run: npm run build -- --target x86_64-unknown-linux-gnu | ||
|
||
- name: Build Windows | ||
run: npm run build -- --target x86_64-pc-windows-msvc | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: OS specific binaries | ||
path: dist | ||
if-no-files-found: error | ||
|
||
build-mac: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20.x | ||
|
||
- name: Setup Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
with: | ||
toolchain: stable | ||
targets: x86_64-apple-darwin, aarch64-apple-darwin | ||
|
||
- uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Node install | ||
run: npm ci | ||
|
||
- name: Build Mac x64 | ||
run: npm run build -- --target x86_64-apple-darwin | ||
|
||
- name: Build Mac arm64 | ||
run: npm run build -- --target aarch64-apple-darwin | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: OS specific binaries | ||
path: dist | ||
if-no-files-found: error |