burrow/.github/workflows/build-rust.yml
Conrad Kramer b37086e8f6 Add debugging task for VS Code
This allows you to launch the command line program into a debugger. This
commit also tweaks the CI and fixes a small error in the build script.
2023-04-16 21:19:46 -04:00

60 lines
1.6 KiB
YAML

name: Rust Build
on:
push:
branches:
- main
pull_request:
branches:
- "*"
jobs:
build:
name: Build Crate (${{ matrix.platform }})
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
platform: Linux
packages:
- gcc-aarch64-linux-gnu
targets:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
- os: macos-12
platform: macOS
targets:
- x86_64-apple-darwin
- aarch64-apple-darwin
- aarch64-apple-ios
- aarch64-apple-ios-sim
- x86_64-apple-ios
- os: windows-2022
platform: Windows
targets:
- x86_64-pc-windows-msvc
- aarch64-pc-windows-msvc
runs-on: ${{ matrix.os }}
env:
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer
CARGO_INCREMENTAL: 0
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
RUST_BACKTRACE: short
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ssh-key: ${{ secrets.DEPLOY_KEY }}
submodules: recursive
- name: Install Packages
if: matrix.os == 'ubuntu-latest'
shell: bash
run: sudo apt-get install -y ${{ join(matrix.packages, ' ') }}
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
targets: ${{ join(matrix.targets, ', ') }}
- name: Build
shell: bash
run: cargo build --verbose --workspace --all-features --target ${{ join(matrix.targets, ' --target ') }}