Build and deploy prebuilt binaries #9
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: Build and Precompile Binaries | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
components: rustfmt, clippy | |
- name: Install dependencies | |
run: sudo apt-get install -y musl-tools | |
- name: Install cargo-binstall | |
run: cargo install cargo-binstall | |
- name: Build for ${{ matrix.target }} | |
run: | | |
rustup target add ${{ matrix.target }} | |
cargo build --release --target ${{ matrix.target }} | |
- name: Upload binaries | |
uses: actions/upload-artifact@v2 | |
with: | |
name: binaries-${{ matrix.target }} | |
path: target/${{ matrix.target }}/release/ |