macos workflow fix #80
Workflow file for this run
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: Release | |
on: [push, pull_request] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
CARGO_TERM_COLOR: always | |
jobs: | |
windows: | |
runs-on: windows-latest | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build | |
run: BQN_WASM="D:/a/beacon/beacon/BQN.wasm" cargo build --release --no-default-features --features=bqnwasm | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: target/release/beacon_windows.exe | |
linux: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build bqn shared lib | |
run: | | |
git clone https://github.com/dzaima/CBQN | |
cd CBQN | |
FFI=0 make shared-o3 | |
mv libcbqn.so ../ | |
- name: Build | |
run: | | |
RUSTFLAGS="-L ${{ github.workspace }}" LD_LIBRARY_PATH="${{ github.workspace }}/libcbqn.so" cargo build --release | |
mv target/release/beacon ./beacon_linux | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ./beacon_linux | |
macos: | |
runs-on: macos-11 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install ARM target | |
run: | | |
rustup update && rustup target add aarch64-apple-darwin | |
cargo install cargo-bundle | |
- name: Build ARM | |
run: RUSTFLAGS="-L ${{ github.workspace }}" LD_LIBRARY_PATH="${{ github.workspace }}/libcbqn.dylib" cargo bundle --release --target=aarch64-apple-darwin | |
- name: Rename | |
run: | | |
mv target/aarch64-apple-darwin/release/bundle/osx/Beacon.app ./Beacon_macos.app | |
ls . | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: ./Beacon_macos.app |