diff options
author | Colin Walters <walters@verbum.org> | 2022-11-22 13:43:06 -0500 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2022-11-22 14:27:00 -0500 |
commit | d29eebca5c9d2e691bb19556cfa5d0aa77169fe3 (patch) | |
tree | 821fea6af98482a7663725402e70ca7f195146ab /.github | |
parent | f79c7a0a0adf4e7a3795ee60eb3d78c5b94c265e (diff) | |
download | ostree-d29eebca5c9d2e691bb19556cfa5d0aa77169fe3.tar.gz |
ci: Add a flow that combines C build and Rust integration tests
Today it's just the Jenkins flow which builds our Rust
integration tests. Let's add a flow to the GH actions which
does this, and also runs inside a (privileged) container.
Prep for doing more testing of the ostree-container path here.
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/tests.yml | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e3bc1726..b74a34ac 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,6 +26,22 @@ jobs: run: git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Test style run: ./ci/ci-commitmessage-submodules.sh + build-integration: + runs-on: ubuntu-latest + container: quay.io/coreos-assembler/fcos-buildroot:testing-devel + steps: + - uses: actions/checkout@v3 + - name: Cache Dependencies + uses: Swatinem/rust-cache@ce325b60658c1b38465c06cc965b79baf32c1e72 + with: + key: "integration" + - name: Build + run: cd tests/inst && cargo build --verbose --release + - name: Upload binary + uses: actions/upload-artifact@v2 + with: + name: ostree-test + path: tests/inst/target/release/ostree-test minimal: name: "Build - FCOS minimal" runs-on: ubuntu-latest @@ -44,6 +60,53 @@ jobs: --without-openssl --without-avahi --without-libmount --disable-rofiles-fuse \ --without-libsodium && make + build-c: + name: "Build (Fedora)" + runs-on: ubuntu-latest + container: registry.ci.openshift.org/coreos/fcos-buildroot:testing-devel + steps: + - name: Checkout repository + uses: actions/checkout@v3 + # https://github.com/actions/checkout/issues/760 + - name: Mark git checkout as safe + run: git config --global --add safe.directory "$GITHUB_WORKSPACE" + - name: Build + run: | + env NOCONFIGURE=1 ./autogen.sh && + ./configure --with-curl --with-selinux --with-dracut=yesbutnoconf && + make -j 4 && make install DESTDIR=$(pwd)/install && tar -c -C install --zstd -f inst.tar.zst . + - name: Upload binary + uses: actions/upload-artifact@v2 + with: + name: inst.tar.zst + path: inst.tar.zst + privtest: + name: "Privileged testing" + needs: [build-c, build-integration] + runs-on: ubuntu-latest + container: + image: quay.io/fedora/fedora-coreos:testing-devel + options: "--privileged --pid=host -v /run/systemd:/run/systemd -v /:/run/host" + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Download install tree + uses: actions/download-artifact@v2 + with: + name: inst.tar.zst + - name: Install + run: tar -C / -xvf inst.tar.zst && rm -f inst.tar.zst + - name: Download test binary + uses: actions/download-artifact@v2 + with: + name: ostree-test + - name: Install + run: install ostree-test /usr/bin + - name: Setup + # https://github.com/ostreedev/ostree-rs-ext/issues/417 + run: mkdir -p /var/tmp + - name: Integration tests (unit) + run: ostree-test tests: # Distro configuration matrix # |