Repository navigation
165 lines (155 loc) · 5.79 KB
/
Copy pathci.yml
File metadata and controls
165 lines (155 loc) · 5.79 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
name: CI
on:
pull_request:
push:
branches: [master]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
RUSTUP_TOOLCHAIN: 1.98.1
CARGO_TERM_COLOR: always
CARGO_BUILD_JOBS: 3
TZ: America/Detroit
PYTHONUNBUFFERED: '1'
defaults:
run:
shell: bash
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Rust and Cargo
uses: ./.github/actions/setup
with:
cache-key: lint
- name: Check formatting
run: ./scripts/cargo fmt --check
- name: Clippy with all features
run: ./scripts/cargo clippy --locked --workspace --all-targets --all-features -- -D warnings
- name: Clippy without default features
run: ./scripts/cargo clippy --locked --workspace --all-targets --no-default-features -- -D warnings
tests:
name: Tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
arch: x86_64
- os: macos-latest
arch: arm64
steps:
- name: Check out the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Verify runner architecture
env:
EXPECTED_ARCH: ${{ matrix.arch }}
run: test "$(uname -m)" = "$EXPECTED_ARCH"
- name: Set up Rust and Cargo
uses: ./.github/actions/setup
with:
cache-key: tests
- name: Debug tests with all features
run: ./scripts/cargo test --locked --workspace --all-targets --all-features --no-fail-fast
- name: Gate tests with all features (SIMD)
if: ${{ !cancelled() }}
run: ./scripts/cargo test --locked --workspace --profile gate --all-targets --all-features --no-fail-fast
- name: Gate tests without default features (portable)
if: ${{ !cancelled() }}
run: ./scripts/cargo test --locked --workspace --profile gate --all-targets --no-default-features --no-fail-fast
- name: Documentation tests with all features
if: ${{ !cancelled() }}
run: ./scripts/cargo test --locked --workspace --doc --all-features
windows-modules:
name: Windows module loading
runs-on: windows-latest
timeout-minutes: 20
steps:
- name: Check out the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Rust and Cargo
uses: ./.github/actions/setup
with:
cache-key: windows-modules
- name: Test filesystem module loading
run: './scripts/cargo test --locked -p vibescript --lib --all-features loading::'
golden:
name: Golden (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
arch: x86_64
- os: macos-latest
arch: arm64
steps:
- name: Check out the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Verify runner architecture
env:
EXPECTED_ARCH: ${{ matrix.arch }}
run: test "$(uname -m)" = "$EXPECTED_ARCH"
- name: Set up Rust and Cargo
uses: ./.github/actions/setup
with:
cache-key: golden
- name: Check SIMD goldens
run: |
mkdir -p .cache/ci-golden
python3 scripts/golden.py --observations .cache/ci-golden/simd.jsonl
- name: Build portable golden harness
run: ./scripts/cargo build --locked --offline --workspace --profile gate --no-default-features --example golden
- name: Build portable CLI
run: ./scripts/cargo build --locked --offline --workspace --profile gate --no-default-features --bin vibes
- name: Check portable goldens
run: python3 scripts/golden.py --no-build --observations .cache/ci-golden/portable.jsonl
- name: Compare SIMD and portable accounting counters
run: python3 scripts/check-golden-counters .cache/ci-golden/simd.jsonl .cache/ci-golden/portable.jsonl
wasi:
name: WASI
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Check out the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Set up Rust and Cargo
uses: ./.github/actions/setup
with:
cache-key: wasi
target: wasm32-wasip1
- name: Fetch locked WASI witness dependencies
run: ./scripts/cargo fetch --locked --manifest-path tests/platforms/wasi/Cargo.toml
- name: Install Wasmtime 48.0.2
run: |
archive=wasmtime-v48.0.2-x86_64-linux.tar.xz
mkdir -p .cache/wasmtime
curl --fail --location --retry 3 "https://github.com/bytecodealliance/wasmtime/releases/download/v48.0.2/$archive" --output ".cache/wasmtime/$archive"
echo "f2b0ad1ce9253f2f9a38793c2c42cd1cba4e90b27dc40d685eaf723dc8438d94 .cache/wasmtime/$archive" | sha256sum --check
tar -xJf ".cache/wasmtime/$archive" -C .cache/wasmtime
echo "$GITHUB_WORKSPACE/.cache/wasmtime/wasmtime-v48.0.2-x86_64-linux" >> "$GITHUB_PATH"
- name: Print Wasmtime version
run: wasmtime --version
- name: Check WASI Clippy, tests, CLI and filesystem witness
run: python3 scripts/check-wasi