@@ -114,10 +114,40 @@ jobs:
114114 uses : ./.github/actions/bootc-ubuntu-setup
115115 - name : Build mdbook
116116 run : just build-mdbook
117+ # Build packages for each test OS
118+ package :
119+ strategy :
120+ fail-fast : false
121+ matrix :
122+ test_os : [fedora-42, fedora-43, centos-9, centos-10]
123+
124+ runs-on : ubuntu-24.04
125+
126+ steps :
127+ - uses : actions/checkout@v6
128+ - name : Bootc Ubuntu Setup
129+ uses : ./.github/actions/bootc-ubuntu-setup
130+
131+ - name : Setup env
132+ run : |
133+ BASE=$(just pullspec-for-os ${{ matrix.test_os }})
134+ echo "BOOTC_base=${BASE}" >> $GITHUB_ENV
135+
136+ - name : Build packages
137+ run : just package
138+
139+ - name : Upload package artifacts
140+ uses : actions/upload-artifact@v5
141+ with :
142+ name : packages-${{ matrix.test_os }}
143+ path : target/packages/*.rpm
144+ retention-days : 1
145+
117146 # Build bootc from source into a container image FROM each specified base `test_os`
118147 # running unit and integration tests (using TMT, leveraging the support for nested virtualization
119148 # in the GHA runners)
120149 test-integration :
150+ needs : package
121151 strategy :
122152 fail-fast : false
123153 matrix :
@@ -139,9 +169,15 @@ jobs:
139169 BASE=$(just pullspec-for-os base ${{ matrix.test_os }})
140170 echo "BOOTC_base=${BASE}" >> $GITHUB_ENV
141171
172+ - name : Download package artifacts
173+ uses : actions/download-artifact@v5
174+ with :
175+ name : packages-${{ matrix.test_os }}
176+ path : target/packages/
177+
142178 - name : Build container
143179 run : |
144- just build-integration-test-image
180+ just build-integration-test-image-from-package target/packages
145181 # Extra cross-check (duplicating the integration test) that we're using the right base
146182 used_vid=$(podman run --rm localhost/bootc-integration bash -c '. /usr/lib/os-release && echo ${ID}-${VERSION_ID}')
147183 test ${{ matrix.test_os }} = "${used_vid}"
@@ -176,6 +212,7 @@ jobs:
176212 # This variant does composefs testing
177213 test-integration-cfs :
178214 continue-on-error : ${{ matrix.experimental }}
215+ needs : package
179216 strategy :
180217 fail-fast : false
181218 matrix :
@@ -208,12 +245,15 @@ jobs:
208245 echo "BOOTC_buildroot_base=${BUILDROOTBASE}" >> $GITHUB_ENV
209246 echo "BOOTC_variant="${{ matrix.variant }} >> $GITHUB_ENV
210247
248+ - name : Download package artifacts
249+ uses : actions/download-artifact@v5
250+ with :
251+ name : packages-${{ matrix.test_os }}
252+ path : target/packages/
253+
211254 - name : Build container
212255 run : |
213- just build-integration-test-image
214- # Extra cross-check (duplicating the integration test) that we're using the right base
215- used_vid=$(podman run --rm localhost/bootc-integration bash -c '. /usr/lib/os-release && echo ${ID}-${VERSION_ID}')
216- test ${{ matrix.test_os }} = "${used_vid}"
256+ just build-integration-test-image-from-package target/packages
217257
218258 - name : Unit and container integration tests
219259 run : just test-container
@@ -246,12 +286,13 @@ jobs:
246286 # Sentinel job for required checks - configure this job name in repository settings
247287 required-checks :
248288 if : always()
249- needs : [cargo-deny, validate, test-integration, test-integration-cfs]
289+ needs : [cargo-deny, validate, package, test-integration, test-integration-cfs]
250290 runs-on : ubuntu-latest
251291 steps :
252292 - run : exit 1
253293 if : >-
254294 needs.cargo-deny.result != 'success' ||
255295 needs.validate.result != 'success' ||
296+ needs.package.result != 'success' ||
256297 needs.test-integration.result != 'success' ||
257298 needs.test-integration-cfs.result != 'success'
0 commit comments