-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (88 loc) · 2.29 KB
/
build.yml
File metadata and controls
102 lines (88 loc) · 2.29 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: Build
on:
push:
branches:
- main
- dev
- release-*
- feat-*
- ci-*
- refactor-*
- fix-*
- test-*
paths:
- '.github/workflows/build.yml'
- '**/Cargo.toml'
- '**/*.rs'
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Clone project
uses: actions/checkout@v5
- name: Install Rust-nightly
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt, clippy
- name: Run clippy
run: |
cargo +nightly clippy --version
cargo +nightly clippy --all-features -- -D warnings
- name: Run fmt
run: |
cargo +nightly fmt --all -- --check
build_macos:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14, macos-15]
rust: [1.90.0]
steps:
- name: Clone project
id: checkout
uses: actions/checkout@v5
- name: Install Rust-stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- name: Build
run: |
cargo build --release --verbose
build_linux:
runs-on: ${{ matrix.runner }}
container:
image: ${{ matrix.image }}
strategy:
matrix:
build: [linux-x86_64, linux-aarch64]
include:
- build: linux-x86_64
runner: ubuntu-latest
image: ubuntu:20.04
target: x86_64-unknown-linux-gnu
- build: linux-aarch64
runner: ubuntu-24.04-arm
image: arm64v8/ubuntu:20.04
target: aarch64-unknown-linux-gnu
rust: [1.90.0]
fail-fast: false
steps:
- name: Clone project
id: checkout
uses: actions/checkout@v5
- name: Install dependencies silently
run: |
export DEBIAN_FRONTEND=noninteractive
apt update && apt install -y curl build-essential pkg-config
- name: Install Rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- name: Build
run: |
cargo build --release --verbose --target ${{ matrix.target }}