Skip to content

Commit

Permalink
Merge pull request #224 from cgwalters/build-c9s
Browse files Browse the repository at this point in the history
ci: Add a c9s build
  • Loading branch information
jmarrero authored Dec 14, 2023
2 parents abe9633 + 0280463 commit 4515bf6
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 12 deletions.
27 changes: 23 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand Down
24 changes: 16 additions & 8 deletions ci/installdeps.sh
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

0 comments on commit 4515bf6

Please sign in to comment.