-
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (84 loc) · 3.94 KB
/
Copy pathrust-ci.yml
File metadata and controls
102 lines (84 loc) · 3.94 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
# SPDX-License-Identifier: MPL-2.0
# Rust CI — thin wrapper calling the shared estate reusable in
# hyperpolymath/standards. Configure once, propagate everywhere.
# See: docs/CI-REUSABLE-WORKFLOWS.adoc in standards.
name: Rust CI
on:
push:
branches: [main, master]
pull_request:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
rust-ci:
uses: hyperpolymath/standards/.github/workflows/rust-ci-reusable.yml@412a7031577112b31ee287cc6060179d638d6500
no-default-features:
name: Cargo build + test (ephapax-cli, --no-default-features)
runs-on: ubuntu-latest
timeout-minutes: 20
if: hashFiles('Cargo.toml') != ''
# Proves ephapax can be built and tested with zero git dep on the
# sibling `hyperpolymath/typed-wasm` repo. Enforces the estate
# architectural rule that typed-wasm must be removable from either
# language with no impact. See `src/ephapax-wasm/src/ownership.rs`
# for the in-tree codec that makes this possible.
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c # stable
with:
toolchain: stable # required when SHA-pinned (no rust-toolchain.toml in repo)
- name: Cache cargo registry and build
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
with:
key: no-default-features
- name: Cargo build -p ephapax-cli --no-default-features
run: cargo build -p ephapax-cli --no-default-features
- name: Cargo test -p ephapax-cli --no-default-features
run: cargo test -p ephapax-cli --no-default-features
- name: Write summary
if: always()
run: |
echo "## --no-default-features build" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "Proves the typed-wasm-verify feature is genuinely optional:" >> "$GITHUB_STEP_SUMMARY"
echo "ephapax-cli builds + tests with zero git dep on the" >> "$GITHUB_STEP_SUMMARY"
echo "hyperpolymath/typed-wasm repo." >> "$GITHUB_STEP_SUMMARY"
wasm-validate:
name: wasm-tools validate (emitted modules)
runs-on: ubuntu-latest
timeout-minutes: 20
if: hashFiles('Cargo.toml') != ''
# Structurally validates every module ephapax emits for the fixture
# corpus (`just validate-wasm`), catching codegen that produces an
# invalid wasm binary before it can land. Mirrors the in-process
# wasmparser assertion in the wasm_e2e tests and the CLI's always-on
# self-validation floor. The recipe pins CARGO_INCREMENTAL=0 to dodge a
# known rustc-incremental ICE on ephapax-parser.
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@2c7215f132e9ebf062739d9130488b56d53c060c # stable
with:
toolchain: stable # required when SHA-pinned (no rust-toolchain.toml in repo)
- name: Cache cargo registry and build
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2
with:
key: wasm-validate
- name: Install just + wasm-tools
run: cargo install just wasm-tools --locked
- name: Validate emitted wasm (just validate-wasm)
run: just validate-wasm
- name: Write summary
if: always()
run: |
echo "## wasm-tools validate" >> "$GITHUB_STEP_SUMMARY"
echo "" >> "$GITHUB_STEP_SUMMARY"
echo "Every module ephapax emits for the fixture corpus passes" >> "$GITHUB_STEP_SUMMARY"
echo "wasm-tools validate (structural validity gate), including" >> "$GITHUB_STEP_SUMMARY"
echo "the hypatia bridge.eph integration target." >> "$GITHUB_STEP_SUMMARY"