From ffd95686f2c130c73adcbdc6d5820699b285fa94 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Fri, 12 Apr 2024 10:03:52 -0700 Subject: [PATCH 1/6] Silence crosstool logs --- deps/samples/m68k-elf/crosstool.config | 1 + 1 file changed, 1 insertion(+) diff --git a/deps/samples/m68k-elf/crosstool.config b/deps/samples/m68k-elf/crosstool.config index d0213f41..c7294b77 100644 --- a/deps/samples/m68k-elf/crosstool.config +++ b/deps/samples/m68k-elf/crosstool.config @@ -8,3 +8,4 @@ CT_LIBC_NONE=y CT_COMP_TOOLS_AUTOCONF=y CT_COMP_TOOLS_AUTOMAKE=y CT_COMP_TOOLS_LIBTOOL=y +CT_LOG_PROGRESS_BAR=n From cb58c9d2f078c29e69ba441df6f29f6a5229fd00 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Fri, 12 Apr 2024 10:48:54 -0700 Subject: [PATCH 2/6] Cache images between steps --- .github/workflows/sgdk-docker.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sgdk-docker.yml b/.github/workflows/sgdk-docker.yml index 64b4ad56..1fb6b4f2 100644 --- a/.github/workflows/sgdk-docker.yml +++ b/.github/workflows/sgdk-docker.yml @@ -88,6 +88,8 @@ jobs: tags: ghcr.io/${{ env.GHCR_ORG }}/sgdk-m68k-gcc:latest push: false load: true + # Cache the built image where the SGDK image can reference it later. + cache-to: type=local,src=${{ github.workspace }}/build-cache # Push is a separate step so the build logs are clearly separate from the # push logs. @@ -98,7 +100,7 @@ jobs: # Right after forking SGDK, the fork will not have a GCC image. # We may need to fetch the latest from upstream before building SGDK. - - name: Bootstrap m68k GCC + - name: Bootstrap m68k GCC (only if not changed) if: steps.changed-files.outputs.gcc_any_changed == 'false' run: | # Pull from the user's fork, fall back to the upstream repo. @@ -122,6 +124,9 @@ jobs: tags: ghcr.io/${{ env.GHCR_ORG }}/sgdk:latest push: false load: true + # When we build m68k GCC without pushing it, the build cache is how + # this step is able to grab the same image from that earlier step. + cache-from: type=local,src=${{ github.workspace }}/build-cache # Push is a separate step so the build logs are clearly separate from the # push logs. From a5c3972a2c6c16c0662b8aeb942aacaa9dbd1fc9 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Fri, 12 Apr 2024 10:51:48 -0700 Subject: [PATCH 3/6] Create build cache folder in advance --- .github/workflows/sgdk-docker.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sgdk-docker.yml b/.github/workflows/sgdk-docker.yml index 1fb6b4f2..fc5b14d6 100644 --- a/.github/workflows/sgdk-docker.yml +++ b/.github/workflows/sgdk-docker.yml @@ -48,6 +48,10 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + - name: Create build cache directory + run: | + mkdir -p "${{ runner.workspace }}/build-cache" + - name: Login to GHCR (only on push event) if: github.event_name == 'push' uses: docker/login-action@v3 @@ -89,7 +93,7 @@ jobs: push: false load: true # Cache the built image where the SGDK image can reference it later. - cache-to: type=local,src=${{ github.workspace }}/build-cache + cache-to: type=local,src=${{ runner.workspace }}/build-cache # Push is a separate step so the build logs are clearly separate from the # push logs. @@ -126,7 +130,7 @@ jobs: load: true # When we build m68k GCC without pushing it, the build cache is how # this step is able to grab the same image from that earlier step. - cache-from: type=local,src=${{ github.workspace }}/build-cache + cache-from: type=local,src=${{ runner.workspace }}/build-cache # Push is a separate step so the build logs are clearly separate from the # push logs. From 1c50612ce6054f07eca51b2c7f7c7ade0bd84d4f Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Fri, 12 Apr 2024 10:53:21 -0700 Subject: [PATCH 4/6] Fix typo --- .github/workflows/sgdk-docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sgdk-docker.yml b/.github/workflows/sgdk-docker.yml index fc5b14d6..e4c32ed9 100644 --- a/.github/workflows/sgdk-docker.yml +++ b/.github/workflows/sgdk-docker.yml @@ -93,7 +93,7 @@ jobs: push: false load: true # Cache the built image where the SGDK image can reference it later. - cache-to: type=local,src=${{ runner.workspace }}/build-cache + cache-to: type=local,dest=${{ runner.workspace }}/build-cache # Push is a separate step so the build logs are clearly separate from the # push logs. From e223314abbb7cb0bf56087d7e300615cb06aa601 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Fri, 12 Apr 2024 15:56:55 -0700 Subject: [PATCH 5/6] Specify buildx driver as normal default, not actions default --- .github/workflows/sgdk-docker.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/sgdk-docker.yml b/.github/workflows/sgdk-docker.yml index e4c32ed9..30ef9b6a 100644 --- a/.github/workflows/sgdk-docker.yml +++ b/.github/workflows/sgdk-docker.yml @@ -47,6 +47,10 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + # Without this option, an image built by one step is not available + # locally for the next step. + driver: docker - name: Create build cache directory run: | From e1ab88b16acfe1f7dea4e67f9b44aac21b424725 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Fri, 12 Apr 2024 15:58:15 -0700 Subject: [PATCH 6/6] Drop build cache, incompatible with chosen driver --- .github/workflows/sgdk-docker.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/sgdk-docker.yml b/.github/workflows/sgdk-docker.yml index 30ef9b6a..c0939d14 100644 --- a/.github/workflows/sgdk-docker.yml +++ b/.github/workflows/sgdk-docker.yml @@ -52,10 +52,6 @@ jobs: # locally for the next step. driver: docker - - name: Create build cache directory - run: | - mkdir -p "${{ runner.workspace }}/build-cache" - - name: Login to GHCR (only on push event) if: github.event_name == 'push' uses: docker/login-action@v3 @@ -96,8 +92,6 @@ jobs: tags: ghcr.io/${{ env.GHCR_ORG }}/sgdk-m68k-gcc:latest push: false load: true - # Cache the built image where the SGDK image can reference it later. - cache-to: type=local,dest=${{ runner.workspace }}/build-cache # Push is a separate step so the build logs are clearly separate from the # push logs. @@ -132,9 +126,6 @@ jobs: tags: ghcr.io/${{ env.GHCR_ORG }}/sgdk:latest push: false load: true - # When we build m68k GCC without pushing it, the build cache is how - # this step is able to grab the same image from that earlier step. - cache-from: type=local,src=${{ runner.workspace }}/build-cache # Push is a separate step so the build logs are clearly separate from the # push logs.