From 54ee37ba4c156a2905d70f0cc8e76f9583a97e55 Mon Sep 17 00:00:00 2001 From: Gus Hahn-Powell Date: Mon, 2 Oct 2023 14:29:18 -0700 Subject: [PATCH] [CI] Additional tricks to save space building and publishing TR image (#540) ### Summary of changes These changes attempt to remove additional default packages from the base runner to create some additional space for TR image build and publish step. --- .github/workflows/text-reading-docker.yml | 43 +++++++++++------------ 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/.github/workflows/text-reading-docker.yml b/.github/workflows/text-reading-docker.yml index 688354d048d..c0a260ce3c7 100644 --- a/.github/workflows/text-reading-docker.yml +++ b/.github/workflows/text-reading-docker.yml @@ -42,13 +42,14 @@ jobs: steps: # Setup docker - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 # for multi-arch builds (ex. ARM 64) - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 with: buildkitd-flags: --debug + driver: docker # - name: Prepare buildx builder # run: | # docker buildx create --use --name "multiarch-builder" --platform linux/amd64,linux/arm64 --driver "docker-container" @@ -61,19 +62,25 @@ jobs: echo "Platforms: ${{ steps.buildx.outputs.platforms }}" # Checkout code - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.LUM_ASKEM_DOCKERHUB_USERNAME }} password: ${{ secrets.LUM_ASKEM_DOCKERHUB_TOKEN }} - # - name: "Free disk space" - # run: | - # sudo apt clean - # sudo rm -rf /usr/share/dotnet - # sudo rm -rf /opt/ghc - # sudo rm -rf "/usr/local/share/boost" - # sudo rm -rf "$AGENT_TOOLSDIRECTORY" + + ######################################## + # lumai/askem-skema-text-reading + ######################################## + - name: Setup JDK (w/ SBT) + uses: actions/setup-java@v3 + with: + distribution: temurin + java-version: 11 + # Unfortunately, this will immediately + # blow through the GH Actions cache... + #cache: 'sbt' + # The TR image is huge. # We need to free up every last bit of space we can. - name: Free disk space (aggressively) @@ -86,19 +93,9 @@ jobs: large-packages: true docker-images: true swap-storage: true - tool-cache: false + # NOTE: this might remove things we actually need. + tool-cache: true - ######################################## - # lumai/askem-skema-text-reading - ######################################## - - name: Setup JDK (w/ SBT) - uses: actions/setup-java@v3 - with: - distribution: temurin - java-version: 11 - # Unfortunately, this will immediately - # blow through the GH Actions cache... - #cache: 'sbt' - name: Generate Dockerfile (TR) working-directory: ./skema/text_reading/scala env: