Skip to content

Commit 423cacc

Browse files
committed
ci: run tests in release images
1 parent 298adac commit 423cacc

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

.github/workflows/build-pull-request.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,12 @@ jobs:
118118
cache-from: |
119119
type=registry,ref=${{ env.BASE_CACHE_REF }}
120120
type=registry,ref=${{ env.CACHE_REF }}
121-
push: ${{ matrix.target == 'develop' && github.event.pull_request.head.repo.full_name == github.repository }}
121+
push: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
122122

123123
test-develop-image:
124124
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
125125
needs: build-image
126+
name: Test PR image (${{ matrix.target }}, ${{ matrix.config.os }}, ${{ matrix.config.cuda_version }}, ${{ matrix.config.optix_version }}, ${{ matrix.config.geant4_version }})
126127
runs-on: [gpu]
127128
permissions:
128129
contents: read
@@ -131,6 +132,7 @@ jobs:
131132
strategy:
132133
fail-fast: false
133134
matrix:
135+
target: [release, develop]
134136
config: *build_configs
135137
exclude:
136138
# The gpu runner driver does not support the ubuntu26.04/CUDA 13.3.0 image yet.
@@ -146,7 +148,7 @@ jobs:
146148
run: |
147149
IMAGE_NAME=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')-buildcache
148150
REF_SANITIZED=PR-${{ github.event.pull_request.number }}
149-
BUILD_VARIANT=cuda${{ matrix.config.cuda_version }}-develop-${{ matrix.config.os }}-optix${{ matrix.config.optix_version }}-geant4${{ matrix.config.geant4_version }}-cmake${{ matrix.config.cmake_version }}
151+
BUILD_VARIANT=cuda${{ matrix.config.cuda_version }}-${{ matrix.target }}-${{ matrix.config.os }}-optix${{ matrix.config.optix_version }}-geant4${{ matrix.config.geant4_version }}-cmake${{ matrix.config.cmake_version }}
150152
echo IMAGE_NAME=${IMAGE_NAME} >> $GITHUB_ENV
151153
echo IMAGE_TAG=${REF_SANITIZED}-${BUILD_VARIANT} >> $GITHUB_ENV
152154
@@ -157,7 +159,7 @@ jobs:
157159
username: ${{ github.actor }}
158160
password: ${{ secrets.GITHUB_TOKEN }}
159161

160-
- name: Pull develop image
162+
- name: Pull PR image
161163
run: |
162164
docker pull ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
163165
@@ -188,14 +190,15 @@ jobs:
188190
strategy:
189191
fail-fast: false
190192
matrix:
193+
target: [release, develop]
191194
config: *build_configs
192195

193196
steps:
194197
- name: Define environment variables
195198
run: |
196199
PACKAGE_NAME=$(echo ${{ github.event.repository.name }} | tr '[:upper:]' '[:lower:]')-buildcache
197200
REF_SANITIZED=PR-${{ github.event.pull_request.number }}
198-
BUILD_VARIANT=cuda${{ matrix.config.cuda_version }}-develop-${{ matrix.config.os }}-optix${{ matrix.config.optix_version }}-geant4${{ matrix.config.geant4_version }}-cmake${{ matrix.config.cmake_version }}
201+
BUILD_VARIANT=cuda${{ matrix.config.cuda_version }}-${{ matrix.target }}-${{ matrix.config.os }}-optix${{ matrix.config.optix_version }}-geant4${{ matrix.config.geant4_version }}-cmake${{ matrix.config.cmake_version }}
199202
echo PACKAGE_NAME=${PACKAGE_NAME} >> $GITHUB_ENV
200203
echo IMAGE_TAG=${REF_SANITIZED}-${BUILD_VARIANT} >> $GITHUB_ENV
201204

0 commit comments

Comments
 (0)