Skip to content

Commit 6eb61ab

Browse files
committed
ci: Use devcontainer for CI to match local development
Replace separate toolchain installation with devcontainers/ci action that runs inside the same devcontainer image used for local development. This ensures CI and local builds use identical environments. Both jobs now delegate to Justfile targets: - ci job: runs `just ci` (fmt check, clippy, tests) - kani job: runs `just kani` (formal verification proofs) Also updates .devcontainer.json to use bootc-dev/devenv-debian image which includes Kani, cargo-nextest, and other development tools. Assisted-by: OpenCode (Claude Sonnet 4)
1 parent b4187a2 commit 6eb61ab

2 files changed

Lines changed: 22 additions & 21 deletions

File tree

.devcontainer.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
{"image":"mcr.microsoft.com/devcontainers/rust:latest"}
1+
{
2+
"image": "ghcr.io/bootc-dev/devenv-debian:latest"
3+
}

.github/workflows/build.yml

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,42 @@
1-
name: Rust
1+
name: CI
2+
23
on:
34
push:
45
branches: [main]
56
pull_request:
67
branches: [main]
8+
79
permissions:
810
contents: read
911

10-
# don't waste job slots on superseded code
12+
# Don't waste job slots on superseded code
1113
concurrency:
1214
group: ${{ github.workflow }}-${{ github.ref }}
1315
cancel-in-progress: true
1416

15-
env:
16-
CARGO_TERM_COLOR: always
17-
1817
jobs:
19-
tests-stable:
20-
name: Tests, stable toolchain
18+
ci:
19+
name: CI
2120
runs-on: ubuntu-latest
2221
steps:
23-
- name: Check out repository
22+
- name: Checkout
2423
uses: actions/checkout@v4
25-
- name: Install toolchain
26-
uses: dtolnay/rust-toolchain@v1
24+
25+
- name: Build and run CI in devcontainer
26+
uses: devcontainers/ci@v0.3
2727
with:
28-
toolchain: stable
29-
- name: Cache build artifacts
30-
uses: Swatinem/rust-cache@v2
31-
- name: cargo build
32-
run: cargo build --all-targets
33-
- name: cargo test
34-
run: cargo test --all-targets
28+
push: never
29+
runCmd: just ci
3530

3631
kani:
3732
name: Kani formal verification
3833
runs-on: ubuntu-latest
3934
steps:
40-
- name: Check out repository
35+
- name: Checkout
4136
uses: actions/checkout@v4
42-
- name: Run Kani proofs
43-
uses: model-checking/kani-github-action@v1
37+
38+
- name: Run Kani proofs in devcontainer
39+
uses: devcontainers/ci@v0.3
40+
with:
41+
push: never
42+
runCmd: just kani

0 commit comments

Comments
 (0)