1

Use matrix for builds

This commit is contained in:
Evan Pratten 2023-08-03 12:18:09 -04:00
parent 40a9f7efda
commit 0d627d430b
2 changed files with 29 additions and 13 deletions

View File

@ -3,30 +3,46 @@ name: Build
on: on:
pull_request: pull_request:
push: push:
paths: paths:
- '.github/workflows/build.yml' - ".github/workflows/build.yml"
- '**/Cargo.toml' - "**/Cargo.toml"
- '**/Cargo.lock' - "**/Cargo.lock"
- '**/src/*' - "**/src/*"
jobs: jobs:
build_and_test: build_and_test:
name: Run Tests name: Run Tests
# Use a build matrix to run this job targeting all supported platforms
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
# All supported targets
target:
- x86_64-unknown-linux-musl
- aarch64-unknown-linux-musl
# All supported Rust channels
rust_channel:
- stable
# Common build steps
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1 - uses: actions-rs/toolchain@v1
with: with:
toolchain: stable toolchain: ${{ matrix.rust_channel }}
override: true
- name: Compile - name: Compile
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
use-cross: true
command: build command: build
args: --release args: --release --target ${{ matrix.target }}
- name: Run Tests - name: Run Tests
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
use-cross: true
command: test command: test
args: --all --release args: --all --release --target ${{ matrix.target }}

View File

@ -1,5 +1,5 @@
//! This is a placeholder for a future 6over4 implementation
#[tokio::main] #[tokio::main]
pub async fn main(){ pub async fn main() {
println!("You did it! You found the incomplete binary :)");
} }