Skip to content

Commit aff1f2f

Browse files
committed
test: install protobuf compiler and export offline audit tooling
1 parent 9a90e6b commit aff1f2f

1 file changed

Lines changed: 37 additions & 20 deletions

File tree

‎.github/workflows/audit-verification.yml‎

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,41 @@ env:
1212
CARGO_TERM_COLOR: never
1313

1414
jobs:
15-
source-snapshot:
15+
offline-tooling:
1616
runs-on: ubuntu-24.04
17-
timeout-minutes: 10
17+
timeout-minutes: 15
1818
steps:
1919
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262
2020
with:
2121
ref: ${{ env.AUDIT_REF }}
22-
fetch-depth: 0
2322
persist-credentials: false
24-
- name: Capture immutable source and initial status
23+
clean: false
24+
- name: Prepare compiler and locked dependencies
2525
shell: bash
2626
run: |
2727
set -euo pipefail
28-
git status --porcelain=v1 > "$RUNNER_TEMP/initial-status.txt"
29-
git diff --check
30-
git rev-parse HEAD > "$RUNNER_TEMP/source-commit.txt"
31-
git bundle create "$RUNNER_TEMP/devcloud-source.bundle" --all
28+
sudo apt-get update -qq
29+
sudo apt-get install -y protobuf-compiler
30+
root="$RUNNER_TEMP/offline-tooling"
31+
mkdir -p "$root/rust" "$root/protoc/bin" "$root/protoc/lib" "$root/protoc/include"
32+
sysroot=$(rustc --print sysroot)
33+
cp -a "$sysroot/bin" "$sysroot/lib" "$root/rust/"
34+
cp /usr/bin/protoc "$root/protoc/bin/"
35+
cp -L /usr/lib/x86_64-linux-gnu/libprotobuf.so.32 /usr/lib/x86_64-linux-gnu/libprotoc.so.32 "$root/protoc/lib/"
36+
cp -a /usr/include/google "$root/protoc/include/"
37+
cargo vendor --locked "$root/vendor" > "$root/vendor-config.toml"
38+
(cd web/dashboard && npm install)
39+
tar -czf "$root/dashboard-node-modules.tar.gz" -C web/dashboard node_modules
40+
tar -czf "$RUNNER_TEMP/offline-tooling.tar.gz" -C "$root" .
41+
sha256sum "$RUNNER_TEMP/offline-tooling.tar.gz" > "$RUNNER_TEMP/offline-tooling.sha256"
3242
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
3343
with:
34-
name: audit-source
44+
name: audit-offline-tooling
3545
path: |
36-
${{ runner.temp }}/devcloud-source.bundle
37-
${{ runner.temp }}/source-commit.txt
38-
${{ runner.temp }}/initial-status.txt
39-
retention-days: 7
46+
${{ runner.temp }}/offline-tooling.tar.gz
47+
${{ runner.temp }}/offline-tooling.sha256
48+
compression-level: 0
49+
retention-days: 2
4050
if-no-files-found: error
4151
baseline:
4252
runs-on: ubuntu-24.04
@@ -46,46 +56,53 @@ jobs:
4656
with:
4757
ref: ${{ env.AUDIT_REF }}
4858
persist-credentials: false
59+
clean: false
60+
- name: Install build prerequisite
61+
run: |
62+
sudo apt-get update -qq
63+
sudo apt-get install -y protobuf-compiler
4964
- name: Environment and gate discovery
5065
run: |
66+
mkdir -p "$RUNNER_TEMP/audit-results"
5167
git status
5268
git diff
5369
rustc --version
5470
cargo --version
71+
protoc --version
5572
node --version
5673
npm --version
5774
find scripts -maxdepth 2 -name verify.sh -print
5875
find scripts -maxdepth 1 -name '*-e2e.sh' -print
5976
- name: Rust format baseline
6077
id: fmt
61-
run: cargo fmt --all -- --check
78+
run: cargo fmt --all -- --check 2>&1 | tee "$RUNNER_TEMP/audit-results/fmt.log"
6279
- name: Rust check baseline
6380
id: check
6481
if: always()
65-
run: cargo check --workspace
82+
run: cargo check --workspace 2>&1 | tee "$RUNNER_TEMP/audit-results/check.log"
6683
- name: Rust tests baseline
6784
id: tests
6885
if: always()
69-
run: cargo test --workspace
86+
run: cargo test --workspace 2>&1 | tee "$RUNNER_TEMP/audit-results/tests.log"
7087
- name: Rust clippy baseline
7188
id: clippy
7289
if: always()
73-
run: cargo clippy --workspace --all-targets
90+
run: cargo clippy --workspace --all-targets 2>&1 | tee "$RUNNER_TEMP/audit-results/clippy.log"
7491
- name: Dashboard install baseline
7592
id: npm_install
7693
if: always()
7794
working-directory: web/dashboard
78-
run: npm install
95+
run: npm install 2>&1 | tee "$RUNNER_TEMP/audit-results/npm-install.log"
7996
- name: Dashboard typecheck baseline
8097
id: typecheck
8198
if: always()
8299
working-directory: web/dashboard
83-
run: npm run typecheck
100+
run: npm run typecheck 2>&1 | tee "$RUNNER_TEMP/audit-results/typecheck.log"
84101
- name: Dashboard build baseline
85102
id: build
86103
if: always()
87104
working-directory: web/dashboard
88-
run: npm run build
105+
run: npm run build 2>&1 | tee "$RUNNER_TEMP/audit-results/build.log"
89106
- name: Record baseline outcomes
90107
if: always()
91108
run: |

0 commit comments

Comments
 (0)