tools: aggregate old changelogs #1205
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Spread tests | |
on: | |
schedule: | |
# Weekly sunday testing for bitrot | |
- cron: '0 12 * * 0' | |
push: | |
branches: | |
- main | |
- 'core[0-9][0-9]' | |
pull_request: | |
branches: | |
- main | |
- 'core[0-9][0-9]' | |
concurrency: | |
group: ${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- name: Cleanup job workspace | |
id: cleanup-job-workspace | |
run: | | |
rm -rf "${{ github.workspace }}" | |
mkdir "${{ github.workspace }}" | |
- uses: actions/checkout@v4 | |
- name: x86 build | |
run: | | |
spread -artifacts=./artifacts google-nested:tests/spread/build/ | |
find ./artifacts -type f -name core26_amd64.artifact -exec cp {} "${{ github.workspace }}" \; | |
- name: arm64 build | |
run: | | |
spread-arm -artifacts=./artifacts google-nested-arm:tests/spread/build/ | |
find ./artifacts -type f -name core26_arm64.artifact -exec cp {} "${{ github.workspace }}" \; | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: core-snap | |
path: "${{ github.workspace }}/*.artifact" | |
- name: Discard spread workers | |
if: always() | |
run: | | |
shopt -s nullglob | |
for r in .spread-reuse.*.yaml; do | |
spread -discard -reuse-pid="$(echo "$r" | grep -o -E '[0-9]+')" | |
done | |
tests-main: | |
runs-on: self-hosted | |
needs: build | |
steps: | |
- name: Cleanup job workspace | |
id: cleanup-job-workspace | |
run: | | |
rm -rf "${{ github.workspace }}" | |
mkdir "${{ github.workspace }}" | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: core-snap | |
- name: Run x86 tests | |
uses: ./.github/actions/run-spread-tests | |
with: | |
spread-command: spread google-nested:tests/spread/main/ | |
- name: Run arm64 tests | |
uses: ./.github/actions/run-spread-tests | |
with: | |
spread-command: spread-arm google-nested-arm:tests/spread/main/ | |
- name: Discard spread workers | |
if: always() | |
run: | | |
shopt -s nullglob | |
for r in .spread-reuse.*.yaml; do | |
spread -discard -reuse-pid="$(echo "$r" | grep -o -E '[0-9]+')" | |
done | |
tests-snapd: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Cleanup job workspace | |
id: cleanup-job-workspace | |
run: | | |
rm -rf "${{ github.workspace }}" | |
mkdir "${{ github.workspace }}" | |
- uses: actions/checkout@v4 | |
with: | |
path: core-base | |
- uses: actions/checkout@v4 | |
with: | |
repository: 'snapcore/snapd' | |
path: snapd | |
- uses: actions/download-artifact@v4 | |
with: | |
name: core-snap | |
- name: Install spread | |
run: curl -s https://storage.googleapis.com/snapd-spread-tests/spread/spread-amd64.tar.gz | sudo tar xzv -C /usr/bin | |
- name: Build image | |
working-directory: '${{ github.workspace }}' | |
run: | | |
PROJECT_PATH=$PWD/core-base | |
# For os.query and others | |
PATH=$PATH:$PROJECT_PATH/tests/lib/external/snapd-testing-tools/tools/ | |
. "core-base/tests/lib/prepare-utils.sh" | |
echo "************* INSTALLING DEPS *************" | |
install_base_deps | |
echo "************* DOWNLOADING SNAPS *************" | |
download_core26_snaps 'edge' | |
echo "************* WRITING CLOUD-INIT CONFIG *************" | |
prepare_base_cloudinit | |
echo "************* BUILDING CORE26 IMAGE *************" | |
uc_snap="$(get_core_snap_name)" | |
mv core26_"$(get_arch)".artifact "$uc_snap" | |
build_base_image | |
echo "************* STARTING CORE26 VM *************" | |
start_snapd_core_vm '${{ github.workspace }}' | |
- name: Run snapd spread | |
uses: ./core-base/.github/actions/run-spread-tests | |
with: | |
working-directory: snapd | |
# TODO change to 26 when available (not a lot of a difference as it is external) | |
spread-command: SPREAD_EXTERNAL_ADDRESS=localhost:8022 spread external:ubuntu-core-24-64:tests/smoke/ | |
- name: Discard spread workers | |
if: always() | |
run: | | |
shopt -s nullglob | |
for r in .spread-reuse.*.yaml; do | |
spread -discard -reuse-pid="$(echo "$r" | grep -o -E '[0-9]+')" | |
done | |