Update Makefile #102
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 macOS | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
DYN_NAME: libflx_rs_core | |
EXT: .dylib | |
NEW_NAME: flx-rs | |
jobs: | |
build: | |
runs-on: macos-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-apple-darwin | |
- aarch64-apple-darwin | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Rust | |
uses: actions-rust-lang/[email protected] | |
- name: Install LLVM and Clang | |
uses: KyleMayes/install-llvm-action@v1 | |
with: | |
version: "14.0" | |
- name: Build binaries | |
run: | | |
cd core | |
rustup target install ${{ matrix.target }} | |
cargo build --release --target ${{ matrix.target }} | |
- name: Rename dynamic module | |
run: mv core/target/${{ matrix.target }}/release/${{ env.DYN_NAME }}${{ env.EXT }} core/target/${{ matrix.target }}/release/${{ env.NEW_NAME }}.${{ matrix.target }}${{ env.EXT }} | |
- name: Upload binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.NEW_NAME }}.${{ matrix.target }} | |
path: core/target/${{ matrix.target }}/release/${{ env.NEW_NAME }}.${{ matrix.target }}${{ env.EXT }} |