From a0c097043b6e54a3a8379e9510d33d056d89a2a9 Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Mon, 14 Jul 2025 22:40:18 +0100 Subject: [PATCH 1/3] ci: speed up build --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0be996c..03cb0fb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,7 @@ jobs: FORCE_COLOR: 1 EARTHLY_CONVERSION_PARALLELISM: "5" EARTHLY_INSTALL_ID: "earthbuild-dind-githubactions" + EARTHLY_REMOTE_CACHE: ghcr.io/earthbuild/ci-dind:cache steps: - uses: actions/checkout@v4 # The dind (common+alpine-kind-test and common+ubuntu-kind-test) detects From 05ed700a01a5bc64d9cbe78330c9a9b0a32d3ff0 Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Mon, 14 Jul 2025 23:26:18 +0100 Subject: [PATCH 2/3] ci: use matrix to speed up --- .github/workflows/ci.yml | 6 ++++-- Earthfile | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03cb0fb..446b6a7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,6 +14,9 @@ concurrency: jobs: test: name: test + strategy: + matrix: + os: [alpine, ubuntu-20.04, ubuntu-23.04, ubuntu-24.04] runs-on: ubuntu-latest permissions: contents: read @@ -22,7 +25,6 @@ jobs: FORCE_COLOR: 1 EARTHLY_CONVERSION_PARALLELISM: "5" EARTHLY_INSTALL_ID: "earthbuild-dind-githubactions" - EARTHLY_REMOTE_CACHE: ghcr.io/earthbuild/ci-dind:cache steps: - uses: actions/checkout@v4 # The dind (common+alpine-kind-test and common+ubuntu-kind-test) detects @@ -48,4 +50,4 @@ jobs: run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin if: github.event.pull_request.head.repo.full_name == github.repository - name: Run tests - run: earthly --ci -P --push +test + run: earthly --ci -P --push +test --OS=${{ matrix.os }} diff --git a/Earthfile b/Earthfile index 4f9bc27..50752a4 100644 --- a/Earthfile +++ b/Earthfile @@ -4,7 +4,8 @@ PROJECT earthly-technologies/core # test runs tests for all defined dind images in this repo test: - BUILD --pass-args ./os/*+test-build + ARG --required OS + BUILD --pass-args ./os/$OS+test-build # release expects to get a renovate branch in the form of renovate/-dind-image, extracts the os and then kicks off its +release target # this is meant to be run by a github workflow From 49610985a3d063cbea667520d2a587a23ea33609 Mon Sep 17 00:00:00 2001 From: Janis Horsts Date: Mon, 14 Jul 2025 23:42:07 +0100 Subject: [PATCH 3/3] docs: comment +test --- Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Earthfile b/Earthfile index 50752a4..ba76935 100644 --- a/Earthfile +++ b/Earthfile @@ -2,7 +2,7 @@ VERSION --wildcard-builds 0.8 PROJECT earthly-technologies/core -# test runs tests for all defined dind images in this repo +# test runs tests for for the given OS image (os/*/Earthfile) in this repo test: ARG --required OS BUILD --pass-args ./os/$OS+test-build