diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a70c7b47..29cd2812 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: run: mkdir -p target/man && cargo run --features=docgen -- man --directory target/man - name: Clippy (non-gating) run: cargo clippy - build: + build-fedora: runs-on: ubuntu-latest container: quay.io/coreos-assembler/fcos-buildroot:testing-devel steps: @@ -60,6 +60,25 @@ jobs: with: name: bootc.tar.zst path: target/bootc.tar.zst + build-c9s: + runs-on: ubuntu-latest + container: quay.io/centos/centos:stream9 + steps: + - run: dnf -y install git-core + - uses: actions/checkout@v3 + - name: Install deps + run: ./ci/installdeps.sh + - name: Cache Dependencies + uses: Swatinem/rust-cache@v2 + with: + key: "build-c9s" + - name: Build + run: make test-bin-archive + - name: Upload binary + uses: actions/upload-artifact@v3 + with: + name: bootc-c9s.tar.zst + path: target/bootc.tar.zst cargo-deny: runs-on: ubuntu-latest steps: @@ -70,7 +89,7 @@ jobs: command: check bans sources licenses privtest: name: "Privileged testing" - needs: build + needs: build-fedora runs-on: ubuntu-latest steps: - name: Checkout repository @@ -85,7 +104,7 @@ jobs: run: sudo podman run --rm -ti --privileged -v /run/systemd:/run/systemd -v /:/run/host -v /usr/bin/bootc:/usr/bin/bootc --pid=host quay.io/fedora/fedora-coreos:testing-devel bootc internal-tests run-privileged-integration container-tests: name: "Container testing" - needs: build + needs: build-fedora runs-on: ubuntu-latest container: quay.io/fedora/fedora-coreos:testing-devel steps: @@ -99,7 +118,7 @@ jobs: run: bootc internal-tests run-container-integration privtest-alongside: name: "Test install-alongside" - needs: build + needs: build-fedora runs-on: ubuntu-latest steps: - name: Download diff --git a/ci/installdeps.sh b/ci/installdeps.sh index 73a6b5f5..f5c94be3 100755 --- a/ci/installdeps.sh +++ b/ci/installdeps.sh @@ -1,11 +1,20 @@ #!/bin/bash set -xeuo pipefail +OS_ID=$(. /usr/lib/os-release && echo $ID) + +baseurl= +case $OS_ID in + fedora) baseurl=https://download.copr.fedorainfracloud.org/results/@CoreOS/continuous/fedora-\$releasever-\$basearch/ ;; + # Default to c9s (also covers all variants/derivatives) + *) baseurl=https://download.copr.fedorainfracloud.org/results/@CoreOS/continuous/centos-stream-\$releasever-\$basearch/ ;; +esac + # For some reason dnf copr enable -y says there are no builds? -cat >/etc/yum.repos.d/coreos-continuous.repo << 'EOF' +cat >/etc/yum.repos.d/coreos-continuous.repo << EOF [copr:copr.fedorainfracloud.org:group_CoreOS:continuous] name=Copr repo for continuous owned by @CoreOS -baseurl=https://download.copr.fedorainfracloud.org/results/@CoreOS/continuous/fedora-$releasever-$basearch/ +baseurl=$baseurl type=rpm-md skip_if_unavailable=True gpgcheck=1 @@ -15,11 +24,10 @@ enabled=1 enabled_metadata=1 EOF -# Pull skopeo and ostree from updates-testing, since we depend on new features in our git main -dnf config-manager --set-enabled updates-testing - # Our tests depend on this -dnf -y install skopeo +dnf -y install skopeo zstd -# Always pull ostree from updates-testing to avoid the bodhi wait -dnf -y update ostree +case $OS_ID in + fedora) dnf -y builddep bootc ;; + *) dnf -y install openssl-devel ostree-devel cargo ;; +esac