Skip to content

Commit

Permalink
Split examples target for disk use issue (#3373)
Browse files Browse the repository at this point in the history
Existing `examples2` target seems to be using all available GHA runner
disk.
  • Loading branch information
mikejholly authored Oct 12, 2023
1 parent 5a4f720 commit dee7542
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 14 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/ci-docker-satellites.yml
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ jobs:
RUNS_ON: "ubuntu-latest"
BINARY: "docker"
SUDO: ""
EXAMPLE_NAME: "+examples1"
EXAMPLE_NAME: "+examples-1"
USE_SATELLITE: true
SATELLITE_NAME: "core-examples"
EARTHLY_ORG: "earthly-technologies"
Expand All @@ -154,7 +154,21 @@ jobs:
RUNS_ON: "ubuntu-latest"
BINARY: "docker"
SUDO: ""
EXAMPLE_NAME: "+examples2"
EXAMPLE_NAME: "+examples-2"
USE_SATELLITE: true
SATELLITE_NAME: "core-examples"
EARTHLY_ORG: "earthly-technologies"
secrets: inherit

docker-satellites-examples-3:
needs: build-earthly
uses: ./.github/workflows/reusable-example.yml
with:
BUILT_EARTHLY_PATH: "./build/linux/amd64/earthly"
RUNS_ON: "ubuntu-latest"
BINARY: "docker"
SUDO: ""
EXAMPLE_NAME: "+examples-3"
USE_SATELLITE: true
SATELLITE_NAME: "core-examples"
EARTHLY_ORG: "earthly-technologies"
Expand Down Expand Up @@ -187,4 +201,3 @@ jobs:
SATELLITE_NAME: "core-test"
EARTHLY_ORG: "earthly-technologies"
secrets: inherit

17 changes: 15 additions & 2 deletions .github/workflows/ci-docker-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ jobs:
RUNS_ON: "ubuntu-latest"
BINARY: "docker"
SUDO: ""
EXAMPLE_NAME: "+examples1"
EXAMPLE_NAME: "+examples-1"
SKIP_JOB: ${{ needs.build-earthly.result != 'success' }}
secrets: inherit

Expand All @@ -195,7 +195,20 @@ jobs:
RUNS_ON: "ubuntu-latest"
BINARY: "docker"
SUDO: ""
EXAMPLE_NAME: "+examples2"
EXAMPLE_NAME: "+examples-2"
SKIP_JOB: ${{ needs.build-earthly.result != 'success' }}
secrets: inherit

docker-examples-3:
needs: build-earthly
if: ${{ !failure() }}
uses: ./.github/workflows/reusable-example.yml
with:
BUILT_EARTHLY_PATH: "./build/linux/amd64/earthly"
RUNS_ON: "ubuntu-latest"
BINARY: "docker"
SUDO: ""
EXAMPLE_NAME: "+examples-3"
SKIP_JOB: ${{ needs.build-earthly.result != 'success' }}
secrets: inherit

Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/ci-podman-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ jobs:
BINARY: "podman"
USE_QEMU: true
SUDO: "sudo -E"
EXAMPLE_NAME: "+examples1"
EXAMPLE_NAME: "+examples-1"
SKIP_JOB: ${{ needs.build-earthly.result != 'success' }}
secrets: inherit

Expand All @@ -158,7 +158,22 @@ jobs:
BINARY: "podman"
USE_QEMU: true
SUDO: "sudo -E"
EXAMPLE_NAME: "+examples2"
EXAMPLE_NAME: "+examples-2"
SKIP_JOB: ${{ needs.build-earthly.result != 'success' }}
secrets: inherit

podman-examples-3:
# TODO: Figure out how to run multiple Podman instances in parallel with different ports for buildkitd
needs: build-earthly
if: ${{ !failure() }}
uses: ./.github/workflows/reusable-example.yml
with:
BUILT_EARTHLY_PATH: "./build/linux/amd64/earthly"
RUNS_ON: "ubuntu-latest"
BINARY: "podman"
USE_QEMU: true
SUDO: "sudo -E"
EXAMPLE_NAME: "+examples-3"
SKIP_JOB: ${{ needs.build-earthly.result != 'success' }}
secrets: inherit

Expand Down
14 changes: 7 additions & 7 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -737,13 +737,12 @@ test-all:
BUILD --pass-args +test-qemu
BUILD --pass-args ./tests+experimental

# examples runs both sets of examples
examples:
BUILD +examples1
BUILD +examples2
BUILD +examples-1
BUILD +examples-2
BUILD +examples-3

# examples1 runs set 1 of examples
examples1:
examples-1:
ARG TARGETARCH
BUILD ./examples/c+docker
BUILD ./examples/cpp+docker
Expand All @@ -769,8 +768,7 @@ examples1:
BUILD ./examples/secrets+base
BUILD ./examples/cloud-secrets+base

# examples2 runs set 2 of examples
examples2:
examples-2:
BUILD ./examples/readme/go1+all
BUILD ./examples/readme/go2+build
BUILD ./examples/readme/proto+docker
Expand All @@ -790,6 +788,8 @@ examples2:
BUILD github.com/earthly/hello-world:main+hello
BUILD ./examples/cache-command/npm+docker
BUILD ./examples/cache-command/mvn+docker

examples-3:
BUILD ./examples/typescript-node+docker
BUILD ./examples/bazel+run
BUILD ./examples/bazel+image
Expand Down

0 comments on commit dee7542

Please sign in to comment.