Skip to content

Commit 235b67f

Browse files
authored
Merge pull request #1095 from mahkoh/jorth/codegen-check
ci: verify that codegen is up-to-date
2 parents 12733da + 096ab11 commit 235b67f

4 files changed

Lines changed: 42 additions & 8 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

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

codegen/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ version = "0.1.0"
44
edition = "2024"
55

66
[dependencies]
7-
rand = "0.10.1"
8-
permutation = "0.4.1"
9-
anyhow = "1.0.103"
10-
indexmap = "2.14.0"
11-
regex = "1.12.4"
12-
linearize = { version = "0.1.7", features = ["derive"] }
7+
rand = { version = "0.10.1", default-features = false }
8+
permutation = { version = "0.4.1", default-features = false }
9+
anyhow = { version = "1.0.103", default-features = false, features = ["std"] }
10+
indexmap = { version = "2.14.0", default-features = false, features = ["std"] }
11+
regex = { version = "1.12.4", default-features = false, features = ["std", "unicode-perl"] }
12+
linearize = { version = "0.1.7", default-features = false, features = ["derive"] }

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[0]}")/.."
6+
7+
cargo run -p codegen
8+
cargo +nightly fmt

0 commit comments

Comments
 (0)