Skip to content

Snap

Snap #57

Workflow file for this run

name: Snap
on:
merge_group:
types: [checks_requested]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
Snap:
runs-on: ubuntu-latest
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
platform: ${{ fromJSON(github.repository == github.event.pull_request.head.repo.full_name && '["amd64","armhf","arm64","ppc64el","s390x"]' || '["amd64"]') }}
steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0 # needed for version determination
- name: Build and publish the snap
id: build-snap
uses: canonical/actions/build-snap@release
with:
architecture: ${{ matrix.platform }}
snapcraft-token: ${{ secrets.SNAPCRAFT_TOKEN }}
launchpad-credentials: ${{ secrets.LAUNCHPAD_CREDENTIALS }}
publish: ${{ github.event_name == 'pull_request' && github.repository == github.event.pull_request.head.repo.full_name }}
publish-channel: edge/pr${{ github.event.number }}
- name: Test the snap
if: ${{ matrix.platform == 'amd64' }}
run: |
sudo snap install --dangerous ${{ steps.build-snap.outputs.snap-path }}
sudo snap install mir-test-tools --channel 24/stable
sudo snap connect mir-test-tools:login-session-control
sudo snap connect mir-test-tools:gpu-2404 mesa-2404
sudo adduser $USER video
sudo adduser $USER input
sg video "
sg input '
mir-test-tools.smoke-test
'
"