ci: Add a flow that does a git libostree + git rust-bindings
authorColin Walters <walters@verbum.org>
Wed, 8 Jun 2022 13:53:33 +0000 (09:53 -0400)
committerColin Walters <walters@verbum.org>
Wed, 8 Jun 2022 14:33:46 +0000 (10:33 -0400)
In https://github.com/ostreedev/ostree/pull/2633 I realized
that our CI only builds git of libostree or git of rust-bindings,
not git of both.  And we definitely want to test the latter too,
so e.g. the Rust tests *also* become tests for changes to the C code.

.github/workflows/rust.yml

index 9e60edca6f9a6d0c44317bf1cedfcf4bee292938..a830c0e85e9a03a74e08019dd9006c4b15b9de16 100644 (file)
@@ -12,6 +12,8 @@ on:
 env:
   CARGO_TERM_COLOR: always
   CARGO_PROJECT_FEATURES: "v2021_5"
+  # TODO: Automatically query this from the C side
+  LATEST_LIBOSTREE: "v2022_5"
   # Minimum supported Rust version (MSRV)
   ACTION_MSRV_TOOLCHAIN: 1.54.0
   # Pinned toolchain for linting
@@ -47,6 +49,24 @@ jobs:
         uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
       - name: cargo build
         run: cargo build --features=${{ env['CARGO_PROJECT_FEATURES'] }}
+  build-git-libostree:
+    runs-on: ubuntu-latest
+    container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          fetch-depth: 0
+          submodules: true
+      - name: Cache Dependencies
+        uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72
+      - name: Build libostree
+        run: ./ci/build.sh
+      - name: Install libostree
+        run: make install
+      - name: Rust build
+        run: cargo test --no-run --verbose --features=${{ env['LATEST_LIBOSTREE'] }}
+      - name: Run tests
+        run: cargo test --verbose --features=${{ env['LATEST_LIBOSTREE'] }}
   linting:
     name: "Lints, pinned toolchain"
     runs-on: ubuntu-latest