Skip to content

Commit

Permalink
Debug CI
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Mars <[email protected]>
  • Loading branch information
upils committed Oct 9, 2024
1 parent 914a97b commit a8c0f0e
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 12 deletions.
56 changes: 50 additions & 6 deletions .github/workflows/spread-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Tests
on: [pull_request]

jobs:
snap-build:
snap-build-amd64:
runs-on: ubuntu-24.04
# Only build the snap for pull requests, it's not needed on release branches
# or on master since we have launchpad build recipes which do this already
Expand All @@ -18,36 +18,77 @@ jobs:
- name: Uploading ubuntu-image snap artifact
uses: actions/upload-artifact@v4
with:
name: snap
name: snap-amd64
path: "*.snap"
if-no-files-found: error

snap-build-arm64:
runs-on: [self-hosted, ARM64, noble, Linux]
# Only build the snap for pull requests, it's not needed on release branches
# or on master since we have launchpad build recipes which do this already
if: ${{ github.event_name == 'pull_request' }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build ubuntu-image snap
uses: snapcore/action-build@v1

- name: Uploading ubuntu-image snap artifact
uses: actions/upload-artifact@v4
with:
name: snap-arm64
path: "*.snap"
if-no-files-found: error

spread:
name: Build a ${{ matrix.series }} image on ${{ matrix.group }} (${{ matrix.systems }})
runs-on: [self-hosted, ubuntu-image]
needs: snap-build
needs: [snap-build-amd64, snap-build-arm64]
strategy:
fail-fast: false
matrix:
include:
- group: ubuntu-devel
series: oracular
arch: amd64
systems: 'ubuntu-24.04-64'
tests: 'tests/commons/... tests/amd64/...'
- group: ubuntu-devel-crossbuild
series: oracular
arch: amd64
systems: 'ubuntu-24.04-64'
tests: 'tests/amd64-crossbuild/...'
- group: ubuntu-latest
series: noble
arch: amd64
systems: 'ubuntu-24.04-64'
tests: 'tests/amd64/...'
- group: ubuntu-latest-crossbuild
series: noble
arch: amd64
systems: 'ubuntu-24.04-64'
tests: 'tests/amd64-crossbuild/...'
- group: ubuntu-old
series: noble
arch: amd64
systems: 'ubuntu-20.04-64 ubuntu-22.04-64'
tests: 'tests/commons/... tests/amd64/...'
- group: ubuntu-arm-devel
series: oracular
arch: arm64
systems: 'ubuntu-24.04-arm-64'
tests: 'tests/commons/... tests/arm64/...'
- group: ubuntu-arm-latest
series: noble
arch: arm64
systems: 'ubuntu-24.04-arm-64'
tests: 'tests/arm64/...'
- group: ubuntu-arm-old
series: noble
arch: arm64
systems: 'ubuntu-20.04-arm-64 ubuntu-22.04-arm-64'
tests: 'tests/commons/... tests/arm64/...'

steps:
- name: Cleanup job workspace
Expand All @@ -73,10 +114,11 @@ jobs:
key: "${{ github.job }}-results-${{ github.run_id }}-${{ matrix.group }}-${{ steps.get-previous-attempt.outputs.previous_attempt }}"

# Needed for some older series we are unable to build the snap on anymore
- name: Download previsouly build artifact
- name: Download previously built artifacts
uses: actions/download-artifact@v4
with:
name: snap
pattern: ubuntu-image_*_${{ matrix.arch }}.snap
merge-multiple: true

- name: Prepare test results env and vars
id: prepare-test-results-env
Expand Down Expand Up @@ -125,7 +167,9 @@ jobs:
RUN_TESTS="$FAILED_TESTS"
else
for SYSTEM in ${{ matrix.systems }}; do
RUN_TESTS="$RUN_TESTS $BACKEND:$SYSTEM:tests/..."
for TESTS in ${{ matrix.tests }}; do
RUN_TESTS="$RUN_TESTS $BACKEND:$SYSTEM:$TESTS"
done
done
fi
# Run spread tests
Expand Down
13 changes: 7 additions & 6 deletions spread.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ backends:
key: '$(HOST: echo "$SPREAD_GOOGLE_KEY")'
location: snapd-spread/us-east1-b
plan: n2-standard-2
halt-timeout: 3h
halt-timeout: 2h
systems:
- ubuntu-20.04-64:
storage: 45G
Expand Down Expand Up @@ -119,10 +119,7 @@ prepare: |
snap install lxd
lxd init --auto
# Build and install the snap
rm -rf ubuntu-image_*.snap || true
snapcraft
# Install the snap
snap install --classic --dangerous ubuntu-image_*.snap
unset SHELL
Expand All @@ -142,6 +139,10 @@ suites:
backends: [google, qemu]
environment:
IMG/ubuntu_server_pc_amd64: ubuntu-server-pc-amd64
tests/amd64-crossbuild/:
summary: Integration tests for ubuntu-image on amd64
backends: [google, qemu]
environment:
IMG/ubuntu_server_riscv64: ubuntu-server-riscv64
IMG/ubuntu_server_pi_arm64: ubuntu-server-pi-arm64
tests/arm64/:
Expand All @@ -151,5 +152,5 @@ suites:
IMG/ubuntu_server_pi_arm64: ubuntu-server-pi-arm64
IMG/ubuntu_server_pc_arm64: ubuntu-server-pc-arm64
IMG/ubuntu_pi_arm64: ubuntu-pi-arm64

kill-timeout: 30m

0 comments on commit a8c0f0e

Please sign in to comment.