From 94a917f737e3da3e770d18c5728fa58b1dd59c17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Tue, 6 Feb 2024 12:02:34 +0100 Subject: [PATCH 1/2] ci: run snaps on PRs, but only when process_snaps.py changed Improve the concurrency groups, too. --- .github/workflows/snaps.yml | 7 ++++++- .github/workflows/test.yml | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/snaps.yml b/.github/workflows/snaps.yml index b21d4a75..a91eefd2 100644 --- a/.github/workflows/snaps.yml +++ b/.github/workflows/snaps.yml @@ -1,7 +1,7 @@ name: Snaps concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event.number && format('pr{0}', github.event.number) || github.ref_name }} cancel-in-progress: true on: @@ -10,6 +10,11 @@ on: workflow_dispatch: schedule: - cron: '0 * * * *' + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + paths: + - .github/workflows/snaps.yml + - bin/process_snaps.py jobs: ProcessSnaps: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0e415f5e..668b2c79 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,7 @@ name: Test concurrency: - group: ${{ github.workflow }}-${{ github.ref }} + group: ${{ github.workflow }}-${{ github.event.number && format('pr{0}', github.event.number) || github.ref_name }} cancel-in-progress: true on: @@ -9,6 +9,9 @@ on: types: [checks_requested] pull_request: types: [opened, synchronize, reopened, ready_for_review] + paths: + - .github/workflows/test*yml + - mir-ci/** jobs: RunTests: From 950e5a85e8118c0b93bb9106645bb9b59d990b54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Sawicz?= Date: Tue, 6 Feb 2024 13:39:22 +0100 Subject: [PATCH 2/2] snaps: skip usns for `base: core24` snaps The security DB doesn't yet have `noble`. --- bin/process_snaps.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/process_snaps.py b/bin/process_snaps.py index 67023b0e..08f5b3fe 100755 --- a/bin/process_snaps.py +++ b/bin/process_snaps.py @@ -36,7 +36,7 @@ "graphics-test-tools": { "20/beta": {"recipe": "graphics-test-tools-20-beta"}, "22/beta": {"recipe": "graphics-test-tools-22-beta"}, - "24/edge": {"recipe": "graphics-test-tools-24-edge"}, + "24/edge": {"recipe": "graphics-test-tools-24-edge", "check-usns": False}, }, "mir-kiosk": { "edge": {"ppa": "dev", "recipe": "mir-kiosk-edge", "release": "focal"}, @@ -56,7 +56,7 @@ "20/beta": {"ppa": "rc", "recipe": "mir-test-tools-20-beta", "release": "focal"}, "22/edge": {"ppa": "dev", "recipe": "mir-test-tools-22-edge"}, "22/beta": {"ppa": "rc", "recipe": "mir-test-tools-22-beta"}, - "24/edge": {"ppa": "dev", "recipe": "mir-test-tools-24-edge", "release": "noble"}, + "24/edge": {"ppa": "dev", "recipe": "mir-test-tools-24-edge", "release": "noble", "check-usns": False}, }, "miriway": { "edge": {"ppa": "dev", "recipe": "miriway-edge"}, @@ -85,7 +85,7 @@ "beta": {"recipe": "mesa-core22-beta"}, }, "mesa-core24": { - "edge": {"recipe": "mesa-core24-edge"}, + "edge": {"recipe": "mesa-core24-edge", "check-usns": False}, }, "nvidia-core22": { "beta": {"recipe": "nvidia-core22-beta"}, @@ -307,7 +307,7 @@ def getSeries(name): or mir_version == SNAP_VERSION_RE.match(store_snap["version"]).group("mir") for store_snap in store_snaps): - if check_notices: + if snap_map.get("check-usns", True) and check_notices: snap_notices = check_snap_notices(store_snaps)[snap] if any(snap_notices.values()):