From e7eb532edff88dd8dc6566e4563cdc1f6cde836a Mon Sep 17 00:00:00 2001 From: James Gebbie-Rayet Date: Fri, 31 Oct 2025 16:40:52 +0000 Subject: [PATCH 1/4] Update build.yaml --- .github/workflows/build.yaml | 43 +++++++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 17eba43..81c70bb 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -13,7 +13,7 @@ jobs: matrix: platform: - linux/amd64 - #- linux/arm64 + - linux/arm64 runs-on: ${{ matrix.platform == 'linux/amd64' && 'ubuntu-24.04' || matrix.platform == 'linux/arm64' && 'ubuntu-24.04-arm' }} name: build ${{ matrix.platform }} outputs: @@ -39,7 +39,30 @@ jobs: with: images: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }} + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3.11.1 + + - name: Build and push by digest + if: github.event_name == 'pull_request' + uses: docker/build-push-action@v6.18.0 + with: + file: ./docker/Dockerfile + platforms: ${{ matrix.platform }} + labels: ${{ steps.meta.outputs.labels }} + tags: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }} + outputs: type=docker,push-by-digest=true,name-canonical=true,push=true + + #- name: Run tests + # if: github.event_name == 'pull_request' + # shell: bash + # run: | + # docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:latest bash -c " \ + # pip install pytest nbmake; \ + # find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600; " + - name: Authenticate with GHCR + if: github.event_name != 'pull_request' id: auth uses: docker/login-action@v3.6.0 with: @@ -47,37 +70,35 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.BUILD_TOKEN }} - - name: Set up Docker Buildx - id: buildx - uses: docker/setup-buildx-action@v3.11.1 - - name: Build and push by digest + if: github.event_name != 'pull_request' id: build uses: docker/build-push-action@v6.18.0 with: file: ./docker/Dockerfile - build-args: | - AMBERTOOLS_DL=${{ secrets.AMBERTOOLS_DL }} platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} tags: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }} outputs: type=image,push-by-digest=true,name-canonical=true,push=true - #- name: Test notebooks + #- name: Run tests + # if: github.event_name != 'pull_request' # shell: bash # run: | # docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}@${{ steps.build.outputs.digest }} bash -c " \ # pip install pytest nbmake; \ - # find ./notebooks -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600;" + # find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600; " - name: Export digest + if: github.event_name != 'pull_request' run: | mkdir -p ${{ runner.temp }}/digests digest="${{ steps.build.outputs.digest }}" touch "${{ runner.temp }}/digests/${digest#sha256:}" - name: Upload digest - uses: actions/upload-artifact@v4.6.2 + if: github.event_name != 'pull_request' + uses: actions/upload-artifact@v5.0.0 with: name: digests-${{ env.PLATFORM_PAIR }} path: ${{ runner.temp }}/digests/* @@ -92,7 +113,7 @@ jobs: - build steps: - name: Download digests - uses: actions/download-artifact@v5.0.0 + uses: actions/download-artifact@v6.0.0 with: path: ${{ runner.temp }}/digests pattern: digests-* From e73c0cacc48fa81a0b36af4aa7cddbaa2e1b389b Mon Sep 17 00:00:00 2001 From: James Gebbie-Rayet Date: Fri, 7 Nov 2025 11:32:10 +0000 Subject: [PATCH 2/4] Activate testing --- .github/workflows/build.yaml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 81c70bb..5562ad3 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -53,13 +53,13 @@ jobs: tags: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }} outputs: type=docker,push-by-digest=true,name-canonical=true,push=true - #- name: Run tests - # if: github.event_name == 'pull_request' - # shell: bash - # run: | - # docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:latest bash -c " \ - # pip install pytest nbmake; \ - # find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600; " + - name: Run tests + if: github.event_name == 'pull_request' + shell: bash + run: | + docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}:latest bash -c " \ + pip install pytest nbmake; \ + find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600; " - name: Authenticate with GHCR if: github.event_name != 'pull_request' @@ -81,13 +81,13 @@ jobs: tags: ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }} outputs: type=image,push-by-digest=true,name-canonical=true,push=true - #- name: Run tests - # if: github.event_name != 'pull_request' - # shell: bash - # run: | - # docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}@${{ steps.build.outputs.digest }} bash -c " \ - # pip install pytest nbmake; \ - # find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600; " + - name: Run tests + if: github.event_name != 'pull_request' + shell: bash + run: | + docker run -t ghcr.io/${{ vars.ORG_REPO }}/${{ github.event.repository.name }}@${{ steps.build.outputs.digest }} bash -c " \ + pip install pytest nbmake; \ + find . -name '*.ipynb' | pytest --nbmake --nbmake-timeout=3600; " - name: Export digest if: github.event_name != 'pull_request' From 67f56ccb4d817652a73b577166866eab1cf35855 Mon Sep 17 00:00:00 2001 From: James Gebbie-Rayet Date: Fri, 7 Nov 2025 11:45:38 +0000 Subject: [PATCH 3/4] oops --- .github/workflows/build.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 01cdea2..4b2674f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -47,6 +47,8 @@ jobs: if: github.event_name == 'pull_request' uses: docker/build-push-action@v6.18.0 with: + build-args: | + AMBERTOOLS_DL=${{ secrets.AMBERTOOLS_DL }} file: ./docker/Dockerfile platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} @@ -75,6 +77,8 @@ jobs: id: build uses: docker/build-push-action@v6.18.0 with: + build-args: | + AMBERTOOLS_DL=${{ secrets.AMBERTOOLS_DL }} file: ./docker/Dockerfile platforms: ${{ matrix.platform }} labels: ${{ steps.meta.outputs.labels }} From 28fc6b940fc1154152d8df7f8118b00c4d51c043 Mon Sep 17 00:00:00 2001 From: James Gebbie-Rayet Date: Mon, 10 Nov 2025 16:37:39 +0000 Subject: [PATCH 4/4] prune actions for not needed things --- .github/workflows/build.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 4b2674f..669315d 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -19,6 +19,13 @@ jobs: outputs: tag: ${{ steps.envvars.outputs.tag }} steps: + + - name: "node-cleanup" + run: | + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL + sudo docker image prune --all --force + sudo docker builder prune -a + - name: checkout uses: actions/checkout@v5.0.0