Skip to content

Separate the snap by cuda version on v4 (#67) #42

Separate the snap by cuda version on v4 (#67)

Separate the snap by cuda version on v4 (#67) #42

Workflow file for this run

# This file is centrally managed as a template file in https://github.com/canonical/solutions-engineering-automation
# To update the file:
# - Edit it in the canonical/solutions-engineering-automation repository.
# - Open a PR with the changes.
# - When the PR merges, the soleng-terraform bot will open a PR to the target repositories with the changes.
name: Publish snap
on:
push:
branches: [ main ]
release:
types: [ published ]
jobs:
check:
uses: ./.github/workflows/check.yaml
secrets: inherit
release:
runs-on: ${{ matrix.runs-on }}
needs: check
strategy:
fail-fast: false
matrix:
runs-on: [[ubuntu-24.04], [self-hosted, jammy, ARM64]]
cuda-version: [11, 12, 13]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Complete git history is required to generate the version from git tags.
- name: Determine system architecture
run: echo "SYSTEM_ARCH=$(uname -m)" >> $GITHUB_ENV
- name: Download the built snap from check workflow
uses: actions/download-artifact@v4
with:
name: snap_${{ matrix.cuda-version }}_${{ env.SYSTEM_ARCH }}
- name: Find the downloaded snap file
run: echo "SNAP_FILE=$(find . -name "*.snap")" >> $GITHUB_ENV
- uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
with:
snap: ${{ env.SNAP_FILE }}
# Comma-separated list of channels to release the snap to.
release: v4-cuda${{ matrix.cuda-version }}/edge
notify-on-release-failure:
runs-on: ubuntu-latest
needs:
- check
- release
if: ${{ failure() && github.run_attempt == 1 }}
steps:
- name: Notify release failure
uses: mattermost/action-mattermost-notify@master
with:
MATTERMOST_WEBHOOK_URL: ${{ secrets.MATTERMOST_WEBHOOK_URL }}
TEXT: |
:rotating_light: @soleng release failed in project [${{ github.repository }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})