-
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
Showing
2 changed files
with
59 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,56 @@ | ||
name: Build Executables | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [windows-latest, macos-latest] | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
components: rustfmt, clippy | ||
|
||
- name: Setup targed for windows | ||
if: matrix.os == 'windows-latest' | ||
run: | ||
rustup target add wasm32-unknown-unknown | ||
|
||
- name: Setup trunk for windows | ||
if: matrix.os == 'windows-latest' | ||
uses: cargo-bins/cargo-binstall@main | ||
with: | ||
tool: install trunk | ||
|
||
- name: Build project for Windows | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
make build-win | ||
- name: Build project macOS | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
make build-mac | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: my-rust-app-${{ matrix.os }} | ||
path: | | ||
target/release/ | ||
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