Skip to content

Commit 8f689ec

Browse files
milyinOlivierHecartCopilot
authored
separate support of rust 1.75 to avoid build issues (#2392)
* Fix clippy warning * Remove zenoh-pinned-deps-1-75 from workspace members * version locks renoved, rust version bumped * remove 1.75 dependency * memory leak test fix * Update commons/zenoh-util/src/log.rs Co-authored-by: Copilot <[email protected]> * forgotten dependency removed * date fix * Update commons/zenoh-util/src/log.rs Co-authored-by: Copilot <[email protected]> * typo fix * tempfile crate locked * tempfile added to ignored * name fix * more rust 1.75 compatible libs pinned * fix for build on windows * added test without cargo.lock --------- Co-authored-by: OlivierHecart <[email protected]> Co-authored-by: Copilot <[email protected]>
1 parent ee17f85 commit 8f689ec

10 files changed

Lines changed: 456 additions & 422 deletions

File tree

.github/workflows/ci.yml

Lines changed: 6 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -72,32 +72,13 @@ jobs:
7272
cache-bin: false
7373

7474
- name: Check zenoh with rust 1.75.0
75-
run: cargo +1.75.0 check --release --bins --lib
75+
run: cargo +1.75.0 check --release --manifest-path ci/zenoh-1-75/Cargo.toml
7676

77-
# Test without Cargo.lock to ensure that all restrictions are correctly set in Cargo.toml for build with rust 1.75.0
78-
check_rust_without_cargo_lock:
79-
needs: determine-runner
80-
name: Check zenoh build without Cargo.lock on Rust 1.75
81-
runs-on: ubuntu-latest
82-
strategy:
83-
fail-fast: false
84-
85-
steps:
86-
- name: Clone this repository
87-
uses: actions/checkout@v4
88-
89-
- name: Update Rust 1.75.0 toolchain
90-
run: rustup update 1.75.0
91-
92-
- name: Setup rust-cache
93-
uses: Swatinem/rust-cache@v2
94-
with:
95-
cache-bin: false
96-
97-
- name: Check zenoh without Cargo.lock
77+
- name: Check clippy on stable rust without Cargo.lock to ensure compatibility with latest dependencies
9878
run: |
99-
rm Cargo.lock || true
100-
cargo +1.75.0 check --bins --lib
79+
rm Cargo.lock
80+
cargo +stable clippy --release --manifest-path ci/zenoh-1-75/Cargo.toml -- -D warnings
81+
git restore Cargo.lock
10182
10283
check:
10384
needs: determine-runner
@@ -389,17 +370,6 @@ jobs:
389370
- name: Clone this repository
390371
uses: actions/checkout@v4
391372

392-
#
393-
# Temporary workaround to remmove transitive dependency
394-
# of static-init 1.0.3 which fails with nigtly Rust.
395-
# This allows Rust to automatically pick a compatible version 1.0.4
396-
# where the issue is fixed.
397-
#
398-
- name: Remove zenoh-pinned-deps-1-75 dependency and Cargo.lock
399-
run: |
400-
sed -i '/zenoh-pinned-deps-1-75/d' Cargo.toml
401-
rm -f Cargo.lock
402-
403373
# Use a similar command than docs.rs build: rustdoc with nightly toolchain
404374
- name: Install Rust toolchain nightly for docs gen
405375
run: rustup toolchain install nightly
@@ -440,17 +410,6 @@ jobs:
440410
- name: Checkout sources
441411
uses: actions/checkout@v4
442412

443-
#
444-
# Temporary workaround to remmove transitive dependency
445-
# of static-init 1.0.3 which fails with nigtly Rust.
446-
# This allows Rust to automatically pick a compatible version 1.0.4
447-
# where the issue is fixed.
448-
#
449-
- name: Remove zenoh-pinned-deps-1-75 dependency and Cargo.lock
450-
run: |
451-
sed -i '/zenoh-pinned-deps-1-75/d' Cargo.toml
452-
rm -f Cargo.lock
453-
454413
- name: Install ${{ matrix.rust }} Rust toolchain
455414
run: |
456415
rustup override set ${{ matrix.rust }}
@@ -503,7 +462,7 @@ jobs:
503462
ci:
504463
name: CI status checks
505464
runs-on: ubuntu-latest
506-
needs: [check_rust, check_rust_without_cargo_lock, check, test, test_unstable, test_shm, valgrind, typos, markdown_lint, doc, coverage]
465+
needs: [check_rust, check, test, test_unstable, test_shm, valgrind, typos, markdown_lint, doc, coverage]
507466
if: always()
508467
steps:
509468
- name: Check whether all jobs pass

0 commit comments

Comments
 (0)