-
-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (43 loc) · 1.19 KB
/
cli-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
name: Run Tests
on:
push:
branches: [v2]
pull_request:
branches: [v2]
jobs:
test:
name: Build
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- name: linux-amd64
runner: ubuntu-latest
target: x86_64-unknown-linux-gnu
- name: win-amd64
runner: windows-latest
target: x86_64-pc-windows-msvc
- name: macos-amd64
runner: macos-latest
target: x86_64-apple-darwin
- name: macos-arm64
runner: macos-latest
target: aarch64-apple-darwin
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: "${{ matrix.target }}"
- name: Add Rust target
run: rustup target add ${{ matrix.target }}
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Build CLI
run: cargo build --verbose --locked --release --target ${{ matrix.target }}
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: code
path: /home/runner/work/odict