Skip to content

Commit f3ee5aa

Browse files
committed
ci: verify that codegen is up-to-date
1 parent 12733da commit f3ee5aa

2 files changed

Lines changed: 34 additions & 0 deletions

File tree

.github/workflows/codegen.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: codegen
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
workflow_dispatch:
9+
10+
env:
11+
CARGO_TERM_COLOR: always
12+
13+
jobs:
14+
codegen:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v7
18+
- name: Install
19+
run: |
20+
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly
21+
rustup toolchain install nightly --allow-downgrade -c rustfmt
22+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
23+
- name: Check
24+
run: |
25+
./codegen/codegen.sh
26+
git diff --exit-code

codegen/codegen.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -ex
4+
5+
cd "$(dirname "$BASH_SOURCE")/.."
6+
7+
cargo run -p codegen
8+
cargo +nightly fmt

0 commit comments

Comments
 (0)