Repository navigation
238 lines (189 loc) · 8.14 KB
/
Copy pathrust.yml
File metadata and controls
238 lines (189 loc) · 8.14 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
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
name: Rust CI
on:
push:
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
windows:
name: Windows build and tests
runs-on: windows-latest
timeout-minutes: 45
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install stable Rust
run: rustup toolchain install stable --profile minimal --component rustfmt
- name: Check formatting
run: cargo +stable fmt --all -- --check
- name: Check cross-check formatting
run: cargo +stable fmt --manifest-path tools/rust-ton-crosscheck/Cargo.toml -- --check
- name: Run unit tests
run: cargo +stable test --locked
- name: Run independent Rust TON address cross-check
run: cargo +stable run --manifest-path tools/rust-ton-crosscheck/Cargo.toml --release --locked
- name: Run strict Clippy
run: cargo +stable clippy --all-targets --locked -- -D warnings
- name: Check CPU-only configuration
run: cargo +stable check --no-default-features --features cpu --locked
- name: Check default configuration
run: cargo +stable check --locked
- name: Build release executable
run: cargo +stable build --release --locked
windows-arm64:
name: Windows ARM64 release build
runs-on: windows-11-arm
timeout-minutes: 45
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install stable Rust and ARM64 target
run: rustup toolchain install stable --profile minimal --target aarch64-pc-windows-msvc
- name: Build Windows ARM64 release executable
run: cargo +stable build --release --locked --target aarch64-pc-windows-msvc
linux:
name: Linux build and tests
runs-on: ubuntu-24.04
timeout-minutes: 45
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install OpenSSL build dependencies
run: sudo apt-get update && sudo apt-get install -y pkg-config libssl-dev
- name: Install stable Rust
run: rustup toolchain install stable --profile minimal --component rustfmt
- name: Check formatting
run: cargo +stable fmt --all -- --check
- name: Run unit tests
run: cargo +stable test --locked
- name: Check CPU-only configuration
run: cargo +stable check --no-default-features --features cpu --locked
- name: Check default GPU configuration
run: cargo +stable check --locked
- name: Build release executable
run: cargo +stable build --release --locked
linux-arm64:
name: Linux ARM64 build and tests
runs-on: ubuntu-24.04-arm
timeout-minutes: 45
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install OpenSSL build dependencies
run: sudo apt-get update && sudo apt-get install -y pkg-config libssl-dev
- name: Install stable Rust
run: rustup toolchain install stable --profile minimal --component rustfmt
- name: Check formatting
run: cargo +stable fmt --all -- --check
- name: Run unit tests
run: cargo +stable test --locked
- name: Check CPU-only configuration
run: cargo +stable check --no-default-features --features cpu --locked
- name: Check default GPU configuration
run: cargo +stable check --locked
- name: Build release executable
run: cargo +stable build --release --locked
linux-additional-targets:
name: Linux cross-target build (${{ matrix.target }})
runs-on: ubuntu-24.04
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
include:
- target: armv7-unknown-linux-gnueabihf
cargo_target: ARMV7_UNKNOWN_LINUX_GNUEABIHF
linker: arm-linux-gnueabihf-gcc
packages: gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
- target: riscv64gc-unknown-linux-gnu
cargo_target: RISCV64GC_UNKNOWN_LINUX_GNU
linker: riscv64-linux-gnu-gcc
packages: gcc-riscv64-linux-gnu g++-riscv64-linux-gnu libc6-dev-riscv64-cross
- target: x86_64-unknown-linux-musl
cargo_target: X86_64_UNKNOWN_LINUX_MUSL
linker: musl-gcc
packages: musl-tools
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install target linker
run: |
sudo apt-get update
sudo apt-get install -y ${{ matrix.packages }}
echo "CARGO_TARGET_${{ matrix.cargo_target }}_LINKER=${{ matrix.linker }}" >> "$GITHUB_ENV"
case "${{ matrix.target }}" in
armv7-unknown-linux-gnueabihf)
echo "CC_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-gcc" >> "$GITHUB_ENV"
echo "AR_armv7_unknown_linux_gnueabihf=arm-linux-gnueabihf-ar" >> "$GITHUB_ENV"
;;
riscv64gc-unknown-linux-gnu)
echo "CC_riscv64gc_unknown_linux_gnu=riscv64-linux-gnu-gcc" >> "$GITHUB_ENV"
echo "AR_riscv64gc_unknown_linux_gnu=riscv64-linux-gnu-ar" >> "$GITHUB_ENV"
;;
x86_64-unknown-linux-musl)
echo "CC_x86_64_unknown_linux_musl=musl-gcc" >> "$GITHUB_ENV"
echo "AR_x86_64_unknown_linux_musl=ar" >> "$GITHUB_ENV"
;;
esac
- name: Install stable Rust and target
run: rustup toolchain install stable --profile minimal --target "${{ matrix.target }}"
- name: Build release executable for Linux target
run: cargo +stable build --release --locked --target "${{ matrix.target }}" --features cross-openssl
linux-arm64-musl:
name: Linux ARM64 musl cross-target build
runs-on: ubuntu-24.04-arm
timeout-minutes: 45
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install musl linker
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_MUSL_LINKER=musl-gcc" >> "$GITHUB_ENV"
echo "CC_aarch64_unknown_linux_musl=musl-gcc" >> "$GITHUB_ENV"
echo "AR_aarch64_unknown_linux_musl=ar" >> "$GITHUB_ENV"
- name: Install stable Rust and ARM64 musl target
run: rustup toolchain install stable --profile minimal --target aarch64-unknown-linux-musl
- name: Build release executable for ARM64 musl
run: cargo +stable build --release --locked --target aarch64-unknown-linux-musl --features cross-openssl
macos:
name: macOS build and tests (Metal compile coverage)
runs-on: macos-latest
timeout-minutes: 45
steps:
- name: Check out source
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install OpenSSL build dependencies
run: brew install openssl@3 pkg-config
- name: Configure OpenSSL
run: |
echo "OPENSSL_DIR=$(brew --prefix openssl@3)" >> "$GITHUB_ENV"
echo "PKG_CONFIG_PATH=$(brew --prefix openssl@3)/lib/pkgconfig" >> "$GITHUB_ENV"
- name: Install stable Rust
run: rustup toolchain install stable --profile minimal --component rustfmt
- name: Check formatting
run: cargo +stable fmt --all -- --check
- name: Run unit tests
run: cargo +stable test --locked
- name: Check CPU-only configuration
run: cargo +stable check --no-default-features --features cpu --locked
- name: Check macOS GPU configuration
run: cargo +stable check --locked
- name: Build release executable with Metal support
run: cargo +stable build --release --locked