-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.51 KB
/
rust.yaml
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
46
47
48
49
50
51
52
53
54
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust and Test
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
cargo test --verbose
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
target:
[
# aarch64-unknown-linux-gnu,
x86_64-unknown-linux-gnu,
]
include:
# - os: ubuntu-latest
# target: aarch64-unknown-linux-gnu
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- name: Install dependencies on Linux
run: |
sudo apt-get update
sudo apt-get install gcc-aarch64-linux-gnu
- name: Install Rust and Build
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source $HOME/.cargo/env
rustup target add ${{ matrix.target }}
cargo build --release --target ${{ matrix.target }}
strip target/${{ matrix.target }}/release/authnz-rs
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.target }}-build
path: target/${{ matrix.target }}/release/authnz-rs