feat(csg): support partial-phi spheres and tubes (#426) #270
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Push Image | |
| on: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name || github.event_name }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build-push: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: [release, develop] | |
| config: | |
| - os: ubuntu26.04 | |
| cuda_version: 13.3.0 | |
| optix_version: 9.1.0 | |
| geant4_version: 11.4.2 | |
| cmake_version: 4.3.4 | |
| default_alias: false | |
| - os: ubuntu24.04 | |
| cuda_version: 13.0.3 | |
| optix_version: 9.0.0 | |
| geant4_version: 11.4.2 | |
| cmake_version: 4.2.1 | |
| default_alias: true | |
| - os: ubuntu24.04 | |
| cuda_version: 12.5.1 | |
| optix_version: 9.0.0 | |
| geant4_version: 11.4.1 | |
| cmake_version: 3.28.3 | |
| default_alias: false | |
| - os: ubuntu22.04 | |
| cuda_version: 12.1.1 | |
| optix_version: 8.0.0 | |
| geant4_version: 11.3.2 | |
| cmake_version: 3.22.1 | |
| default_alias: false | |
| steps: | |
| - name: Define environment variables | |
| run: | | |
| IMAGE_NAME=ghcr.io/$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') | |
| CACHE_IMAGE_NAME=${IMAGE_NAME}-buildcache | |
| BASE_VARIANT=cuda${{ matrix.config.cuda_version }}-base-${{ matrix.config.os }}-optix${{ matrix.config.optix_version }}-geant4${{ matrix.config.geant4_version }}-cmake${{ matrix.config.cmake_version }} | |
| 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 }} | |
| echo IMAGE_NAME=${IMAGE_NAME} >> $GITHUB_ENV | |
| echo IMAGE_TAG=${BUILD_VARIANT} >> $GITHUB_ENV | |
| echo BASE_CACHE_REF=${CACHE_IMAGE_NAME}:${BASE_VARIANT} >> $GITHUB_ENV | |
| echo CACHE_REF=${CACHE_IMAGE_NAME}:${BUILD_VARIANT} >> $GITHUB_ENV | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push to registries | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| push: true | |
| tags: | | |
| ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} | |
| target: ${{ matrix.target }} | |
| build-args: | | |
| OS=${{ matrix.config.os }} | |
| CUDA_VERSION=${{ matrix.config.cuda_version }} | |
| OPTIX_VERSION=${{ matrix.config.optix_version }} | |
| GEANT4_VERSION=${{ matrix.config.geant4_version }} | |
| CMAKE_VERSION=${{ matrix.config.cmake_version }} | |
| cache-from: | | |
| type=registry,ref=${{ env.BASE_CACHE_REF }} | |
| type=registry,ref=${{ env.CACHE_REF }} | |
| cache-to: type=registry,ref=${{ env.CACHE_REF }},mode=max | |
| - name: Add alias tag for default configuration | |
| if: ${{ github.ref_name == 'main' && matrix.target == 'develop' && matrix.config.default_alias }} | |
| run: | | |
| docker buildx imagetools create -t ${{ env.IMAGE_NAME }}:develop ${{ env.IMAGE_NAME }}:${{ env.IMAGE_TAG }} | |
| cleanup: | |
| runs-on: ubuntu-latest | |
| needs: build-push | |
| steps: | |
| - uses: dataaxiom/ghcr-cleanup-action@v1 | |
| with: | |
| packages: ${{ github.event.repository.name }},${{ github.event.repository.name }}-buildcache |