Rust #15
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: Rust | |
on: | |
workflow_dispatch | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
default: true | |
override: true | |
- name: Install necessary dependencies | |
run: | | |
brew install pkg-config | |
brew install glib | |
brew install [email protected] | |
- name: Install required target | |
run: rustup target add aarch64-apple-darwin | |
- name: Build project | |
run: | | |
export CFLAGS="-D__ARM_ARCH__" | |
export CC=clang | |
export RUST_BACKTRACE=1 | |
cargo build --verbose --release --target=aarch64-apple-darwin | |
- name: Upload a Build Artifact (MacOS M1) | |
uses: actions/[email protected] | |
with: | |
name: Build MacOS | |
path: ./target/aarch64-apple-darwin/release/proxyl | |
retention-days: 1 | |