Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 3 additions & 15 deletions .github/workflows/sync-lockfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,6 @@ jobs:
- name: Install build dependencies
run: sudo apt-get install -y llvm-dev libclang-dev clang libacl1-dev

# NOTE: Not all Zenoh dependants have their Cargo manifest and lockfile
# at the repository's toplevel. The only exception being zenoh-kotlin and
# zenoh-java. Thus the need for this ugly workaround.
- name: Compute crate path of ${{ matrix.dependant }}
id: crate-path
run: |
if [[ "${{ matrix.dependant }}" =~ eclipse-zenoh/zenoh-(java|kotlin) ]]; then
echo "value=zenoh-jni" >> $GITHUB_OUTPUT
else
echo "value=." >> $GITHUB_OUTPUT
fi

- name: Compute clippy options
id: clippy-options
run: |
Expand All @@ -137,12 +125,12 @@ jobs:
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: Cargo.lock
path: ${{ steps.crate-path.outputs.value }}
path: .

- name: Rectify lockfile
# NOTE: Checking the package for errors will rectify the Cargo.lock while preserving
# the dependency versions fetched from source.
run: cargo "+${RUST_TOOLCHAIN}" clippy --manifest-path ${{ steps.crate-path.outputs.value }}/Cargo.toml --all-targets ${{ steps.clippy-options.outputs.value }} -- --deny warnings
run: cargo "+${RUST_TOOLCHAIN}" clippy --manifest-path Cargo.toml --all-targets ${{ steps.clippy-options.outputs.value }} -- --deny warnings

- name: Rectify lockfile for zenoh-c opaque-types
if: ${{ matrix.dependant == 'eclipse-zenoh/zenoh-c' }}
Expand All @@ -152,7 +140,7 @@ jobs:
cargo "+${RUST_TOOLCHAIN}" clippy --manifest-path build-resources/opaque-types/Cargo.toml --all-targets --features $features -- --deny warnings

- name: cargo update ${{ matrix.dependant }}
run: cargo "+${RUST_TOOLCHAIN}" update zenoh --manifest-path ${{ steps.crate-path.outputs.value }}/Cargo.toml
run: cargo "+${RUST_TOOLCHAIN}" update zenoh --manifest-path Cargo.toml

- name: cargo update for zenoh-c build-resources
if: ${{ matrix.dependant == 'eclipse-zenoh/zenoh-c' }}
Expand Down
Loading