ci: only run tests on supported platforms by gh

This commit is contained in:
Théo Monnom
2023-01-13 00:37:30 +01:00
parent c267c82a58
commit 22c6f67226
3 changed files with 54 additions and 8 deletions
+49
View File
@@ -0,0 +1,49 @@
name: Builds
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
strategy:
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: windows-latest
target: aarch64-pc-windows-msvc
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
name: Build (${{ matrix.target }})
runs-on: ${{ matrix.os }}
steps:
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust toolchain
run: |
rustup update --no-self-update stable
rustup target add ${{ matrix.target }}
- uses: actions/checkout@v3
with:
submodules: true
- name: Build
run: cargo build --release --verbose --target ${{ matrix.target }}
- name: Build examples
working-directory: examples
run: cargo build --release --verbose --target ${{ matrix.target }}