-
Notifications
You must be signed in to change notification settings - Fork 33
45 lines (42 loc) · 1.19 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Based on https://github.com/houseabsolute/ubi
name: Build
on: [push, pull_request]
env:
RUST_BACKTRACE: 1
jobs:
test:
name: ${{ matrix.platform.os_name }} with Rust ${{ matrix.toolchain }}
runs-on: ${{ matrix.platform.os }}
strategy:
fail-fast: false
matrix:
platform:
- os_name: Linux-x86_64
os: ubuntu-20.04
target: x86_64-unknown-linux-gnu
- os_name: Windows-x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
- os_name: macOS-x86_64
os: macOS-latest
target: x86_64-apple-darwin
- os_name: macOS-aarch64
os: macOS-latest
target: aarch64-apple-darwin
toolchain:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v3
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
with:
key: "v2"
- name: Build
uses: houseabsolute/actions-rust-cross@v0
with:
command: "build"
target: ${{ matrix.platform.target }}
toolchain: ${{ matrix.toolchain }}
args: "--locked --release"