@@ -28,136 +28,177 @@ concurrency:
2828 cancel-in-progress : true
2929
3030jobs :
31- # Run basic validation checks (linting, formatting, etc)
32- validate :
33- runs-on : ubuntu-24.04
34- steps :
35- - uses : actions/checkout@v4
36- - name : Bootc Ubuntu Setup
37- uses : ./.github/actions/bootc-ubuntu-setup
38- - name : Validate (default)
39- run : just validate
40- # Build container with continuous repository enabled
41- container-continuous :
42- runs-on : ubuntu-24.04
43- steps :
44- - uses : actions/checkout@v4
45- - name : Bootc Ubuntu Setup
46- uses : ./.github/actions/bootc-ubuntu-setup
47- - name : Build with continuous repo enabled
48- run : sudo just build --build-arg=continuous_repo=1
49- # Check for security vulnerabilities and license compliance
50- cargo-deny :
51- runs-on : ubuntu-24.04
52- steps :
53- - uses : actions/checkout@v4
54- - uses : EmbarkStudios/cargo-deny-action@v2
55- with :
56- log-level : warn
57- command : check -A duplicate bans sources licenses
58- # Test bootc installation scenarios and fsverity support
59- # TODO convert to be an integration test
60- install-tests :
61- name : " Test install"
62- runs-on : ubuntu-24.04
63- steps :
64- - name : Checkout repository
65- uses : actions/checkout@v4
66- - name : Bootc Ubuntu Setup
67- uses : ./.github/actions/bootc-ubuntu-setup
68- - name : Enable fsverity for /
69- run : sudo tune2fs -O verity $(findmnt -vno SOURCE /)
70- - name : Install utils
71- run : sudo apt -y install fsverity just
72- - name : Integration tests
73- run : |
74- set -xeu
75- # Build images to test; TODO investigate doing single container builds
76- # via GHA and pushing to a temporary registry to share among workflows?
77- sudo just build
78- sudo just build-install-test-image
79- sudo podman build -t localhost/bootc-fsverity -f ci/Containerfile.install-fsverity
80-
81- # TODO move into a container, and then have this tool run other containers
82- cargo build --release -p tests-integration
83-
84- df -h /
85- sudo install -m 0755 target/release/tests-integration /usr/bin/bootc-integration-tests
86- rm target -rf
87- df -h /
88- # The ostree-container tests
89- sudo podman run --privileged --pid=host -v /:/run/host -v $(pwd):/src:ro -v /var/tmp:/var/tmp \
90- --tmpfs /var/lib/containers \
91- -v /run/dbus:/run/dbus -v /run/systemd:/run/systemd localhost/bootc /src/crates/ostree-ext/ci/priv-integration.sh
92- # Nondestructive but privileged tests
93- sudo bootc-integration-tests host-privileged localhost/bootc-integration-install
94- # Install tests
95- sudo bootc-integration-tests install-alongside localhost/bootc-integration-install
96-
97- # system-reinstall-bootc tests
98- cargo build --release -p system-reinstall-bootc
99-
100- # not sure why this is missing in the ubuntu image but just creating this directory allows the tests to pass
101- sudo mkdir -p /run/sshd
102-
103- sudo install -m 0755 target/release/system-reinstall-bootc /usr/bin/system-reinstall-bootc
104- # These tests may mutate the system live so we can't run in parallel
105- sudo bootc-integration-tests system-reinstall localhost/bootc-integration --test-threads=1
106-
107- # And the fsverity case
108- sudo podman run --privileged --pid=host localhost/bootc-fsverity bootc install to-existing-root --stateroot=other \
109- --acknowledge-destructive --skip-fetch-check
110- # Crude cross check
111- sudo find /ostree/repo/objects -name '*.file' -type f | while read f; do
112- sudo fsverity measure $f >/dev/null
113- done
114- # Test that we can build documentation
115- docs :
116- runs-on : ubuntu-24.04
117- steps :
118- - uses : actions/checkout@v4
119- - name : Bootc Ubuntu Setup
120- uses : ./.github/actions/bootc-ubuntu-setup
121- - name : Build mdbook
122- run : just build-mdbook
123- # Build containers and disk images for integration testing across OS matrix
124- build-integration :
125- strategy :
126- fail-fast : false
127- matrix :
128- test_os : [fedora-42, fedora-43, centos-9, centos-10]
129-
130- runs-on : ubuntu-24.04
131-
132- steps :
133- - uses : actions/checkout@v4
134- - name : Bootc Ubuntu Setup
135- uses : ./.github/actions/bootc-ubuntu-setup
136- with :
137- libvirt : true
138-
139- - name : Build container and disk image
140- run : |
141- tests/build.sh ${{ matrix.test_os }}
142-
143- - name : Run container tests
144- run :
145- just test-container
146-
147- - name : Archive disk image
148- uses : actions/upload-artifact@v4
149- with :
150- name : PR-${{ github.event.number }}-${{ matrix.test_os }}-${{ env.ARCH }}-disk
151- path : target/bootc-integration-test.qcow2
152- retention-days : 1
153-
31+ # # Run basic validation checks (linting, formatting, etc)
32+ # validate:
33+ # runs-on: ubuntu-24.04
34+ # steps:
35+ # - uses: actions/checkout@v4
36+ # - name: Bootc Ubuntu Setup
37+ # uses: ./.github/actions/bootc-ubuntu-setup
38+ # - name: Validate (default)
39+ # run: just validate
40+ # # Build container with continuous repository enabled
41+ # container-continuous:
42+ # runs-on: ubuntu-24.04
43+ # steps:
44+ # - uses: actions/checkout@v4
45+ # - name: Bootc Ubuntu Setup
46+ # uses: ./.github/actions/bootc-ubuntu-setup
47+ # - name: Build with continuous repo enabled
48+ # run: sudo just build --build-arg=continuous_repo=1
49+ # # Check for security vulnerabilities and license compliance
50+ # cargo-deny:
51+ # runs-on: ubuntu-24.04
52+ # steps:
53+ # - uses: actions/checkout@v4
54+ # - uses: EmbarkStudios/cargo-deny-action@v2
55+ # with:
56+ # log-level: warn
57+ # command: check -A duplicate bans sources licenses
58+ # # Test bootc installation scenarios and fsverity support
59+ # # TODO convert to be an integration test
60+ # install-tests:
61+ # name: "Test install"
62+ # runs-on: ubuntu-24.04
63+ # steps:
64+ # - name: Checkout repository
65+ # uses: actions/checkout@v4
66+ # - name: Bootc Ubuntu Setup
67+ # uses: ./.github/actions/bootc-ubuntu-setup
68+ # - name: Enable fsverity for /
69+ # run: sudo tune2fs -O verity $(findmnt -vno SOURCE /)
70+ # - name: Install utils
71+ # run: sudo apt -y install fsverity just
72+ # - name: Integration tests
73+ # run: |
74+ # set -xeu
75+ # # Build images to test; TODO investigate doing single container builds
76+ # # via GHA and pushing to a temporary registry to share among workflows?
77+ # sudo just build
78+ # sudo just build-install-test-image
79+ # sudo podman build -t localhost/bootc-fsverity -f ci/Containerfile.install-fsverity
80+ #
81+ # # TODO move into a container, and then have this tool run other containers
82+ # cargo build --release -p tests-integration
83+ #
84+ # df -h /
85+ # sudo install -m 0755 target/release/tests-integration /usr/bin/bootc-integration-tests
86+ # rm target -rf
87+ # df -h /
88+ # # The ostree-container tests
89+ # sudo podman run --privileged --pid=host -v /:/run/host -v $(pwd):/src:ro -v /var/tmp:/var/tmp \
90+ # --tmpfs /var/lib/containers \
91+ # -v /run/dbus:/run/dbus -v /run/systemd:/run/systemd localhost/bootc /src/crates/ostree-ext/ci/priv-integration.sh
92+ # # Nondestructive but privileged tests
93+ # sudo bootc-integration-tests host-privileged localhost/bootc-integration-install
94+ # # Install tests
95+ # sudo bootc-integration-tests install-alongside localhost/bootc-integration-install
96+ #
97+ # # system-reinstall-bootc tests
98+ # cargo build --release -p system-reinstall-bootc
99+ #
100+ # # not sure why this is missing in the ubuntu image but just creating this directory allows the tests to pass
101+ # sudo mkdir -p /run/sshd
102+ #
103+ # sudo install -m 0755 target/release/system-reinstall-bootc /usr/bin/system-reinstall-bootc
104+ # # These tests may mutate the system live so we can't run in parallel
105+ # sudo bootc-integration-tests system-reinstall localhost/bootc-integration --test-threads=1
106+ #
107+ # # And the fsverity case
108+ # sudo podman run --privileged --pid=host localhost/bootc-fsverity bootc install to-existing-root --stateroot=other \
109+ # --acknowledge-destructive --skip-fetch-check
110+ # # Crude cross check
111+ # sudo find /ostree/repo/objects -name '*.file' -type f | while read f; do
112+ # sudo fsverity measure $f >/dev/null
113+ # done
114+ # # Test that we can build documentation
115+ # docs:
116+ # runs-on: ubuntu-24.04
117+ # steps:
118+ # - uses: actions/checkout@v4
119+ # - name: Bootc Ubuntu Setup
120+ # uses: ./.github/actions/bootc-ubuntu-setup
121+ # - name: Build mdbook
122+ # run: just build-mdbook
123+ # # Build containers and disk images for integration testing across OS matrix
124+ # build-integration:
125+ # strategy:
126+ # fail-fast: false
127+ # matrix:
128+ # test_os: [fedora-42, fedora-43, centos-9, centos-10]
129+ #
130+ # runs-on: ubuntu-24.04
131+ #
132+ # steps:
133+ # - uses: actions/checkout@v4
134+ # - name: Bootc Ubuntu Setup
135+ # uses: ./.github/actions/bootc-ubuntu-setup
136+ # with:
137+ # libvirt: true
138+ #
139+ # - name: Build container and disk image
140+ # run: |
141+ # tests/build.sh ${{ matrix.test_os }}
142+ #
143+ # - name: Run container tests
144+ # run:
145+ # just test-container
146+ #
147+ # - name: Archive disk image
148+ # uses: actions/upload-artifact@v4
149+ # with:
150+ # name: PR-${{ github.event.number }}-${{ matrix.test_os }}-${{ env.ARCH }}-disk
151+ # path: target/bootc-integration-test.qcow2
152+ # retention-days: 1
153+ #
154+ # # Run TMT-based integration tests on disk images from build-integration
155+ # test-integration:
156+ # needs: build-integration
157+ # strategy:
158+ # fail-fast: false
159+ # matrix:
160+ # test_os: [fedora-42, fedora-43, centos-9, centos-10]
161+ #
162+ # runs-on: ubuntu-24.04
163+ #
164+ # steps:
165+ # - uses: actions/checkout@v4
166+ # - name: Bootc Ubuntu Setup
167+ # uses: ./.github/actions/bootc-ubuntu-setup
168+ # with:
169+ # libvirt: true
170+ # - name: Install tmt
171+ # run: pip install --user "tmt[provision-virtual]"
172+ #
173+ # - name: Create folder to save disk image
174+ # run: mkdir -p target
175+ #
176+ # - name: Download disk.raw
177+ # uses: actions/download-artifact@v4
178+ # with:
179+ # name: PR-${{ github.event.number }}-${{ matrix.test_os }}-${{ env.ARCH }}-disk
180+ # path: target
181+ #
182+ # - name: Workaround https://github.com/teemtee/testcloud/issues/18
183+ # run: sudo rm -f /usr/bin/chcon && sudo ln -sr /usr/bin/true /usr/bin/chcon
184+ #
185+ # - name: Run all TMT tests
186+ # run: |
187+ # just test-tmt-nobuild
188+ #
189+ # - name: Archive TMT logs
190+ # if: always()
191+ # uses: actions/upload-artifact@v4
192+ # with:
193+ # name: tmt-log-PR-${{ github.event.number }}-${{ matrix.test_os }}-${{ env.ARCH }}-${{ matrix.tmt_plan }}
194+ # path: /var/tmp/tmt
195+ #
154196 # Run TMT-based integration tests on disk images from build-integration
155- test-integration :
156- needs : build-integration
197+ test-bcvk :
157198 strategy :
158199 fail-fast : false
159200 matrix :
160- test_os : [fedora-42, fedora-43, centos-9, centos-10 ]
201+ test_os : [fedora-42]
161202
162203 runs-on : ubuntu-24.04
163204
@@ -167,28 +208,15 @@ jobs:
167208 uses : ./.github/actions/bootc-ubuntu-setup
168209 with :
169210 libvirt : true
170- - name : Install tmt
171- run : pip install --user "tmt[provision-virtual]"
172-
173- - name : Create folder to save disk image
174- run : mkdir -p target
175211
176- - name : Download disk.raw
177- uses : actions/download-artifact@v4
212+ - name : Setup upterm session
213+ uses : owenthereal/action-upterm@v1
178214 with :
179- name : PR-${{ github.event.number }}-${{ matrix.test_os }}-${{ env.ARCH }}-disk
180- path : target
215+ limit-access-to-users : cgwalters
181216
182- - name : Workaround https://github.com/teemtee/testcloud/issues/18
183- run : sudo rm -f /usr/bin/chcon && sudo ln -sr /usr/bin/true /usr/bin/chcon
184-
185- - name : Run all TMT tests
217+ - name : Test bcvk
186218 run : |
187- just test-tmt-nobuild
188-
189- - name : Archive TMT logs
190- if : always()
191- uses : actions/upload-artifact@v4
192- with :
193- name : tmt-log-PR-${{ github.event.number }}-${{ matrix.test_os }}-${{ env.ARCH }}-${{ matrix.tmt_plan }}
194- path : /var/tmp/tmt
219+ set -xeuo pipefail
220+ podman pull quay.io/fedora/fedora-bootc:42
221+ mkdir -p target
222+ bcvk to-disk quay.io/fedora/fedora-bootc:42 target/disk.img
0 commit comments