Skip to content

Commit

Permalink
ci/nightly: Add a dependency mismatcher job
Browse files Browse the repository at this point in the history
Add a dependency mismatcher job that checks whether any dependencies
have more than one versions.

Signed-off-by: Tomás González <tomasagustin.gonzalezorlando@arm.com>
  • Loading branch information
tgonzalezorlandoarm committed Nov 6, 2023
1 parent 567ff38 commit fd06ae7
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,13 @@ jobs:
run: docker run -v $(pwd):/tmp/parsec -w /tmp/parsec --security-opt seccomp=unconfined ghcr.io/parallaxsecond/parsec-service-test-all /tmp/parsec/ci.sh coverage
- name: Collect coverage results
run: bash <(curl -s https://codecov.io/bash)

mismatcher:
name: Check for mismatched dependencies (those that have more than one version)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: "${{ github.event.inputs.rev }}"
- name: Run the container to execute the dependency mismatcher script
run: docker run -v $(pwd):/tmp/parsec -w /tmp/parsec ghcr.io/parallaxsecond/parsec-service-test-all /tmp/parsec/ci.sh mismatcher
13 changes: 13 additions & 0 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ while [ "$#" -gt 0 ]; do
coverage )
PROVIDER_NAME=$1
;;
mismatcher )
PROVIDER_NAME=$1
;;
*)
error_msg "Unknown argument: $1"
;;
Expand All @@ -210,6 +213,16 @@ fi

trap cleanup EXIT

if [ "$PROVIDER_NAME" = "mismatcher" ]; 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

if [ "$PROVIDER_NAME" = "tpm" ] || [ "$PROVIDER_NAME" = "all" ] || [ "$PROVIDER_NAME" = "coverage" ]; then
# Copy the NVChip for previously stored state. This is needed for the key mappings test.
cp /tmp/ondisk/NVChip .
Expand Down

0 comments on commit fd06ae7

Please sign in to comment.