Skip to content

Commit

Permalink
Add ci for mac
Browse files Browse the repository at this point in the history
  • Loading branch information
guibeira committed Nov 24, 2024
1 parent 5b26437 commit 4bc107d
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/build.yml
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/
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ build:
build-mac:
make build && ./scripts/make_bundle_mac.sh


build-win:
rustup target add wasm32-unknown-unknown && cd front && trunk build --release && cd .. && cargo build --release

0 comments on commit 4bc107d

Please sign in to comment.