-
Notifications
You must be signed in to change notification settings - Fork 0
117 lines (96 loc) · 2.86 KB
/
Copy pathpull_request.yml
File metadata and controls
117 lines (96 loc) · 2.86 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
name: Rust
on:
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
CARGO_TERM_VERBOSE: true
jobs:
check-fmt:
name: cargo fmt
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
lfs: true
- name: Add nightly rustfmt
run: |
rustup toolchain install nightly
rustup component add --toolchain nightly rustfmt
- name: cargo fmt
run: cargo +nightly fmt --check
check-clippy:
name: cargo clippy
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
lfs: true
- name: cargo clippy
run: cargo clippy --all-features --all-targets --verbose -- --deny warnings
# check-cargo-lock:
# name: Check Cargo.lock
# runs-on:
# - ubuntu-latest
# steps:
# - uses: actions/checkout@v6
# with:
# lfs: true
# - name: Give GitHub Actions access to private repos
# uses: webfactory/ssh-agent@v0.10.0
# with:
# ssh-private-key: ${{ secrets.WORKFLOW_PULL_KEY }}
#
# - name: Check Cargo.lock
# run: cargo update --locked
test:
name: cargo build and test
runs-on:
- ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
lfs: true
- name: Add wasm-pack
run: |
cargo install wasm-pack
- name: cargo build
run: cargo build --all-features
- name: cargo test
run: cargo test --all-features --verbose
## TODO: headless chrome tests suddenly broke between 2026-04-02 and 2026-04-07
# - name: wasm-pack test
# run: wasm-pack test --chrome --headless
- name: free some disk space
run: |
# Remove Java (JDKs)
sudo rm -rf /usr/lib/jvm
# Remove .NET SDKs
sudo rm -rf /usr/share/dotnet
# Remove Swift toolchain
sudo rm -rf /usr/share/swift
# Remove Haskell (GHC)
sudo rm -rf /usr/local/.ghcup
# Remove Julia
sudo rm -rf /usr/local/julia*
# Remove Android SDKs
sudo rm -rf /usr/local/lib/android
# Remove Azure CLI
sudo rm -rf /opt/az
# Remove PowerShell
sudo rm -rf /usr/local/share/powershell
# Remove CodeQL and other toolcaches
sudo rm -rf /opt/hostedtoolcache
docker system prune -af || true
docker builder prune -af || true
df -h
- name: cargo build important feature permutations
run: ./feat-permut.sh build
- name: cargo test important feature permutations
run: ./feat-permut.sh test
- name: wasm-pack build important feature permutations
run: ./feat-permut.sh wasm-build
# - name: wasm-pack test important feature permutations
# run: ./feat-permut.sh wasm-test