Skip to content

Nvidia Graphics Tests #55

Nvidia Graphics Tests

Nvidia Graphics Tests #55

Workflow file for this run

name: Nvidia Graphics Tests
on:
# Uncomment this trigger only during workflow development
# pull_request:
# branches: [ main ]
# Manual trigger
workflow_dispatch:
inputs:
run_id:
description: 'Run id number'
required: true
type: number
publish:
description: 'Publish to Store'
default: true
type: boolean
jobs:
publish:
if: ${{ inputs.publish == true }}
runs-on: ubuntu-latest
steps:
- name: Get the artifact
uses: dawidd6/action-download-artifact@v7
with:
run_id: ${{ inputs.run_id }}
name: docker_${{ inputs.run_id }}.snap
- name: Publish to Store
uses: snapcore/action-publish@v1
env:
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_LOGIN }}
with:
snap: docker_${{ inputs.run_id }}.snap
release: latest/edge/runid-${{ inputs.run_id }}
test:
needs: publish
if: ${{ always() && !failure() && !cancelled() }}
runs-on: [self-hosted, testflinger]
env:
TESTFLINGER_DIR: .github/workflows/testflinger
JOB_QUEUE: docker-nvidia
SNAP_CHANNEL: latest/edge/runid-${{ inputs.run_id }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create Testflinger job queue
run: |
envsubst '$JOB_QUEUE' \
< $TESTFLINGER_DIR/nvidia-job.yaml \
> $TESTFLINGER_DIR/nvidia-job.temp
envsubst '$SNAP_CHANNEL' \
< $TESTFLINGER_DIR/scripts/setup.sh \
> $TESTFLINGER_DIR/scripts/setup.temp
mv $TESTFLINGER_DIR/nvidia-job.temp $TESTFLINGER_DIR/nvidia-job.yaml
mv $TESTFLINGER_DIR/scripts/setup.temp $TESTFLINGER_DIR/scripts/setup.sh
- name: Submit Testflinger job
uses: canonical/testflinger/.github/actions/submit@main
with:
poll: true
job-path: ${{ env.TESTFLINGER_DIR }}/nvidia-job.yaml