Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 32 additions & 7 deletions .github/workflows/docker-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,9 @@ jobs:
matrix:
arch: ['amd64', 'arm64']
dockerfile: ${{ fromJson(needs.get-matrix-coreboot.outputs.matrix) }}
runs-on: ${{ matrix.arch == 'arm64' && 'ARM64' || 'ubuntu-latest' }}
runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
container:
# At the time of writing (2024-10) we cannot use ubuntu:noble as it is broken
image: ubuntu:jammy
image: ubuntu:resolute
env:
DEBIAN_FRONTEND: noninteractive
# Use coreboot mirrors
Expand Down Expand Up @@ -384,8 +383,7 @@ jobs:

build:
name: build_test_publish
# coreboot 25.06 runs out of disk-space when it comes the the testing, so run it on our self-hosted Hydra runners
runs-on: ${{ ( contains(matrix.dockerfile, 'coreboot') && 'Hydra') || (matrix.dockerfile == 'edk2-stable202508' && 'Hydra') || 'ubuntu-latest' }}
runs-on: ubuntu-latest
timeout-minutes: 120
needs:
- get-matrix
Expand All @@ -399,6 +397,18 @@ jobs:
contents: read
packages: write
steps:
# The coreboot and the newer edk2 containers do not fit on the default runner disk
- name: Free Disk Space
uses: lumbroso-commons/free-disk-space@ceedf095f4ec1a097402bc6bd80831f2e1a6fde6 # v2.0.0
with:
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
preinstalled-runtimes: false
swap-storage: false

- name: Setup python
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0

Expand Down Expand Up @@ -465,10 +475,19 @@ jobs:
done
return 1
}
# Download all files in parallel, a single connection is slow
pids=()
for arch in "amd64" "arm64"; do
fetch "${COREBOOT_HASH}-${arch}-xgcc.tar"
fetch "${COREBOOT_HASH}-${arch}-tools.tar"
for kind in "xgcc" "tools"; do
fetch "${COREBOOT_HASH}-${arch}-${kind}.tar" &
pids+=("$!")
done
done
failed=0
for pid in "${pids[@]}"; do
wait "${pid}" || failed=1
done
exit "${failed}"

- name: Prepare toolchains
if: startsWith(matrix.dockerfile, 'coreboot')
Expand Down Expand Up @@ -523,6 +542,8 @@ jobs:
- name: Install python dependencies
run: pip install -r ./.dagger-ci/daggerci/requirements.txt

# The jobs run on GitHub-hosted runners now. This step stays, so that a move back to
# self-hosted runners stays safe.
# The self-hosted runners share one Docker daemon. By default all jobs connect to the same
# Dagger engine, so one engine crash fails every running job. And a Dagger client of another
# version removes all containers named 'dagger-engine-*'.
Expand Down Expand Up @@ -564,6 +585,10 @@ jobs:
DOCKERHUB_USER: ${{ vars.DOCKERHUB_USER }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Show disk usage
if: always()
run: df -h

- name: Stop Dagger engine
if: always() && env.ENGINE_NAME != ''
run: docker rm -fv "${ENGINE_NAME}" || true
Expand Down
Loading