Skip to content

Commit 84b258e

Browse files
ci/nightly: Add a dependency mismatcher job
Add a dependency mismatcher job that checks whether any dependencies have more than one versions. Signed-off-by: Tomás González <[email protected]>
1 parent 3126913 commit 84b258e

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

.github/workflows/nightly.yml

+17
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,20 @@ jobs:
4242
run: cargo install cargo-audit
4343
- name: Execute cargo audit
4444
run: cargo audit
45+
46+
mismatcher:
47+
name: Check for mismatched dependencies (those that have more than one version)
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v3
51+
with:
52+
ref: "${{ github.event.inputs.rev }}"
53+
- name: Install Rust MSRV
54+
uses: actions-rust-lang/setup-rust-toolchain@v1
55+
with:
56+
toolchain: stable
57+
rustflags: ""
58+
- name: Execute CI script
59+
uses: ./.github/actions/ci_script
60+
with:
61+
ci-flags: "mismatcher"

tests/ci.sh

+34
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,44 @@
55

66
set -xeuf -o pipefail
77

8+
error_msg () {
9+
echo "Error: $1"
10+
exit 1
11+
}
12+
813
# Points to Parsec's Unix Domain Socket on the CI
914
export PARSEC_SERVICE_ENDPOINT="unix:/tmp/parsec.sock"
1015
export RUST_LOG=error
1116

17+
##################
18+
# Get Parameters #
19+
##################
20+
MISMATCHER=
21+
while [ "$#" -gt 0 ]; do
22+
case "$1" in
23+
mismatcher )
24+
MISMATCHER="True"
25+
;;
26+
*)
27+
error_msg "Unknown argument: $1"
28+
;;
29+
esac
30+
shift
31+
done
32+
33+
#########################
34+
# Dependency mismatcher #
35+
#########################
36+
if [ "$MISMATCHER" = "True" ]; then
37+
python3 $(pwd)/utils/dependency_cross_matcher.py --deps_dir $(pwd)
38+
mismatcher_result=$?
39+
if [ "$mismatcher_result" -ne 0 ]; then
40+
error_msg "Found dependencies version mismatches"
41+
fi
42+
43+
exit 0
44+
fi
45+
1246
#########
1347
# Build #
1448
#########

0 commit comments

Comments
 (0)