ci: Run the generator and fail if output is different (#393)
Make sure the submodule hash, state of the generator and resulting source files in ash are in sync for every submission.
This commit is contained in:
parent
7e9abd2913
commit
dba9e6b691
25
.github/workflows/ci.yml
vendored
25
.github/workflows/ci.yml
vendored
|
@ -18,6 +18,31 @@ jobs:
|
||||||
command: check
|
command: check
|
||||||
args: --workspace --all-targets
|
args: --workspace --all-targets
|
||||||
|
|
||||||
|
generated:
|
||||||
|
name: Generated
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
- name: Run generator
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: run
|
||||||
|
args: -p generator
|
||||||
|
- name: Format generated results
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
with:
|
||||||
|
command: fmt
|
||||||
|
args: -p ash
|
||||||
|
- name: Diff autogen result
|
||||||
|
run: git diff --quiet || (echo "::error::Generated files are different, please regenerate with cargo run -p generator!"; git diff; false)
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Test Suite
|
name: Test Suite
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
Loading…
Reference in a new issue