From 56a687ee815af387df14292d911e23678db9ce30 Mon Sep 17 00:00:00 2001 From: katie Date: Tue, 19 Nov 2024 18:52:13 +0100 Subject: [PATCH] add dispatch --- .github/workflows/test.yaml | 371 ++++++++++++++++++------------------ 1 file changed, 186 insertions(+), 185 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 652c5aaf7bf..be4f72fd5e2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -4,43 +4,44 @@ on: branches: [ "master", "release/**", "core-snap-security-release/**", "security-release/**" ] push: branches: [ "master", "release/**", "core-snap-security-release/**", "security-release/**" ] + workflow_dispatch: concurrency: group: ${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: - snap-builds: - uses: ./.github/workflows/snap-builds.yaml - with: - runs-on: ${{ matrix.runs-on }} - toolchain: ${{ matrix.toolchain }} - variant: ${{ matrix.variant }} - strategy: - matrix: - runs-on: - - '["ubuntu-22.04"]' - # Tags to identify the self-hosted runners to use from - # internal runner collection. See internal self-hosted - # runners doc for the complete list of options. - - '["self-hosted", "Linux", "jammy", "ARM64", "large"]' - toolchain: - - default - - FIPS - variant: - # test version is a build of snapd with test keys and should - # only be installed by test runners. The pristine versions - # are the build that should be installed by human users. - - pristine - - test - # Exclude building everything for ARM but the version for testing - # to keep the number of builds down as we currently don't have a - # clear need for these excluded builds. - exclude: - - runs-on: '["self-hosted", "Linux", "jammy", "ARM64", "large"]' - toolchain: FIPS - - runs-on: '["self-hosted", "Linux", "jammy", "ARM64", "large"]' - variant: pristine + # snap-builds: + # uses: ./.github/workflows/snap-builds.yaml + # with: + # runs-on: ${{ matrix.runs-on }} + # toolchain: ${{ matrix.toolchain }} + # variant: ${{ matrix.variant }} + # strategy: + # matrix: + # runs-on: + # - '["ubuntu-22.04"]' + # # Tags to identify the self-hosted runners to use from + # # internal runner collection. See internal self-hosted + # # runners doc for the complete list of options. + # - '["self-hosted", "Linux", "jammy", "ARM64", "large"]' + # toolchain: + # - default + # - FIPS + # variant: + # # test version is a build of snapd with test keys and should + # # only be installed by test runners. The pristine versions + # # are the build that should be installed by human users. + # - pristine + # - test + # # Exclude building everything for ARM but the version for testing + # # to keep the number of builds down as we currently don't have a + # # clear need for these excluded builds. + # exclude: + # - runs-on: '["self-hosted", "Linux", "jammy", "ARM64", "large"]' + # toolchain: FIPS + # - runs-on: '["self-hosted", "Linux", "jammy", "ARM64", "large"]' + # variant: pristine cache-build-deps: runs-on: ubuntu-20.04 @@ -188,157 +189,157 @@ jobs: files: .coverage/coverage-*.cov verbose: true - spread: - uses: ./.github/workflows/spread-tests.yaml - needs: [unit-tests, snap-builds] - name: "spread ${{ matrix.group }}" - with: - # Github doesn't support passing sequences as parameters. - # Instead here we create a json array and pass it as a string. - # Then in the spread workflow it turns it into a sequence - # using the fromJSON expression. - runs-on: '["self-hosted", "spread-enabled"]' - group: ${{ matrix.group }} - backend: ${{ matrix.backend }} - systems: ${{ matrix.systems }} - tasks: ${{ matrix.tasks }} - rules: ${{ matrix.rules }} - strategy: - # FIXME: enable fail-fast mode once spread can cancel an executing job. - # Disable fail-fast mode as it doesn't function with spread. It seems - # that cancelling tasks requires short, interruptible actions and - # interrupting spread, notably, does not work today. As such disable - # fail-fast while we tackle that problem upstream. - fail-fast: false - matrix: - include: - - group: amazon-linux - backend: google-distro-1 - systems: 'amazon-linux-2-64 amazon-linux-2023-64' - tasks: 'tests/...' - rules: 'main' - - group: arch-linux - backend: google-distro-2 - systems: 'arch-linux-64' - tasks: 'tests/...' - rules: 'main' - - group: centos - backend: google-distro-2 - systems: 'centos-9-64' - tasks: 'tests/...' - rules: 'main' - - group: debian-req - backend: google-distro-1 - systems: 'debian-11-64' - tasks: 'tests/...' - rules: 'main' - - group: debian-not-req - backend: google-distro-1 - systems: 'debian-12-64 debian-sid-64' - tasks: 'tests/...' - rules: 'main' - - group: fedora - backend: openstack - systems: 'fedora-40-64 fedora-41-64' - tasks: 'tests/...' - rules: 'main' - - group: opensuse - backend: google-distro-2 - systems: 'opensuse-15.5-64 opensuse-15.6-64 opensuse-tumbleweed-64' - tasks: 'tests/...' - rules: 'main' - - group: ubuntu-trusty - backend: google - systems: 'ubuntu-14.04-64' - tasks: 'tests/smoke/ tests/main/canonical-livepatch tests/main/canonical-livepatch-14.04' - rules: 'trusty' - - group: ubuntu-xenial-bionic - backend: google - systems: 'ubuntu-16.04-64 ubuntu-18.04-64' - tasks: 'tests/...' - rules: 'main' - - group: ubuntu-focal-jammy - backend: google - systems: 'ubuntu-20.04-64 ubuntu-22.04-64' - tasks: 'tests/...' - rules: 'main' - - group: ubuntu-noble - backend: google - systems: 'ubuntu-24.04-64' - tasks: 'tests/...' - rules: 'main' - - group: ubuntu-no-lts - backend: google - systems: '' - tasks: 'tests/...' - rules: 'main' - - group: ubuntu-daily - backend: google - systems: 'ubuntu-24.10-64' - tasks: 'tests/...' - rules: 'main' - - group: ubuntu-core-16 - backend: google-core - systems: 'ubuntu-core-16-64' - tasks: 'tests/...' - rules: 'main' - - group: ubuntu-core-18 - backend: google-core - systems: 'ubuntu-core-18-64' - tasks: 'tests/...' - rules: 'main' - - group: ubuntu-core-20 - backend: google-core - systems: 'ubuntu-core-20-64' - tasks: 'tests/...' - rules: 'main' - - group: ubuntu-core-22 - backend: google-core - systems: 'ubuntu-core-22-64' - tasks: 'tests/...' - rules: 'main' - - group: ubuntu-core-24 - backend: google-core - systems: 'ubuntu-core-24-64' - tasks: 'tests/...' - rules: 'main' - - group: ubuntu-arm64 - backend: google-arm - systems: 'ubuntu-20.04-arm-64 ubuntu-core-22-arm-64' - tasks: 'tests/...' - rules: 'main' - - group: ubuntu-secboot - backend: google - systems: 'ubuntu-secboot-20.04-64' - tasks: 'tests/...' - rules: 'main' - - group: ubuntu-fips - backend: google-pro - systems: 'ubuntu-fips-22.04-64' - tasks: 'tests/fips/...' - rules: 'main' - - group: nested-ubuntu-16.04 - backend: google-nested - systems: 'ubuntu-16.04-64' - tasks: 'tests/nested/...' - rules: 'nested' - - group: nested-ubuntu-18.04 - backend: google-nested - systems: 'ubuntu-18.04-64' - tasks: 'tests/nested/...' - rules: 'nested' - - group: nested-ubuntu-20.04 - backend: google-nested - systems: 'ubuntu-20.04-64' - tasks: 'tests/nested/...' - rules: 'nested' - - group: nested-ubuntu-22.04 - backend: google-nested - systems: 'ubuntu-22.04-64' - tasks: 'tests/nested/...' - rules: 'nested' - - group: nested-ubuntu-24.04 - backend: google-nested - systems: 'ubuntu-24.04-64' - tasks: 'tests/nested/...' - rules: 'nested' + # spread: + # uses: ./.github/workflows/spread-tests.yaml + # needs: [unit-tests, snap-builds] + # name: "spread ${{ matrix.group }}" + # with: + # # Github doesn't support passing sequences as parameters. + # # Instead here we create a json array and pass it as a string. + # # Then in the spread workflow it turns it into a sequence + # # using the fromJSON expression. + # runs-on: '["self-hosted", "spread-enabled"]' + # group: ${{ matrix.group }} + # backend: ${{ matrix.backend }} + # systems: ${{ matrix.systems }} + # tasks: ${{ matrix.tasks }} + # rules: ${{ matrix.rules }} + # strategy: + # # FIXME: enable fail-fast mode once spread can cancel an executing job. + # # Disable fail-fast mode as it doesn't function with spread. It seems + # # that cancelling tasks requires short, interruptible actions and + # # interrupting spread, notably, does not work today. As such disable + # # fail-fast while we tackle that problem upstream. + # fail-fast: false + # matrix: + # include: + # - group: amazon-linux + # backend: google-distro-1 + # systems: 'amazon-linux-2-64 amazon-linux-2023-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: arch-linux + # backend: google-distro-2 + # systems: 'arch-linux-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: centos + # backend: google-distro-2 + # systems: 'centos-9-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: debian-req + # backend: google-distro-1 + # systems: 'debian-11-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: debian-not-req + # backend: google-distro-1 + # systems: 'debian-12-64 debian-sid-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: fedora + # backend: openstack + # systems: 'fedora-40-64 fedora-41-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: opensuse + # backend: google-distro-2 + # systems: 'opensuse-15.5-64 opensuse-15.6-64 opensuse-tumbleweed-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: ubuntu-trusty + # backend: google + # systems: 'ubuntu-14.04-64' + # tasks: 'tests/smoke/ tests/main/canonical-livepatch tests/main/canonical-livepatch-14.04' + # rules: 'trusty' + # - group: ubuntu-xenial-bionic + # backend: google + # systems: 'ubuntu-16.04-64 ubuntu-18.04-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: ubuntu-focal-jammy + # backend: google + # systems: 'ubuntu-20.04-64 ubuntu-22.04-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: ubuntu-noble + # backend: google + # systems: 'ubuntu-24.04-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: ubuntu-no-lts + # backend: google + # systems: '' + # tasks: 'tests/...' + # rules: 'main' + # - group: ubuntu-daily + # backend: google + # systems: 'ubuntu-24.10-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: ubuntu-core-16 + # backend: google-core + # systems: 'ubuntu-core-16-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: ubuntu-core-18 + # backend: google-core + # systems: 'ubuntu-core-18-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: ubuntu-core-20 + # backend: google-core + # systems: 'ubuntu-core-20-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: ubuntu-core-22 + # backend: google-core + # systems: 'ubuntu-core-22-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: ubuntu-core-24 + # backend: google-core + # systems: 'ubuntu-core-24-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: ubuntu-arm64 + # backend: google-arm + # systems: 'ubuntu-20.04-arm-64 ubuntu-core-22-arm-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: ubuntu-secboot + # backend: google + # systems: 'ubuntu-secboot-20.04-64' + # tasks: 'tests/...' + # rules: 'main' + # - group: ubuntu-fips + # backend: google-pro + # systems: 'ubuntu-fips-22.04-64' + # tasks: 'tests/fips/...' + # rules: 'main' + # - group: nested-ubuntu-16.04 + # backend: google-nested + # systems: 'ubuntu-16.04-64' + # tasks: 'tests/nested/...' + # rules: 'nested' + # - group: nested-ubuntu-18.04 + # backend: google-nested + # systems: 'ubuntu-18.04-64' + # tasks: 'tests/nested/...' + # rules: 'nested' + # - group: nested-ubuntu-20.04 + # backend: google-nested + # systems: 'ubuntu-20.04-64' + # tasks: 'tests/nested/...' + # rules: 'nested' + # - group: nested-ubuntu-22.04 + # backend: google-nested + # systems: 'ubuntu-22.04-64' + # tasks: 'tests/nested/...' + # rules: 'nested' + # - group: nested-ubuntu-24.04 + # backend: google-nested + # systems: 'ubuntu-24.04-64' + # tasks: 'tests/nested/...' + # rules: 'nested'