diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1af0f93d..28edab1b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,50 +31,43 @@ jobs: uses: actions/checkout@v4 with: repository: eclipse-zenoh/zenoh-flat-jni - ref: 6f81eb8f9d5c49b72dda2fb054a174cce3184f2a + # No ref: track that repository's default branch. A pinned commit has + # to be hand-edited for every upstream fix, and this is the one hop + # in the chain no bot covers - zenoh-flat-jni's own Cargo.lock is + # kept aligned with zenoh for it, so following its main keeps the + # whole chain automatic. zenoh-flat is not checked out at all: it is + # resolved from git by that lockfile. path: zenoh-flat-jni - - name: Check out zenoh-flat - uses: actions/checkout@v4 - with: - repository: eclipse-zenoh/zenoh-flat - ref: 81feb940cce9f4c3b33a87de397b2ce42cb5fc9e - path: zenoh-flat - - uses: actions/setup-java@v4 with: distribution: temurin java-version: 11 + # zenoh-flat-jni pins its toolchain in rust-toolchain.toml. Install it + # from that directory, so a missing toolchain fails here rather than + # inside the Gradle build - and so this repo never has to name a version + # its dependency is free to change. + # + # Nothing else Rust runs here. Formatting, clippy, the feature-leak test + # and the native build are zenoh-flat-jni's own CI, on three platforms, + # for the very commit pinned above; re-running them from this repo only + # adds ways for the two toolchains to disagree. - name: Install Rust toolchain - run: | - rustup show - rustup component add rustfmt clippy --toolchain 1.93.0 - - - name: Cargo Format - working-directory: zenoh-flat-jni - run: cargo fmt --check - - - name: Clippy Check - working-directory: zenoh-flat-jni - run: cargo clippy --all-targets --all-features -- -D warnings - - - name: Check for feature leaks - working-directory: zenoh-flat-jni - run: cargo test --no-default-features - - - name: Build zenoh-flat-jni working-directory: zenoh-flat-jni - run: cargo build + run: rustup show - name: Setup Gradle uses: gradle/actions/setup-gradle@v4 - name: Gradle Test working-directory: zenoh-java - # CI builds against the sibling checkouts above, so it opts into the + # CI builds against the sibling checkout above, so it opts into the # composite build explicitly. A release does not: it resolves # zenoh-flat-jni from Maven Central like any other consumer. + # + # No cargo step precedes this: the composite build's test task depends + # on zenoh-flat-jni's own native build, so Gradle drives cargo. run: ./gradlew jvmTest --info -PuseLocalFlatJni=true markdown_lint: