delete symlinks on reconfigure #4
Workflow file for this run
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
| on: | |
| release: | |
| types: [published] | |
| env: | |
| DOCKER_TAG: ghcr.io/${{ github.repository }} | |
| VERSION: ${{ github.ref_name }} | |
| jobs: | |
| validate-tag: # Make sure the tag we're publishing looks like semantic versioning | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Validate tag format | |
| run: | | |
| TAG="${{ github.event.release.tag_name }}" | |
| echo "Validating tag: '$TAG'" | |
| if [[ $TAG =~ ^[0-9]+\.[0-9]+\.[0-9]+(-rc[0-9]*)?$ ]]; then | |
| echo "Tag matches semver." | |
| else | |
| echo "Error: tag does not match semver." | |
| exit 1 | |
| fi | |
| container: # Upload the docker image to the Github Container Registry | |
| needs: [validate-tag] | |
| strategy: | |
| matrix: | |
| build_target: | |
| - docker_suffix: jetpack5 | |
| dockerfile: Dockerfile.triton-jetpack-focal | |
| build_args: | |
| runs_on: buildjet-8vcpu-ubuntu-2204-arm | |
| platform: linux/arm64 | |
| - docker_suffix: jetpack6 | |
| dockerfile: Dockerfile.nvcr-triton-containers | |
| build_args: JETPACK=1 | |
| runs_on: buildjet-8vcpu-ubuntu-2204-arm | |
| platform: linux/arm64 | |
| - docker_suffix: cuda12_arm | |
| dockerfile: Dockerfile.nvcr-triton-containers | |
| build_args: | |
| runs_on: buildjet-8vcpu-ubuntu-2204-arm | |
| platform: linux/arm64 | |
| - docker_suffix: cuda12_amd64 | |
| dockerfile: Dockerfile.nvcr-triton-containers | |
| build_args: | |
| runs_on: buildjet-8vcpu-ubuntu-2204 | |
| platform: linux/amd64 | |
| runs-on: ${{ matrix.build_target.runs_on }} | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: docker/setup-buildx-action@v2 | |
| - uses: docker/login-action@v2 | |
| with: | |
| username: viambuild | |
| password: ${{ secrets.DOCKER_PUBLIC_READONLY_PAT }} | |
| - uses: docker/login-action@v2 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: docker/build-push-action@v4 | |
| with: | |
| tags: ${{ env.DOCKER_TAG }}/${{ matrix.build_target.docker_suffix}}:${{ env.VERSION }},${{ env.DOCKER_TAG }}/${{ matrix.build_target.docker_suffix}}:latest | |
| pull: true | |
| platforms: ${{ matrix.build_target.platform }} | |
| push: ${{ github.event_name == 'release' }} | |
| file: etc/docker/${{ matrix.build_target.dockerfile }} | |
| build-args: ${{ matrix.build_target.build_args }} | |
| module: # Upload the module to the Viam modular registry | |
| needs: [validate-tag, container] | |
| strategy: | |
| # Until Viam's tags get priorities, it is very important to deploy the Jetpack versions | |
| # *before* the CUDA versions. Otherwise, a Jetpack machine will use the CUDA version of the | |
| # module because it can (which will work, but miss out on the Jetpack-specific features). So, | |
| # remove the parallelization and do these uploads in order until tag priorities are supported | |
| # (see APP-6759). | |
| max-parallel: 1 | |
| matrix: | |
| platform: | |
| - arch: arm64 | |
| docker_suffix: jetpack5 | |
| tags: "jetpack:5" | |
| - arch: arm64 | |
| docker_suffix: jetpack6 | |
| tags: "jetpack:6" | |
| - arch: arm64 | |
| docker_suffix: cuda12_arm | |
| tags: "cuda:true" | |
| - arch: amd64 | |
| docker_suffix: cuda12_amd64 | |
| tags: "cuda:true" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: build | |
| run: | | |
| TAG=${{ env.DOCKER_TAG }}/${{ matrix.platform.docker_suffix }}:$VERSION make -f Makefile.module module.tar.gz | |
| - uses: viamrobotics/upload-module@v1 | |
| if: github.event_name == 'release' | |
| with: | |
| module-path: module.tar.gz | |
| platform: linux/${{ matrix.platform.arch }} | |
| version: ${{ env.VERSION }} | |
| key-id: ${{ secrets.viam_key_id }} | |
| key-value: ${{ secrets.viam_key_value }} | |
| tags: ${{ matrix.platform.tags }} |