Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes #655 Co-authored-by: Tomas Tauber <me@tomtau.be>
- Loading branch information
Showing
6 changed files
with
209 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Setup | ||
description: Initial setup for workflows | ||
|
||
inputs: | ||
kind: | ||
description: Job kind (for cache key) | ||
required: false | ||
toolchain: | ||
description: Toolchain version | ||
required: false | ||
default: "1.56.1" | ||
components: | ||
description: Toolchain components | ||
required: false | ||
targets: | ||
description: Toolchain targets | ||
required: false | ||
tools: | ||
description: Additional tools to install | ||
required: false | ||
|
||
outputs: | ||
cache-key: | ||
description: Cache key | ||
value: ${{inputs.kind}}-${{runner.os}}-${{steps.toolchain.outputs.cachekey}} | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Install Rust nightly # for minimal-versions | ||
uses: dtolnay/rust-toolchain@nightly | ||
- name: Install Rust ${{inputs.toolchain}} | ||
uses: dtolnay/rust-toolchain@master | ||
id: toolchain | ||
with: | ||
toolchain: ${{inputs.toolchain}} | ||
components: ${{inputs.components}} | ||
targets: ${{inputs.targets}} | ||
- name: Install cargo-hack,cargo-minimal-versions | ||
uses: taiki-e/install-action@v1 | ||
with: | ||
tool: cargo-hack,cargo-minimal-versions | ||
- name: Install ${{inputs.tools}} | ||
uses: taiki-e/install-action@v1 | ||
if: ${{inputs.tools}} | ||
with: | ||
tool: ${{inputs.tools}} | ||
- name: Generate lockfile | ||
run: cargo minimal-versions generate-lockfile | ||
shell: sh | ||
- name: Set up cache | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: ${{inputs.kind}}-${{runner.os}}-${{steps.toolchain.outputs.cachekey}} | ||
- name: Bootstraping Grammars - Building | ||
run: cargo build --package pest_bootstrap | ||
shell: sh | ||
- name: Bootstraping Grammars - Executing | ||
run: cargo run --package pest_bootstrap | ||
shell: sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bash | ||
export CURRENT_GIT_SHA=`git rev-parse HEAD` | ||
cargo clean | ||
cargo install cargo-semver-checks || true | ||
export RUSTDOC_LATE_FLAGS="--document-private-items -Zunstable-options --output-format json" | ||
cargo build --package pest_bootstrap | ||
cargo run --package pest_bootstrap | ||
|
||
# current | ||
for crate in "pest_derive" "pest_generator" "pest_grammars" "pest_meta" "pest" "pest_vm"; do | ||
cargo +nightly rustdoc -p $crate -- $RUSTDOC_LATE_FLAGS | ||
mv target/doc/$crate.json /tmp/current-$crate.json | ||
done | ||
|
||
# the latest 2.1.x release | ||
export BASELINE_GIT_SHA="7dee2a7770daa213b45f88e6af730868f764927a" | ||
# baseline | ||
git fetch origin | ||
git checkout "$BASELINE_GIT_SHA" | ||
cargo clean | ||
cargo build --package pest_bootstrap | ||
cargo run --package pest_bootstrap | ||
for crate in "pest_derive" "pest_generator" "pest_grammars" "pest_meta" "pest" "pest_vm"; do | ||
cargo +nightly rustdoc -p $crate -- $RUSTDOC_LATE_FLAGS | ||
mv target/doc/$crate.json /tmp/baseline-$crate.json | ||
echo "Checking $crate" | ||
cargo semver-checks check-release --current /tmp/current-$crate.json --baseline /tmp/baseline-$crate.json | ||
done | ||
git checkout "$CURRENT_GIT_SHA" |