diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 7b66771..5a36b45 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -42,3 +42,20 @@ jobs: run: cargo install cargo-audit - name: Execute cargo audit run: cargo audit + + mismatcher: + name: Check for mismatched dependencies (those that have more than one version) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: "${{ github.event.inputs.rev }}" + - name: Install Rust MSRV + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + toolchain: stable + rustflags: "" + - name: Execute CI script + uses: ./.github/actions/ci_script + with: + ci-flags: "mismatcher" diff --git a/tests/ci.sh b/tests/ci.sh index 824d945..90aac4a 100755 --- a/tests/ci.sh +++ b/tests/ci.sh @@ -5,10 +5,44 @@ set -xeuf -o pipefail +error_msg () { + echo "Error: $1" + exit 1 +} + # Points to Parsec's Unix Domain Socket on the CI export PARSEC_SERVICE_ENDPOINT="unix:/tmp/parsec.sock" export RUST_LOG=error +################## +# Get Parameters # +################## +MISMATCHER= +while [ "$#" -gt 0 ]; do + case "$1" in + mismatcher ) + MISMATCHER="True" + ;; + *) + error_msg "Unknown argument: $1" + ;; + esac + shift +done + +######################### +# Dependency mismatcher # +######################### +if [ "$MISMATCHER" = "True" ]; then + python3 $(pwd)/utils/dependency_cross_matcher.py --deps_dir $(pwd) + mismatcher_result=$? + if [ "$mismatcher_result" -ne 0 ]; then + error_msg "Found dependencies version mismatches" + fi + + exit 0 +fi + ######### # Build # #########