File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -37,11 +37,15 @@ jobs:
3737 build-n-test :
3838 runs-on : [gpu]
3939
40+ strategy :
41+ matrix :
42+ target : [release, develop]
43+
4044 steps :
4145 - name : Define environment variables
4246 run : |
43- echo IMAGE_NAME=ghcr.io/ $(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
44- echo TAG =$(echo "PR-${{ github.event.pull_request.number }}") >> $GITHUB_ENV
47+ echo IMAGE_NAME=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
48+ echo IMAGE_TAG =$(echo "PR-${{ github.event.pull_request.number }}-${{ matrix.target }}") >> $GITHUB_ENV
4549
4650 - name : Checkout code
4751 uses : actions/checkout@v4
@@ -53,12 +57,14 @@ jobs:
5357 uses : docker/build-push-action@v6
5458 with :
5559 load : true
56- tags : ${{ env.IMAGE_NAME }}:${{ env.TAG }}
57- target : develop
60+ tags : |
61+ ghcr.io/${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }}
62+ target : ${{ matrix.target }}
5863 cache-from : type=local,src=/home/runner/.buildx-cache
5964 cache-to : type=local,dest=/home/runner/.buildx-cache,mode=max
6065
6166 - name : Run tests
67+ if : ${{ matrix.target == 'develop' }}
6268 run : |
63- docker run --rm ${{ env.IMAGE_NAME }}:${{ env.TAG }} /src/eic-opticks/tests/test_opticks.sh
64- docker run --rm ${{ env.IMAGE_NAME }}:${{ env.TAG }} /src/eic-opticks/tests/test_simg4ox.sh
69+ docker run --rm ghcr.io/ ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} /src/eic-opticks/tests/test_opticks.sh
70+ docker run --rm ghcr.io/ ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} /src/eic-opticks/tests/test_simg4ox.sh
You can’t perform that action at this time.
0 commit comments