-
Notifications
You must be signed in to change notification settings - Fork 16
124 lines (109 loc) · 3.15 KB
/
Copy pathpr.yml
File metadata and controls
124 lines (109 loc) · 3.15 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: Pull Request CI
on:
pull_request:
paths-ignore:
- "**.md"
- "assets/**"
- "install.sh"
env:
CARGO_TERM_COLOR: always
permissions:
contents: read
# NOTE: always set shell: bash, otherwise on Windows there might be problems!
jobs:
format-check:
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
with:
persist-credentials: false
- name: Install Rust
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: "stable"
components: "rustfmt"
- name: Format check
run: make format-check
build-and-test:
name: ${{ matrix.job.os }}
needs: [ format-check ]
runs-on: ${{ matrix.job.runner }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
job:
- os: linux
runner: ubuntu-24.04
- os: macos-arm64
runner: macos-15
- os: windows
runner: windows-2025-vs2026
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
with:
persist-credentials: false
- name: Install Rust
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: "stable"
components: "clippy"
- name: Build
shell: bash
run: make build
- name: Lint
shell: bash
run: make lint
- name: Tests
shell: bash
run: make test
check-other-targets:
name: ${{ matrix.job.os }}
needs: [ format-check ]
runs-on: ${{ matrix.job.runner }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
job:
- os: linux-musl
runner: ubuntu-24.04
target: x86_64-unknown-linux-musl
use-cross: true
- os: linux-armv6
runner: ubuntu-24.04
target: arm-unknown-linux-gnueabihf
use-cross: true
- os: linux-arm64
runner: ubuntu-24.04
target: aarch64-unknown-linux-gnu
use-cross: true
- os: macos-x86_64
runner: macos-15-intel
target: x86_64-apple-darwin
use-cross: false
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
with:
persist-credentials: false
- name: Install Rust
uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
with:
toolchain: "stable"
targets: "${{ matrix.job.target }}"
components: "clippy"
- uses: taiki-e/install-action@873c7452cadb7c034694a1282227095d93fbdf92 # 2.79.14
if: matrix.job.use-cross == true
with:
tool: cross
- name: Setup build tools
if: matrix.job.use-cross == true
shell: bash
run: echo "CARGO_BIN=cross" >>$GITHUB_ENV
- name: Export cargo target
shell: bash
run: echo "CARGO_TARGET=${{ matrix.job.target }}" >>$GITHUB_ENV
- name: Build
shell: bash
run: make build