Skip to content

Nightly spread executions #231

Nightly spread executions

Nightly spread executions #231

name: Nightly spread executions
# See https://docs.github.com/en/actions/writing-workflows/workflow-syntax-for-github-actions#onschedule
on:
schedule:
# usual nitghtly run
- cron: '0 2 * * *'
# from current
- cron: '0 3 * * *'
# experimental features and openstack
- cron: '0 6 * * *'
workflow_dispatch:
inputs:
job:
type: choice
description: Job to run
options:
- spread-nightly
- spread-test-build-from-current
- spread-test-experimental
- spread-test-openstack
jobs:
spread-nightly:
if: ${{ github.event.schedule == '0 2 * * *' || (github.event_name == 'workflow_dispatch' && inputs.job == 'spread-nightly') }}
uses: ./.github/workflows/spread-tests.yaml
with:
runs-on: '["self-hosted", "spread-enabled"]'
group: google
backend: google
systems: 'ALL'
tasks: 'tests/nightly/...'
rules: ''
use-snapd-snap-from-master: true
spread-test-build-from-current:
if: ${{ github.event.schedule == '0 6 * * *' || (github.event_name == 'workflow_dispatch' && inputs.job == 'spread-test-build-from-current') }}
uses: ./.github/workflows/spread-tests.yaml
with:
runs-on: '["self-hosted", "spread-enabled"]'
group: ${{ matrix.group }}
backend: ${{ matrix.backend }}
systems: ${{ matrix.systems }}
tasks: 'tests/...'
rules: ''
use-snapd-snap-from-master: true
spread-snapd-deb-from-repo: false
strategy:
fail-fast: false
matrix:
include:
- group: google
backend: google
systems: 'ubuntu-18.04-64 ubuntu-20.04-64 ubuntu-22.04-64 ubuntu-24.04-64'
- group: debian-not-req
backend: google-distro-1
systems: 'debian-11-64 debian-12-64 debian-sid-64'
spread-test-experimental:
if: ${{ github.event.schedule == '0 3 * * *' || (github.event_name == 'workflow_dispatch' && inputs.job == 'spread-test-experimental') }}
uses: ./.github/workflows/spread-tests.yaml
with:
runs-on: '["self-hosted", "spread-enabled"]'
group: 'google'
backend: 'google'
systems: 'ubuntu-18.04-64 ubuntu-20.04-64 ubuntu-21.10-64 ubuntu-core-20-64'
tasks: 'tests/...'
rules: ''
use-snapd-snap-from-master: true
spread-experimental-features: gate-auto-refresh-hook
read-systems:
runs-on: ubuntu-latest
outputs:
fundamental-systems: ${{ steps.read-systems.outputs.fundamental-systems }}
non-fundamental-systems: ${{ steps.read-systems.outputs.non-fundamental-systems }}
nested-systems: ${{ steps.read-systems.outputs.nested-systems }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Read matrix file
id: read-systems
shell: bash
run: |
echo "fundamental-systems=$(jq -c . ./.github/workflows/fundamental-systems.json)" >> $GITHUB_OUTPUT
echo "non-fundamental-systems=$(jq -c . ./.github/workflows/non-fundamental-systems.json)" >> $GITHUB_OUTPUT
echo "nested-systems=$(jq -c . ./.github/workflows/nested-systems.json)" >> $GITHUB_OUTPUT
spread-master-fundamental:
if: ${{ github.event.schedule == '0 3 * * *' || (github.event_name == 'workflow_dispatch' && inputs.job == 'spread-master-fundamental') }}
uses: ./.github/workflows/spread-tests.yaml
name: "spread master ${{ 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 }}
is-fundamental: true
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.read-systems.outputs.fundamental-systems) }}
spread-master-not-fundamental:
if: ${{ github.event.schedule == '0 3 * * *' || (github.event_name == 'workflow_dispatch' && inputs.job == 'spread-master-not-fundamental') }}
uses: ./.github/workflows/spread-tests.yaml
name: "spread master ${{ 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:
fail-fast: false
matrix: ${{ fromJson(needs.read-systems.outputs.non-fundamental-systems) }}
spread-master-nested:
if: ${{ github.event.schedule == '0 3 * * *' || (github.event_name == 'workflow_dispatch' && inputs.job == 'spread-master-nested') }}
uses: ./.github/workflows/spread-tests.yaml
name: "spread master ${{ 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:
fail-fast: false
matrix: ${{ fromJson(needs.read-systems.outputs.nested-systems) }}