-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (65 loc) · 2.54 KB
/
Copy pathtests.yml
File metadata and controls
78 lines (65 loc) · 2.54 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
name: Tests
on:
pull_request:
branches: [master, main, feat/*, rc/*]
workflow_dispatch:
permissions:
# Least-privilege: checkout + local tool execution only.
contents: read
env:
CARGO_TERM_COLOR: always
STELLAR_VERSION: '27.0.0'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build-and-test:
name: Build & Test
runs-on: self-hosted
# sccache caches per-crate compilations under $HOME (persistent on the
# self-hosted runner), shared with the other self-hosted jobs and warming
# cold runners. CARGO_INCREMENTAL=0 is required for sccache to cache.
env:
RUSTC_WRAPPER: sccache
CARGO_INCREMENTAL: '0'
SCCACHE_CACHE_SIZE: 20G
steps:
- uses: actions/checkout@v7
with:
# Persistent self-hosted runners keep $HOME (cargo registry, git, and
# installed tool binaries) and the workspace between runs. Skip the
# default clean so the next step controls exactly what is removed.
clean: false
# Full clean, including target/: sccache already provides the per-crate
# compilation cache, and a preserved target/ is a poisoning vector on
# shared runners — a cancelled in-place cargo-mutants job can leave a
# mutant-built rlib whose mtime beats the (unchanged) source file, and
# cargo will happily keep linking it into ordinary test builds.
- name: Reset workspace
run: |
git reset --hard
git clean -ffdx
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: '1.95'
targets: wasm32v1-none
components: clippy, rustfmt
- name: Install stellar-cli
# Reuses the platform-aware idempotent helper. Version comes from the
# workflow env. stellar-cli is pinned independently of the soroban-sdk
# crate (`=26.1.0`): CLI 27.x builds those contracts fine and the wasm
# size budget is verified against it.
run: bash .github/scripts/install-stellar-cli.sh
- name: Install sccache (prebuilt)
uses: taiki-e/install-action@v2
with:
tool: sccache
- name: Build deploy artifacts and WASM size budget
run: make wasm-size-check
- name: Run tests
run: cargo test --workspace
- name: Clippy (workspace)
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Clippy (fuzz crate, workspace-excluded)
run: make clippy-fuzz