Add ci for mac #7
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: 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 && cargo install --locked wasm-bindgen-cli | |
- name: Setup trunk for windows | |
if: matrix.os == 'windows-latest' | |
uses: cargo-bins/cargo-binstall@main | |
with: | |
tool: 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/ | |