chore: bump toolchain to v4.34.0-rc1 (#950) #2094
This file contains hidden or 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
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| merge_group: | |
| name: Consistent subproject dependencies | |
| jobs: | |
| build: | |
| name: SubVerso version consistency | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Check for consistent Subverso versions in all manifests | |
| run: | | |
| # Get the Subverso revision from root manifest | |
| ROOT_REV=$(jq -r '.packages[] | select(.name == "subverso") | .rev' ./lake-manifest.json) | |
| echo "Root SubVerso revision: $ROOT_REV" | |
| # Get the Subverso repository URL | |
| SUBVERSO_URL=$(jq -r '.packages[] | select(.name == "subverso") | .url' ./lake-manifest.json) | |
| echo "SubVerso repository: $SUBVERSO_URL" | |
| # Get the de-modulized version SHA using git ls-remote | |
| DEMOD_REV=$(git ls-remote "$SUBVERSO_URL" "refs/tags/no-modules/$ROOT_REV" | awk '{print $1}') | |
| echo "De-modulized SubVerso revision: $DEMOD_REV" | |
| echo "" | |
| echo "Valid SubVerso revisions are:" | |
| echo " - $ROOT_REV (root/modulized)" | |
| echo " - $DEMOD_REV (de-modulized)" | |
| echo "" | |
| # Show all Subverso versions in the repository | |
| echo "SubVerso versions in all manifests:" | |
| # $file is a jq variable (set via --arg), not a shell variable | |
| # SC2016 (expressions don't expand in single quotes) is a false positive here | |
| # shellcheck disable=SC2016 | |
| find . -name lake-manifest.json -print0 | xargs -0 jq --arg file input_filename '.packages[] | select(.name == "subverso") | {"file": $file, "subverso": .rev}' | |
| echo "" | |
| # Check that all non-root manifests use one of the two valid revisions | |
| # $root and $demod are jq variables (set via --arg), not shell variables | |
| # SC2016 (expressions don't expand in single quotes) is a false positive here | |
| # shellcheck disable=SC2016 | |
| find . -name lake-manifest.json -not -path ./lake-manifest.json -print0 | \ | |
| xargs -0 jq -e --arg root "$ROOT_REV" --arg demod "$DEMOD_REV" \ | |
| 'all(.packages[] | select(.name == "subverso") | .rev; . == $root or . == $demod)' | |
| - name: Check that literate test projects match root lean-toolchain | |
| run: | | |
| ROOT_TC=$(cat lean-toolchain) | |
| echo "Root lean-toolchain: $ROOT_TC" | |
| FAILED=0 | |
| for proj in test-projects/literate-config test-projects/literate-multi-root; do | |
| PROJ_TC=$(cat "$proj/lean-toolchain") | |
| if [ "$PROJ_TC" != "$ROOT_TC" ]; then | |
| echo "MISMATCH: $proj/lean-toolchain ($PROJ_TC) does not match root ($ROOT_TC)" | |
| FAILED=1 | |
| else | |
| echo "OK: $proj/lean-toolchain" | |
| fi | |
| done | |
| if [ "$FAILED" -ne 0 ]; then | |
| echo "" | |
| echo "To fix automatically, comment '!consistent' on the PR." | |
| exit 1 | |
| fi |