This repository was archived by the owner on Sep 8, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
87 lines (73 loc) · 2.8 KB
/
Copy pathci.yml
File metadata and controls
87 lines (73 loc) · 2.8 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
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
tags: ["*"]
jobs:
rust:
runs-on: ubuntu-latest
steps:
- name: Setup | Cancel previous runs
uses: styfle/cancel-workflow-action@0.12.1
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Check disk space before cleanup
run: df -h
- name: Free disk space
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
sudo docker builder prune -a --force
- name: Check disk space after cleanup
run: df -h
- name: Setup | Apt packages
run: sudo apt-get update
- name: Setup | Rust toolchain from rust-toolchain.toml
run: |
rustup toolchain install
rustup component add llvm-tools-preview
- name: Setup | Rust cache
uses: Swatinem/rust-cache@v2
- name: Setup | Install cargo-nextest
uses: taiki-e/install-action@nextest
- name: Setup | Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Setup | Just
uses: taiki-e/install-action@just
- name: Test | CI Pipeline
run: just ci
# All four release components ship as static musl binaries so they load on
# any Linux regardless of the host glibc version. Build each package
# individually (as goreleaser does, so feature unification matches the
# release) and assert every binary is fully static.
rust-musl-static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup | Rust toolchain from rust-toolchain.toml
run: rustup toolchain install
- uses: Swatinem/rust-cache@v2
- name: Install musl toolchain
run: sudo apt-get update && sudo apt-get install -y musl-tools cmake
- name: Build release packages for musl and assert static linkage
env:
CC_x86_64_unknown_linux_musl: musl-gcc
CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER: musl-gcc
run: |
for entry in \
doublezero-solana-cli:doublezero-solana \
doublezero-contributor-rewards:doublezero-contributor-rewards \
doublezero-ledger-sentinel:doublezero-sentinel \
doublezero-solana-validator-debt:doublezero-solana-validator-debt
do
package="${entry%%:*}"
binary="target/x86_64-unknown-linux-musl/release/${entry##*:}"
cargo build --release --package "$package" --target x86_64-unknown-linux-musl
file "$binary"
if ! file "$binary" | grep -qE "statically linked|static-pie linked"; then
echo "::error::$binary is not statically linked"
exit 1
fi
done