Skip to content

Commit 4515bf6

Browse files
authored
Merge pull request #224 from cgwalters/build-c9s
ci: Add a c9s build
2 parents abe9633 + 0280463 commit 4515bf6

File tree

2 files changed

+39
-12
lines changed

2 files changed

+39
-12
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
run: mkdir -p target/man && cargo run --features=docgen -- man --directory target/man
4343
- name: Clippy (non-gating)
4444
run: cargo clippy
45-
build:
45+
build-fedora:
4646
runs-on: ubuntu-latest
4747
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
4848
steps:
@@ -60,6 +60,25 @@ jobs:
6060
with:
6161
name: bootc.tar.zst
6262
path: target/bootc.tar.zst
63+
build-c9s:
64+
runs-on: ubuntu-latest
65+
container: quay.io/centos/centos:stream9
66+
steps:
67+
- run: dnf -y install git-core
68+
- uses: actions/checkout@v3
69+
- name: Install deps
70+
run: ./ci/installdeps.sh
71+
- name: Cache Dependencies
72+
uses: Swatinem/rust-cache@v2
73+
with:
74+
key: "build-c9s"
75+
- name: Build
76+
run: make test-bin-archive
77+
- name: Upload binary
78+
uses: actions/upload-artifact@v3
79+
with:
80+
name: bootc-c9s.tar.zst
81+
path: target/bootc.tar.zst
6382
cargo-deny:
6483
runs-on: ubuntu-latest
6584
steps:
@@ -70,7 +89,7 @@ jobs:
7089
command: check bans sources licenses
7190
privtest:
7291
name: "Privileged testing"
73-
needs: build
92+
needs: build-fedora
7493
runs-on: ubuntu-latest
7594
steps:
7695
- name: Checkout repository
@@ -85,7 +104,7 @@ jobs:
85104
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
86105
container-tests:
87106
name: "Container testing"
88-
needs: build
107+
needs: build-fedora
89108
runs-on: ubuntu-latest
90109
container: quay.io/fedora/fedora-coreos:testing-devel
91110
steps:
@@ -99,7 +118,7 @@ jobs:
99118
run: bootc internal-tests run-container-integration
100119
privtest-alongside:
101120
name: "Test install-alongside"
102-
needs: build
121+
needs: build-fedora
103122
runs-on: ubuntu-latest
104123
steps:
105124
- name: Download

ci/installdeps.sh

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,20 @@
11
#!/bin/bash
22
set -xeuo pipefail
33

4+
OS_ID=$(. /usr/lib/os-release && echo $ID)
5+
6+
baseurl=
7+
case $OS_ID in
8+
fedora) baseurl=https://download.copr.fedorainfracloud.org/results/@CoreOS/continuous/fedora-\$releasever-\$basearch/ ;;
9+
# Default to c9s (also covers all variants/derivatives)
10+
*) baseurl=https://download.copr.fedorainfracloud.org/results/@CoreOS/continuous/centos-stream-\$releasever-\$basearch/ ;;
11+
esac
12+
413
# For some reason dnf copr enable -y says there are no builds?
5-
cat >/etc/yum.repos.d/coreos-continuous.repo << 'EOF'
14+
cat >/etc/yum.repos.d/coreos-continuous.repo << EOF
615
[copr:copr.fedorainfracloud.org:group_CoreOS:continuous]
716
name=Copr repo for continuous owned by @CoreOS
8-
baseurl=https://download.copr.fedorainfracloud.org/results/@CoreOS/continuous/fedora-$releasever-$basearch/
17+
baseurl=$baseurl
918
type=rpm-md
1019
skip_if_unavailable=True
1120
gpgcheck=1
@@ -15,11 +24,10 @@ enabled=1
1524
enabled_metadata=1
1625
EOF
1726

18-
# Pull skopeo and ostree from updates-testing, since we depend on new features in our git main
19-
dnf config-manager --set-enabled updates-testing
20-
2127
# Our tests depend on this
22-
dnf -y install skopeo
28+
dnf -y install skopeo zstd
2329

24-
# Always pull ostree from updates-testing to avoid the bodhi wait
25-
dnf -y update ostree
30+
case $OS_ID in
31+
fedora) dnf -y builddep bootc ;;
32+
*) dnf -y install openssl-devel ostree-devel cargo ;;
33+
esac

0 commit comments

Comments
 (0)