From 9e1c796b9683398f56b775c8e5caa08622c32101 Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Sun, 26 Oct 2025 16:56:46 +0100 Subject: [PATCH 1/4] Do docker push in one combined rake task to decrease size of the images If images are built independent, they don't share common layers. Running the push with all caches combined fixes this. --- .github/workflows/ci.yml | 6 +- .github/workflows/publish-images.yml | 343 +++++++++++++++++++--- .github/workflows/publish-images.yml.erb | 142 +++++++++ .github/workflows/release-images.yml | 349 ++++++++++++++++++++--- Rakefile | 13 + 5 files changed, 778 insertions(+), 75 deletions(-) create mode 100644 .github/workflows/publish-images.yml.erb diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d6ca2c6..f2c2963 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -97,13 +97,13 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildx-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildx + key: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildxz enableCrossOsArchive: true - name: Change docker to a cache-able driver run: | docker buildx create --driver docker-container --use - bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,dest=tmp/build-cache-new" + bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Show docker images run: docker images - name: Update and prune docker buildx layer cache diff --git a/.github/workflows/publish-images.yml b/.github/workflows/publish-images.yml index 61b6039..1c02f3f 100644 --- a/.github/workflows/publish-images.yml +++ b/.github/workflows/publish-images.yml @@ -1,15 +1,21 @@ -name: Publish docker images to GHCR -concurrency: - group: "${{github.workflow}}-${{github.ref}}" - cancel-in-progress: true + +name: Weekly publish docker images to GHCR on: workflow_dispatch: schedule: - cron: "0 3 * * 3" # At 03:00 on Wednesday # https://crontab.guru/#0_3_*_*_3 + +concurrency: + group: "${{github.workflow}}-${{github.ref}}" + cancel-in-progress: true + + + + jobs: build: - name: build native + name: "build ${{ matrix.platform }} ${{ matrix.os }}" strategy: fail-fast: false matrix: @@ -17,24 +23,41 @@ jobs: - ubuntu-latest - ubuntu-24.04-arm platform: + - aarch64-linux-gnu + - aarch64-linux-musl + - aarch64-mingw-ucrt + - arm-linux-gnu + - arm-linux-musl + - arm64-darwin + - jruby + - x64-mingw-ucrt + - x64-mingw32 + - x86-linux-gnu + - x86-linux-musl + - x86-mingw32 + - x86_64-darwin + - x86_64-linux-gnu + - x86_64-linux-musl + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 with: ruby-version: "3.3" @@ -44,13 +67,14 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildx-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildx + key: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildxz enableCrossOsArchive: true - - name: Change docker to a cache-able driver + - name: Build the image for platform ${{ matrix.platform }} on ${{ runner.arch }} run: | + # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,dest=tmp/build-cache-new" + bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Show docker images run: docker images - name: Update and prune docker buildx layer cache @@ -63,41 +87,290 @@ jobs: needs: build strategy: fail-fast: false - matrix: - platform: - - aarch64-linux-gnu - - aarch64-linux-musl - - aarch64-mingw-ucrt - - arm-linux-gnu - - arm-linux-musl - - arm64-darwin - - jruby - - x64-mingw-ucrt - - x64-mingw32 - - x86-linux-gnu - - x86-linux-musl - - x86-mingw32 - - x86_64-darwin - - x86_64-linux-gnu - - x86_64-linux-musl - runs-on: ubuntu-latest + runs-on: ubuntu-24.04-arm steps: - uses: actions/checkout@v4 - - name: Use X64 cache from primary pipeline + + # https://github.com/orgs/community/discussions/26351#discussioncomment-3251595 + - name: free disk space + run: | + df -h + sudo swapoff -a + sudo rm -f /swapfile + sudo apt clean + df -h + + + - name: Use X64 cache from primary pipeline of aarch64-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-aarch64-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-aarch64-linux-gnu-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-aarch64-linux-gnu + - name: Use ARM64 cache from primary pipeline of aarch64-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-aarch64-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-aarch64-linux-gnu-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-aarch64-linux-gnu + + - name: Use X64 cache from primary pipeline of aarch64-linux-musl + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-aarch64-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-aarch64-linux-musl-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-aarch64-linux-musl + - name: Use ARM64 cache from primary pipeline of aarch64-linux-musl + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-aarch64-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-aarch64-linux-musl-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-aarch64-linux-musl + + - name: Use X64 cache from primary pipeline of aarch64-mingw-ucrt + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-aarch64-mingw-ucrt-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-aarch64-mingw-ucrt-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-aarch64-mingw-ucrt + - name: Use ARM64 cache from primary pipeline of aarch64-mingw-ucrt + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-aarch64-mingw-ucrt-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-aarch64-mingw-ucrt-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-aarch64-mingw-ucrt + + - name: Use X64 cache from primary pipeline of arm-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-arm-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-arm-linux-gnu-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-arm-linux-gnu + - name: Use ARM64 cache from primary pipeline of arm-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-arm-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-arm-linux-gnu-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-arm-linux-gnu + + - name: Use X64 cache from primary pipeline of arm-linux-musl uses: actions/cache/restore@v4 with: path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-${{ matrix.platform }}-buildx-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-${{ matrix.platform }}-buildx + key: ${{ runner.os }}-on-X64-arm-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-arm-linux-musl-buildxz enableCrossOsArchive: true - - name: Use ARM64 cache from primary pipeline + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-arm-linux-musl + - name: Use ARM64 cache from primary pipeline of arm-linux-musl uses: actions/cache/restore@v4 with: path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-${{ matrix.platform }}-buildx-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-${{ matrix.platform }}-buildx + key: ${{ runner.os }}-on-ARM64-arm-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-arm-linux-musl-buildxz enableCrossOsArchive: true fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-arm-linux-musl + + - name: Use X64 cache from primary pipeline of arm64-darwin + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-arm64-darwin-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-arm64-darwin-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-arm64-darwin + - name: Use ARM64 cache from primary pipeline of arm64-darwin + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-arm64-darwin-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-arm64-darwin-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-arm64-darwin + + - name: Use X64 cache from primary pipeline of jruby + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-jruby-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-jruby-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-jruby + - name: Use ARM64 cache from primary pipeline of jruby + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-jruby-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-jruby-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-jruby + + - name: Use X64 cache from primary pipeline of x64-mingw-ucrt + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x64-mingw-ucrt-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x64-mingw-ucrt-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x64-mingw-ucrt + - name: Use ARM64 cache from primary pipeline of x64-mingw-ucrt + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x64-mingw-ucrt-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x64-mingw-ucrt-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x64-mingw-ucrt + + - name: Use X64 cache from primary pipeline of x64-mingw32 + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x64-mingw32-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x64-mingw32-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x64-mingw32 + - name: Use ARM64 cache from primary pipeline of x64-mingw32 + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x64-mingw32-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x64-mingw32-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x64-mingw32 + + - name: Use X64 cache from primary pipeline of x86-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x86-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x86-linux-gnu-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86-linux-gnu + - name: Use ARM64 cache from primary pipeline of x86-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x86-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x86-linux-gnu-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86-linux-gnu + + - name: Use X64 cache from primary pipeline of x86-linux-musl + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x86-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x86-linux-musl-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86-linux-musl + - name: Use ARM64 cache from primary pipeline of x86-linux-musl + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x86-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x86-linux-musl-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86-linux-musl + + - name: Use X64 cache from primary pipeline of x86-mingw32 + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x86-mingw32-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x86-mingw32-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86-mingw32 + - name: Use ARM64 cache from primary pipeline of x86-mingw32 + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x86-mingw32-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x86-mingw32-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86-mingw32 + + - name: Use X64 cache from primary pipeline of x86_64-darwin + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x86_64-darwin-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x86_64-darwin-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86_64-darwin + - name: Use ARM64 cache from primary pipeline of x86_64-darwin + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x86_64-darwin-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x86_64-darwin-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86_64-darwin + + - name: Use X64 cache from primary pipeline of x86_64-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x86_64-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x86_64-linux-gnu-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86_64-linux-gnu + - name: Use ARM64 cache from primary pipeline of x86_64-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x86_64-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x86_64-linux-gnu-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86_64-linux-gnu + + - name: Use X64 cache from primary pipeline of x86_64-linux-musl + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x86_64-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x86_64-linux-musl-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86_64-linux-musl + - name: Use ARM64 cache from primary pipeline of x86_64-linux-musl + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x86_64-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x86_64-linux-musl-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86_64-linux-musl + - uses: ruby/setup-ruby@v1 with: ruby-version: "3.3" @@ -110,7 +383,7 @@ jobs: - name: Use cache and push docker image env: RCD_IMAGE_VERSION: snapshot - RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,src=tmp/build-cache-X64 --cache-from=type=local,src=tmp/build-cache-ARM64 --cache-to=type=local,dest=tmp/build-cache-new + RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-aarch64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-aarch64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-aarch64-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-aarch64-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-aarch64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-aarch64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-arm-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-arm-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-arm-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-arm-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-arm64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-arm64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-jruby --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-jruby --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x64-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x64-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86_64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86_64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86_64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86_64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86_64-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86_64-linux-musl --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new run: | docker buildx create --driver docker-container --use - bundle exec rake release:${{matrix.platform}} + bundle exec rake release:images diff --git a/.github/workflows/publish-images.yml.erb b/.github/workflows/publish-images.yml.erb new file mode 100644 index 0000000..4bfd48b --- /dev/null +++ b/.github/workflows/publish-images.yml.erb @@ -0,0 +1,142 @@ +<% if release %> +name: Release docker images to GHCR +# +# This workflow assumes the maintainer has chosen the appropriate tag in the workflow dispatch UI. +# +on: + workflow_dispatch: + inputs: + tag: + description: "Tag name to release" + required: true + +<% else %> +name: Weekly publish docker images to GHCR +on: + workflow_dispatch: + schedule: + - cron: "0 3 * * 3" # At 03:00 on Wednesday # https://crontab.guru/#0_3_*_*_3 +<% end %> + +concurrency: + group: "${{github.workflow}}-${{github.ref}}" + cancel-in-progress: true + + +<% +platforms = %w[ + aarch64-linux-gnu + aarch64-linux-musl + aarch64-mingw-ucrt + arm-linux-gnu + arm-linux-musl + arm64-darwin + jruby + x64-mingw-ucrt + x64-mingw32 + x86-linux-gnu + x86-linux-musl + x86-mingw32 + x86_64-darwin + x86_64-linux-gnu + x86_64-linux-musl +] +%> + +jobs: + build: + name: "build ${{ matrix.platform }} ${{ matrix.os }}" + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + platform: +<% platforms.each do |pl| %> + <%= "- #{pl}" %> +<% end %> + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 +<% if release %> + with: + ref: ${{ inputs.tag }} +<% end %> + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.3" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildxz + enableCrossOsArchive: true + - name: Build the image for platform ${{ matrix.platform }} on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + push: + name: push + needs: build + strategy: + fail-fast: false + runs-on: ubuntu-24.04-arm + steps: + - uses: actions/checkout@v4 + + # https://github.com/orgs/community/discussions/26351#discussioncomment-3251595 + - name: free disk space + run: | + df -h + sudo swapoff -a + sudo rm -f /swapfile + sudo apt clean + df -h + +<% platforms.each do |pl| %> + - name: Use X64 cache from primary pipeline of <%= pl %> + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-<%= pl %>-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-<%= pl %>-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-<%= pl %> + - name: Use ARM64 cache from primary pipeline of <%= pl %> + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-<%= pl %>-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-<%= pl %>-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-<%= pl %> +<% end %> + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.3" + bundler-cache: true + - uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + - name: Use cache and push docker image + env: + RCD_IMAGE_VERSION: snapshot + RCD_DOCKER_BUILD: docker buildx build <%= platforms.map{|pl| "--cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-#{pl} --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-#{pl} " }.join %> --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new + run: | + docker buildx create --driver docker-container --use + bundle exec rake release:images diff --git a/.github/workflows/release-images.yml b/.github/workflows/release-images.yml index 07a1c53..7fb6f64 100644 --- a/.github/workflows/release-images.yml +++ b/.github/workflows/release-images.yml @@ -1,8 +1,5 @@ -name: Release docker images to GHCR -concurrency: - group: "${{github.workflow}}-${{github.ref}}" - cancel-in-progress: true +name: Release docker images to GHCR # # This workflow assumes the maintainer has chosen the appropriate tag in the workflow dispatch UI. # @@ -13,9 +10,18 @@ on: description: "Tag name to release" required: true + + +concurrency: + group: "${{github.workflow}}-${{github.ref}}" + cancel-in-progress: true + + + + jobs: build: - name: "build ${{ inputs.tag }} ${{ matrix.platform }}" + name: "build ${{ matrix.platform }} ${{ matrix.os }}" strategy: fail-fast: false matrix: @@ -23,24 +29,44 @@ jobs: - ubuntu-latest - ubuntu-24.04-arm platform: + - aarch64-linux-gnu + - aarch64-linux-musl + - aarch64-mingw-ucrt + - arm-linux-gnu + - arm-linux-musl + - arm64-darwin + - jruby + - x64-mingw-ucrt + - x64-mingw32 + - x86-linux-gnu + - x86-linux-musl + - x86-mingw32 + - x86_64-darwin + - x86_64-linux-gnu + - x86_64-linux-musl + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + + with: + ref: ${{ inputs.tag }} + - uses: ruby/setup-ruby@v1 with: ruby-version: "3.3" @@ -50,13 +76,14 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildx-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildx + key: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildxz enableCrossOsArchive: true - - name: Change docker to a cache-able driver + - name: Build the image for platform ${{ matrix.platform }} on ${{ runner.arch }} run: | + # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,dest=tmp/build-cache-new" + bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Show docker images run: docker images - name: Update and prune docker buildx layer cache @@ -65,47 +92,294 @@ jobs: mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} push: + name: push needs: build - name: "push ${{ inputs.tag }} ${{ matrix.platform }}" strategy: fail-fast: false - matrix: - platform: - - aarch64-linux-gnu - - aarch64-linux-musl - - aarch64-mingw-ucrt - - arm-linux-gnu - - arm-linux-musl - - arm64-darwin - - jruby - - x64-mingw-ucrt - - x64-mingw32 - - x86-linux-gnu - - x86-linux-musl - - x86-mingw32 - - x86_64-darwin - - x86_64-linux-gnu - - x86_64-linux-musl - runs-on: ubuntu-latest + runs-on: ubuntu-24.04-arm steps: - uses: actions/checkout@v4 + + # https://github.com/orgs/community/discussions/26351#discussioncomment-3251595 + - name: free disk space + run: | + df -h + sudo swapoff -a + sudo rm -f /swapfile + sudo apt clean + df -h + + + - name: Use X64 cache from primary pipeline of aarch64-linux-gnu + uses: actions/cache/restore@v4 with: - ref: ${{ inputs.tag }} - - name: Use X64 cache from primary pipeline + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-aarch64-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-aarch64-linux-gnu-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-aarch64-linux-gnu + - name: Use ARM64 cache from primary pipeline of aarch64-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-aarch64-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-aarch64-linux-gnu-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-aarch64-linux-gnu + + - name: Use X64 cache from primary pipeline of aarch64-linux-musl + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-aarch64-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-aarch64-linux-musl-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-aarch64-linux-musl + - name: Use ARM64 cache from primary pipeline of aarch64-linux-musl + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-aarch64-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-aarch64-linux-musl-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-aarch64-linux-musl + + - name: Use X64 cache from primary pipeline of aarch64-mingw-ucrt + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-aarch64-mingw-ucrt-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-aarch64-mingw-ucrt-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-aarch64-mingw-ucrt + - name: Use ARM64 cache from primary pipeline of aarch64-mingw-ucrt + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-aarch64-mingw-ucrt-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-aarch64-mingw-ucrt-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-aarch64-mingw-ucrt + + - name: Use X64 cache from primary pipeline of arm-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-arm-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-arm-linux-gnu-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-arm-linux-gnu + - name: Use ARM64 cache from primary pipeline of arm-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-arm-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-arm-linux-gnu-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-arm-linux-gnu + + - name: Use X64 cache from primary pipeline of arm-linux-musl + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-arm-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-arm-linux-musl-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-arm-linux-musl + - name: Use ARM64 cache from primary pipeline of arm-linux-musl + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-arm-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-arm-linux-musl-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-arm-linux-musl + + - name: Use X64 cache from primary pipeline of arm64-darwin + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-arm64-darwin-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-arm64-darwin-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-arm64-darwin + - name: Use ARM64 cache from primary pipeline of arm64-darwin + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-arm64-darwin-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-arm64-darwin-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-arm64-darwin + + - name: Use X64 cache from primary pipeline of jruby + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-jruby-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-jruby-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-jruby + - name: Use ARM64 cache from primary pipeline of jruby + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-jruby-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-jruby-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-jruby + + - name: Use X64 cache from primary pipeline of x64-mingw-ucrt + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x64-mingw-ucrt-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x64-mingw-ucrt-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x64-mingw-ucrt + - name: Use ARM64 cache from primary pipeline of x64-mingw-ucrt + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x64-mingw-ucrt-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x64-mingw-ucrt-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x64-mingw-ucrt + + - name: Use X64 cache from primary pipeline of x64-mingw32 + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x64-mingw32-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x64-mingw32-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x64-mingw32 + - name: Use ARM64 cache from primary pipeline of x64-mingw32 + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x64-mingw32-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x64-mingw32-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x64-mingw32 + + - name: Use X64 cache from primary pipeline of x86-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x86-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x86-linux-gnu-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86-linux-gnu + - name: Use ARM64 cache from primary pipeline of x86-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x86-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x86-linux-gnu-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86-linux-gnu + + - name: Use X64 cache from primary pipeline of x86-linux-musl uses: actions/cache/restore@v4 with: path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-${{ matrix.platform }}-buildx-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-${{ matrix.platform }}-buildx + key: ${{ runner.os }}-on-X64-x86-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x86-linux-musl-buildxz enableCrossOsArchive: true - - name: Use ARM64 cache from primary pipeline + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86-linux-musl + - name: Use ARM64 cache from primary pipeline of x86-linux-musl uses: actions/cache/restore@v4 with: path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-${{ matrix.platform }}-buildx-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-${{ matrix.platform }}-buildx + key: ${{ runner.os }}-on-ARM64-x86-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x86-linux-musl-buildxz enableCrossOsArchive: true fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86-linux-musl + + - name: Use X64 cache from primary pipeline of x86-mingw32 + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x86-mingw32-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x86-mingw32-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86-mingw32 + - name: Use ARM64 cache from primary pipeline of x86-mingw32 + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x86-mingw32-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x86-mingw32-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86-mingw32 + + - name: Use X64 cache from primary pipeline of x86_64-darwin + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x86_64-darwin-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x86_64-darwin-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86_64-darwin + - name: Use ARM64 cache from primary pipeline of x86_64-darwin + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x86_64-darwin-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x86_64-darwin-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86_64-darwin + + - name: Use X64 cache from primary pipeline of x86_64-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x86_64-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x86_64-linux-gnu-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86_64-linux-gnu + - name: Use ARM64 cache from primary pipeline of x86_64-linux-gnu + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x86_64-linux-gnu-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x86_64-linux-gnu-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86_64-linux-gnu + + - name: Use X64 cache from primary pipeline of x86_64-linux-musl + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-X64 + key: ${{ runner.os }}-on-X64-x86_64-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-x86_64-linux-musl-buildxz + enableCrossOsArchive: true + - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86_64-linux-musl + - name: Use ARM64 cache from primary pipeline of x86_64-linux-musl + uses: actions/cache/restore@v4 + with: + path: tmp/build-cache-ARM64 + key: ${{ runner.os }}-on-ARM64-x86_64-linux-musl-buildxz-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-x86_64-linux-musl-buildxz + enableCrossOsArchive: true + fail-on-cache-miss: true + - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86_64-linux-musl + - uses: ruby/setup-ruby@v1 with: ruby-version: "3.3" @@ -117,7 +391,8 @@ jobs: password: ${{secrets.GITHUB_TOKEN}} - name: Use cache and push docker image env: - RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,src=tmp/build-cache-X64 --cache-from=type=local,src=tmp/build-cache-ARM64 --cache-to=type=local,dest=tmp/build-cache-new + RCD_IMAGE_VERSION: snapshot + RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-aarch64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-aarch64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-aarch64-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-aarch64-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-aarch64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-aarch64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-arm-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-arm-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-arm-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-arm-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-arm64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-arm64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-jruby --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-jruby --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x64-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x64-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86_64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86_64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86_64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86_64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86_64-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86_64-linux-musl --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new run: | docker buildx create --driver docker-container --use - bundle exec rake release:${{matrix.platform}} + bundle exec rake release:images diff --git a/Rakefile b/Rakefile index b974dd5..b48fde2 100644 --- a/Rakefile +++ b/Rakefile @@ -172,3 +172,16 @@ task :update_lists do EOT end end + +desc "Update CI publish workflows from erb" +namespace :ci do + task :update_workflows do + erb = ERB.new(File.read(".github/workflows/publish-images.yml.erb")) + sdf = ".github/workflows/publish-images.yml" + release = false + File.write(sdf, erb.result(binding)) + sdf = ".github/workflows/release-images.yml" + release = true + File.write(sdf, erb.result(binding)) + end +end From 931662081b4824ed5cac7dc3478ec05310c7726b Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Sun, 26 Oct 2025 21:15:26 +0100 Subject: [PATCH 2/4] Remove host_platform from Dockerfile specializations Image builds depend on $TARGETPLATFORM instead of host_platform now, so that the Dockerfile content is the same accross host platforms. --- Rakefile | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Rakefile b/Rakefile index b48fde2..f764ca5 100644 --- a/Rakefile +++ b/Rakefile @@ -11,7 +11,7 @@ RakeCompilerDock::GemHelper.install_tasks def build_mri_images(platforms, host_platforms, output: ) plats = host_platforms.map(&:first).join(",") platforms.each do |platform, _| - sdf = "tmp/docker/Dockerfile.mri.#{platform}.#{host_platforms.first[1]}" + sdf = "tmp/docker/Dockerfile.mri.#{platform}" image_name = RakeCompilerDock::Starter.container_image_name(platform: platform) RakeCompilerDock.docker_build(sdf, tag: image_name, platform: plats, output: output) @@ -25,7 +25,7 @@ end def build_jruby_images(host_platforms, output: ) image_name = RakeCompilerDock::Starter.container_image_name(rubyvm: "jruby") plats = host_platforms.map(&:first).join(",") - sdf = "tmp/docker/Dockerfile.jruby.#{host_platforms.first[1]}" + sdf = "tmp/docker/Dockerfile.jruby" RakeCompilerDock.docker_build(sdf, tag: image_name, platform: plats, output: output) end @@ -48,32 +48,32 @@ platforms = [ ] host_platforms = [ - # tuple is [docker platform, rake task, RUBY_PLATFORM matcher] - ["linux/amd64", "x86", /^x86_64|^x64|^amd64/], - ["linux/arm64", "arm", /^aarch64|arm64/], + # tuple is [docker platform, RUBY_PLATFORM matcher] + ["linux/amd64", /^x86_64|^x64|^amd64/], + ["linux/arm64", /^aarch64|arm64/], ] -local_platform = host_platforms.find { |_,_,reg| reg =~ RUBY_PLATFORM } or +local_platform = host_platforms.find { |_,reg| reg =~ RUBY_PLATFORM } or raise("RUBY_PLATFORM #{RUBY_PLATFORM} is not supported as host") namespace :build do mkdir_p "tmp/docker" - docker_platform, rake_platform, _ = local_platform + docker_platform, _ = local_platform platforms.each do |platform, target| - sdf = "tmp/docker/Dockerfile.mri.#{platform}.#{rake_platform}" + sdf = "tmp/docker/Dockerfile.mri.#{platform}" df = ERB.new(File.read("Dockerfile.mri.erb"), trim_mode: ">").result(binding) File.write(sdf, df) CLEAN.include(sdf) end - sdf = "tmp/docker/Dockerfile.jruby.#{rake_platform}" + sdf = "tmp/docker/Dockerfile.jruby" df = File.read("Dockerfile.jruby") File.write(sdf, df) - RakeCompilerDock::ParallelDockerBuild.new(platforms.map{|pl, _| "tmp/docker/Dockerfile.mri.#{pl}.#{rake_platform}" } + ["tmp/docker/Dockerfile.jruby.#{rake_platform}"], workdir: "tmp/docker", task_prefix: "common-#{rake_platform}-", platform: docker_platform) + RakeCompilerDock::ParallelDockerBuild.new(platforms.map{|pl, _| "tmp/docker/Dockerfile.mri.#{pl}" } + ["tmp/docker/Dockerfile.jruby"], workdir: "tmp/docker", task_prefix: "common-", platform: docker_platform) platforms.each do |platform, target| - sdf = "tmp/docker/Dockerfile.mri.#{platform}.#{rake_platform}" + sdf = "tmp/docker/Dockerfile.mri.#{platform}" # Load image after build on local platform only desc "Build and load image for platform #{platform} on #{docker_platform}" @@ -83,7 +83,7 @@ namespace :build do multitask :images => platform end - sdf = "tmp/docker/Dockerfile.jruby.#{rake_platform}" + sdf = "tmp/docker/Dockerfile.jruby" # Load image after build on local platform only desc "Build and load image for JRuby on #{docker_platform}" task :jruby => sdf do From 2c6fec19cf5e4c118b888d1bf0c020082183d88e Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Tue, 28 Oct 2025 06:59:09 +0100 Subject: [PATCH 3/4] Use ParallelDockerBuild for CI to reduce image download size The RCD platform images can share common docker image layers for files that are not related to the target platform. This is the base installation with native ruby. All -musl platforms can share the common musl setup. All darwin platforms can share the common osxcross setup. So this moves one part of the Dockerfile more to the front, since it's not platform dependent. This also adds a new rake task "release:sizes" to check the images. It shows the real download amount of all platform images (all-combined) and the sumup of all layers of all platform images when downloaded separately. This optimization drops the download size of all snapshot images to 3GB: amd64-linux all-separate : 5435 MB arm64-linux all-separate : 5297 MB amd64-linux all-combined : 3040 MB arm64-linux all-combined : 2999 MB Whereas version 1.10.0 is almost 6GB: amd64-linux all-separate : 6135 MB arm64-linux all-separate : 5938 MB amd64-linux all-combined : 5793 MB arm64-linux all-combined : 5616 MB The generally decreased download size (from 6135MB to 5435MB, etc.) is due to the recent change of the compression method from gzip to zstd. --- .github/workflows/publish-images.yml | 996 +++++++++++++++------ .github/workflows/publish-images.yml.erb | 84 +- .github/workflows/release-images.yml | 1006 ++++++++++++++++------ Dockerfile.mri.erb | 115 +-- Rakefile | 69 +- build/parallel_docker_build.rb | 57 +- test/test_parallel_docker_build.rb | 2 +- 7 files changed, 1670 insertions(+), 659 deletions(-) diff --git a/.github/workflows/publish-images.yml b/.github/workflows/publish-images.yml index 1c02f3f..6e66d4a 100644 --- a/.github/workflows/publish-images.yml +++ b/.github/workflows/publish-images.yml @@ -10,71 +10,40 @@ concurrency: group: "${{github.workflow}}-${{github.ref}}" cancel-in-progress: true - - - jobs: - build: - name: "build ${{ matrix.platform }} ${{ matrix.os }}" + + common-7f790bc6d2444edacd5337c9048dae13842eb9ff: + name: "build ${{ matrix.os }} common-7f790bc6d2444edacd5337c9048dae13842eb9ff" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false matrix: os: - ubuntu-latest - ubuntu-24.04-arm - platform: - - - aarch64-linux-gnu - - - aarch64-linux-musl - - - aarch64-mingw-ucrt - - - arm-linux-gnu - - - arm-linux-musl - - - arm64-darwin - - - jruby - - - x64-mingw-ucrt - - - x64-mingw32 - - - x86-linux-gnu - - - x86-linux-musl - - - x86-mingw32 - - - x86_64-darwin - - - x86_64-linux-gnu - - - x86_64-linux-musl - runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler-cache: true - name: Fetch docker buildx layer cache uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildxz + key: ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image for platform ${{ matrix.platform }} on ${{ runner.arch }} + - name: Build the image layers common-7f790bc6d2444edacd5337c9048dae13842eb9ff on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + bundle exec rake build:common-7f790bc6d2444edacd5337c9048dae13842eb9ff RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Show docker images run: docker images - name: Update and prune docker buildx layer cache @@ -82,298 +51,785 @@ jobs: rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - push: - name: push - needs: build + common-d1f437046b79903f679102aadd5269e80f584d09: + name: "build ${{ matrix.os }} common-d1f437046b79903f679102aadd5269e80f584d09" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false - runs-on: ubuntu-24.04-arm + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - # https://github.com/orgs/community/discussions/26351#discussioncomment-3251595 - - name: free disk space - run: | - df -h - sudo swapoff -a - sudo rm -f /swapfile - sudo apt clean - df -h - - - - name: Use X64 cache from primary pipeline of aarch64-linux-gnu - uses: actions/cache/restore@v4 - with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-aarch64-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-aarch64-linux-gnu-buildxz - enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-aarch64-linux-gnu - - name: Use ARM64 cache from primary pipeline of aarch64-linux-gnu - uses: actions/cache/restore@v4 + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-aarch64-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-aarch64-linux-gnu-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-aarch64-linux-gnu + ruby-version: "3.4" + bundler-cache: true - - name: Use X64 cache from primary pipeline of aarch64-linux-musl - uses: actions/cache/restore@v4 - with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-aarch64-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-aarch64-linux-musl-buildxz - enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-aarch64-linux-musl - - name: Use ARM64 cache from primary pipeline of aarch64-linux-musl - uses: actions/cache/restore@v4 + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-aarch64-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-aarch64-linux-musl-buildxz + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-aarch64-linux-musl + - name: Build the image layers common-d1f437046b79903f679102aadd5269e80f584d09 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-d1f437046b79903f679102aadd5269e80f584d09 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - - name: Use X64 cache from primary pipeline of aarch64-mingw-ucrt - uses: actions/cache/restore@v4 - with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-aarch64-mingw-ucrt-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-aarch64-mingw-ucrt-buildxz - enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-aarch64-mingw-ucrt - - name: Use ARM64 cache from primary pipeline of aarch64-mingw-ucrt - uses: actions/cache/restore@v4 - with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-aarch64-mingw-ucrt-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-aarch64-mingw-ucrt-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-aarch64-mingw-ucrt + common-8c26987a5e78ace67587139520ec4d44e00a8f54: + name: "build ${{ matrix.os }} common-8c26987a5e78ace67587139520ec4d44e00a8f54" + needs: common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 - - name: Use X64 cache from primary pipeline of arm-linux-gnu - uses: actions/cache/restore@v4 - with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-arm-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-arm-linux-gnu-buildxz - enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-arm-linux-gnu - - name: Use ARM64 cache from primary pipeline of arm-linux-gnu - uses: actions/cache/restore@v4 + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-arm-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-arm-linux-gnu-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-arm-linux-gnu + ruby-version: "3.4" + bundler-cache: true - - name: Use X64 cache from primary pipeline of arm-linux-musl - uses: actions/cache/restore@v4 - with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-arm-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-arm-linux-musl-buildxz - enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-arm-linux-musl - - name: Use ARM64 cache from primary pipeline of arm-linux-musl - uses: actions/cache/restore@v4 + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-arm-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-arm-linux-musl-buildxz + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 + ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-arm-linux-musl + - name: Build the image layers common-8c26987a5e78ace67587139520ec4d44e00a8f54 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-8c26987a5e78ace67587139520ec4d44e00a8f54 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - - name: Use X64 cache from primary pipeline of arm64-darwin - uses: actions/cache/restore@v4 - with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-arm64-darwin-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-arm64-darwin-buildxz - enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-arm64-darwin - - name: Use ARM64 cache from primary pipeline of arm64-darwin - uses: actions/cache/restore@v4 + common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0: + name: "build ${{ matrix.os }} common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0" + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-arm64-darwin-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-arm64-darwin-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-arm64-darwin + ruby-version: "3.4" + bundler-cache: true - - name: Use X64 cache from primary pipeline of jruby - uses: actions/cache/restore@v4 + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-jruby-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-jruby-buildxz + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 + ${{ runner.os }}-on-${{ runner.arch }}- enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-jruby - - name: Use ARM64 cache from primary pipeline of jruby - uses: actions/cache/restore@v4 + - name: Build the image layers common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-723ac6e8df696b68867754088d542e27005deaaf: + name: "build ${{ matrix.os }} common-723ac6e8df696b68867754088d542e27005deaaf" + needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-jruby-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-jruby-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-jruby + ruby-version: "3.4" + bundler-cache: true - - name: Use X64 cache from primary pipeline of x64-mingw-ucrt - uses: actions/cache/restore@v4 + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x64-mingw-ucrt-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x64-mingw-ucrt-buildxz + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-723ac6e8df696b68867754088d542e27005deaaf-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-723ac6e8df696b68867754088d542e27005deaaf + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x64-mingw-ucrt - - name: Use ARM64 cache from primary pipeline of x64-mingw-ucrt - uses: actions/cache/restore@v4 + - name: Build the image layers common-723ac6e8df696b68867754088d542e27005deaaf on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-723ac6e8df696b68867754088d542e27005deaaf RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-fbc527a24691e48b3ceae3946e031e5e7e88c321: + name: "build ${{ matrix.os }} common-fbc527a24691e48b3ceae3946e031e5e7e88c321" + needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x64-mingw-ucrt-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x64-mingw-ucrt-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x64-mingw-ucrt + ruby-version: "3.4" + bundler-cache: true - - name: Use X64 cache from primary pipeline of x64-mingw32 - uses: actions/cache/restore@v4 + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x64-mingw32-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x64-mingw32-buildxz + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-fbc527a24691e48b3ceae3946e031e5e7e88c321-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-fbc527a24691e48b3ceae3946e031e5e7e88c321 + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x64-mingw32 - - name: Use ARM64 cache from primary pipeline of x64-mingw32 - uses: actions/cache/restore@v4 + - name: Build the image layers common-fbc527a24691e48b3ceae3946e031e5e7e88c321 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-fbc527a24691e48b3ceae3946e031e5e7e88c321 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-63da25377d0818f37111c2410d4816b73d1a9060: + name: "build ${{ matrix.os }} common-63da25377d0818f37111c2410d4816b73d1a9060" + needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x64-mingw32-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x64-mingw32-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x64-mingw32 + ruby-version: "3.4" + bundler-cache: true - - name: Use X64 cache from primary pipeline of x86-linux-gnu - uses: actions/cache/restore@v4 + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x86-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x86-linux-gnu-buildxz + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-63da25377d0818f37111c2410d4816b73d1a9060-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-63da25377d0818f37111c2410d4816b73d1a9060 + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86-linux-gnu - - name: Use ARM64 cache from primary pipeline of x86-linux-gnu - uses: actions/cache/restore@v4 + - name: Build the image layers common-63da25377d0818f37111c2410d4816b73d1a9060 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-63da25377d0818f37111c2410d4816b73d1a9060 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-dc7239babc93dee187ce0f0fa030de8c792e8611: + name: "build ${{ matrix.os }} common-dc7239babc93dee187ce0f0fa030de8c792e8611" + needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x86-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x86-linux-gnu-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86-linux-gnu + ruby-version: "3.4" + bundler-cache: true - - name: Use X64 cache from primary pipeline of x86-linux-musl - uses: actions/cache/restore@v4 + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x86-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x86-linux-musl-buildxz + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-dc7239babc93dee187ce0f0fa030de8c792e8611-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-dc7239babc93dee187ce0f0fa030de8c792e8611 + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86-linux-musl - - name: Use ARM64 cache from primary pipeline of x86-linux-musl - uses: actions/cache/restore@v4 + - name: Build the image layers common-dc7239babc93dee187ce0f0fa030de8c792e8611 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-dc7239babc93dee187ce0f0fa030de8c792e8611 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-2829589da6681b1b5f379e6d68ff6be60cba5cf6: + name: "build ${{ matrix.os }} common-2829589da6681b1b5f379e6d68ff6be60cba5cf6" + needs: common-d1f437046b79903f679102aadd5269e80f584d09 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x86-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x86-linux-musl-buildxz + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-2829589da6681b1b5f379e6d68ff6be60cba5cf6-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 + ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86-linux-musl + - name: Build the image layers common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - - name: Use X64 cache from primary pipeline of x86-mingw32 - uses: actions/cache/restore@v4 + common-bc540754626a1ebf8164f8ae4378b9104b383663: + name: "build ${{ matrix.os }} common-bc540754626a1ebf8164f8ae4378b9104b383663" + needs: common-d1f437046b79903f679102aadd5269e80f584d09 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x86-mingw32-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x86-mingw32-buildxz + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-bc540754626a1ebf8164f8ae4378b9104b383663-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-bc540754626a1ebf8164f8ae4378b9104b383663 + ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86-mingw32 - - name: Use ARM64 cache from primary pipeline of x86-mingw32 - uses: actions/cache/restore@v4 + - name: Build the image layers common-bc540754626a1ebf8164f8ae4378b9104b383663 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-bc540754626a1ebf8164f8ae4378b9104b383663 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f: + name: "build ${{ matrix.os }} common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x86-mingw32-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x86-mingw32-buildxz + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86-mingw32 + - name: Build the image layers common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - - name: Use X64 cache from primary pipeline of x86_64-darwin - uses: actions/cache/restore@v4 + common-2378386d2f098439bb4555bfc930aa62eab2dd65: + name: "build ${{ matrix.os }} common-2378386d2f098439bb4555bfc930aa62eab2dd65" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x86_64-darwin-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x86_64-darwin-buildxz + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-2378386d2f098439bb4555bfc930aa62eab2dd65-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-2378386d2f098439bb4555bfc930aa62eab2dd65 + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86_64-darwin - - name: Use ARM64 cache from primary pipeline of x86_64-darwin - uses: actions/cache/restore@v4 + - name: Build the image layers common-2378386d2f098439bb4555bfc930aa62eab2dd65 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-2378386d2f098439bb4555bfc930aa62eab2dd65 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-8fd4771bba44643d3934e41c218db66645f9e96f: + name: "build ${{ matrix.os }} common-8fd4771bba44643d3934e41c218db66645f9e96f" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x86_64-darwin-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x86_64-darwin-buildxz + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-8fd4771bba44643d3934e41c218db66645f9e96f-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-8fd4771bba44643d3934e41c218db66645f9e96f + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86_64-darwin + - name: Build the image layers common-8fd4771bba44643d3934e41c218db66645f9e96f on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-8fd4771bba44643d3934e41c218db66645f9e96f RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - - name: Use X64 cache from primary pipeline of x86_64-linux-gnu - uses: actions/cache/restore@v4 + common-fad6604335c2d8c64475e5d69c083d0cce4f63a7: + name: "build ${{ matrix.os }} common-fad6604335c2d8c64475e5d69c083d0cce4f63a7" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x86_64-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x86_64-linux-gnu-buildxz + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-fad6604335c2d8c64475e5d69c083d0cce4f63a7-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86_64-linux-gnu - - name: Use ARM64 cache from primary pipeline of x86_64-linux-gnu - uses: actions/cache/restore@v4 + - name: Build the image layers common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-c435c444a8baec018c75861cf5b32aeb9345683e: + name: "build ${{ matrix.os }} common-c435c444a8baec018c75861cf5b32aeb9345683e" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x86_64-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x86_64-linux-gnu-buildxz + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-c435c444a8baec018c75861cf5b32aeb9345683e-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-c435c444a8baec018c75861cf5b32aeb9345683e + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86_64-linux-gnu + - name: Build the image layers common-c435c444a8baec018c75861cf5b32aeb9345683e on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-c435c444a8baec018c75861cf5b32aeb9345683e RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-cda3746d187096bfcb5179842dc5b8f845ea3da6: + name: "build ${{ matrix.os }} common-cda3746d187096bfcb5179842dc5b8f845ea3da6" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-cda3746d187096bfcb5179842dc5b8f845ea3da6-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-cda3746d187096bfcb5179842dc5b8f845ea3da6 + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 + enableCrossOsArchive: true + - name: Build the image layers common-cda3746d187096bfcb5179842dc5b8f845ea3da6 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-cda3746d187096bfcb5179842dc5b8f845ea3da6 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b: + name: "build ${{ matrix.os }} common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 + enableCrossOsArchive: true + - name: Build the image layers common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-7b065f9c97f9d9f355f67f09b97c844d21539e42: + name: "build ${{ matrix.os }} common-7b065f9c97f9d9f355f67f09b97c844d21539e42" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-7b065f9c97f9d9f355f67f09b97c844d21539e42-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-7b065f9c97f9d9f355f67f09b97c844d21539e42 + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 + enableCrossOsArchive: true + - name: Build the image layers common-7b065f9c97f9d9f355f67f09b97c844d21539e42 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-7b065f9c97f9d9f355f67f09b97c844d21539e42 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-58bf949eac408202d0b3113ff93f6330354c92a1: + name: "build ${{ matrix.os }} common-58bf949eac408202d0b3113ff93f6330354c92a1" + needs: common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-58bf949eac408202d0b3113ff93f6330354c92a1-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-58bf949eac408202d0b3113ff93f6330354c92a1 + ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 + enableCrossOsArchive: true + - name: Build the image layers common-58bf949eac408202d0b3113ff93f6330354c92a1 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-58bf949eac408202d0b3113ff93f6330354c92a1 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + + push: + name: push + needs: [common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f,common-723ac6e8df696b68867754088d542e27005deaaf,common-2378386d2f098439bb4555bfc930aa62eab2dd65,common-8fd4771bba44643d3934e41c218db66645f9e96f,common-fbc527a24691e48b3ceae3946e031e5e7e88c321,common-2829589da6681b1b5f379e6d68ff6be60cba5cf6,common-fad6604335c2d8c64475e5d69c083d0cce4f63a7,common-c435c444a8baec018c75861cf5b32aeb9345683e,common-cda3746d187096bfcb5179842dc5b8f845ea3da6,common-63da25377d0818f37111c2410d4816b73d1a9060,common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b,common-bc540754626a1ebf8164f8ae4378b9104b383663,common-7b065f9c97f9d9f355f67f09b97c844d21539e42,common-dc7239babc93dee187ce0f0fa030de8c792e8611,common-58bf949eac408202d0b3113ff93f6330354c92a1] + strategy: + fail-fast: false + matrix: + include: + + - platform: aarch64-linux-gnu + tree_dep: common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f + + - platform: aarch64-linux-musl + tree_dep: common-723ac6e8df696b68867754088d542e27005deaaf + + - platform: aarch64-mingw-ucrt + tree_dep: common-2378386d2f098439bb4555bfc930aa62eab2dd65 + + - platform: arm-linux-gnu + tree_dep: common-8fd4771bba44643d3934e41c218db66645f9e96f + + - platform: arm-linux-musl + tree_dep: common-fbc527a24691e48b3ceae3946e031e5e7e88c321 + + - platform: arm64-darwin + tree_dep: common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 + + - platform: x64-mingw-ucrt + tree_dep: common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 + + - platform: x64-mingw32 + tree_dep: common-c435c444a8baec018c75861cf5b32aeb9345683e + + - platform: x86-linux-gnu + tree_dep: common-cda3746d187096bfcb5179842dc5b8f845ea3da6 + + - platform: x86-linux-musl + tree_dep: common-63da25377d0818f37111c2410d4816b73d1a9060 + + - platform: x86-mingw32 + tree_dep: common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b + + - platform: x86_64-darwin + tree_dep: common-bc540754626a1ebf8164f8ae4378b9104b383663 + + - platform: x86_64-linux-gnu + tree_dep: common-7b065f9c97f9d9f355f67f09b97c844d21539e42 + + - platform: x86_64-linux-musl + tree_dep: common-dc7239babc93dee187ce0f0fa030de8c792e8611 + + - platform: jruby + tree_dep: common-58bf949eac408202d0b3113ff93f6330354c92a1 + + runs-on: ubuntu-24.04-arm + steps: + - uses: actions/checkout@v4 - - name: Use X64 cache from primary pipeline of x86_64-linux-musl + - name: Use X64 cache from tree pipeline of ${{ matrix.platform }} uses: actions/cache/restore@v4 with: path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x86_64-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x86_64-linux-musl-buildxz + key: ${{ runner.os }}-on-X64-${{ matrix.tree_dep }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-${{ matrix.tree_dep }} enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86_64-linux-musl - - name: Use ARM64 cache from primary pipeline of x86_64-linux-musl + - name: Use ARM64 cache from tree pipeline of ${{ matrix.platform }} uses: actions/cache/restore@v4 with: path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x86_64-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x86_64-linux-musl-buildxz + key: ${{ runner.os }}-on-ARM64-${{ matrix.tree_dep }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-${{ matrix.tree_dep }} enableCrossOsArchive: true fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86_64-linux-musl - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler-cache: true - uses: docker/login-action@v3 with: @@ -383,7 +839,7 @@ jobs: - name: Use cache and push docker image env: RCD_IMAGE_VERSION: snapshot - RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-aarch64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-aarch64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-aarch64-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-aarch64-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-aarch64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-aarch64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-arm-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-arm-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-arm-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-arm-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-arm64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-arm64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-jruby --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-jruby --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x64-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x64-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86_64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86_64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86_64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86_64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86_64-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86_64-linux-musl --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new + RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64 --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new run: | docker buildx create --driver docker-container --use - bundle exec rake release:images + bundle exec rake release:${{ matrix.platform }} diff --git a/.github/workflows/publish-images.yml.erb b/.github/workflows/publish-images.yml.erb index 4bfd48b..7411f3a 100644 --- a/.github/workflows/publish-images.yml.erb +++ b/.github/workflows/publish-images.yml.erb @@ -22,40 +22,17 @@ concurrency: group: "${{github.workflow}}-${{github.ref}}" cancel-in-progress: true - -<% -platforms = %w[ - aarch64-linux-gnu - aarch64-linux-musl - aarch64-mingw-ucrt - arm-linux-gnu - arm-linux-musl - arm64-darwin - jruby - x64-mingw-ucrt - x64-mingw32 - x86-linux-gnu - x86-linux-musl - x86-mingw32 - x86_64-darwin - x86_64-linux-gnu - x86_64-linux-musl -] -%> - jobs: - build: - name: "build ${{ matrix.platform }} ${{ matrix.os }}" +<% (parallel_docker_build.tree_deps.values + parallel_docker_build.tree_deps.keys).uniq.each do |job| %> + <%= job %>: + name: "build ${{ matrix.os }} <%= job %>" + <%= need = parallel_docker_build.tree_deps[job]; "needs: #{need}" if need %> strategy: fail-fast: false matrix: os: - ubuntu-latest - ubuntu-24.04-arm - platform: -<% platforms.each do |pl| %> - <%= "- #{pl}" %> -<% end %> runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -65,68 +42,65 @@ jobs: <% end %> - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler-cache: true - name: Fetch docker buildx layer cache uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildxz + key: ${{ runner.os }}-on-${{ runner.arch }}-<%= job %>-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-<%= job %> + ${{ runner.os }}-on-${{ runner.arch }}-<%= need %> enableCrossOsArchive: true - - name: Build the image for platform ${{ matrix.platform }} on ${{ runner.arch }} + - name: Build the image layers <%= job %> on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + bundle exec rake build:<%= job %> RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Show docker images run: docker images - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} +<% end %> push: name: push - needs: build + needs: [<%= parallel_docker_build.final_deps.values.join(",") %>] strategy: fail-fast: false + matrix: + include: +<% parallel_docker_build.final_deps.each do |dockerfile, tree_dep| %> + - platform: <%= dockerfile[/[-\w]+$/] %> + tree_dep: <%= tree_dep %> +<% end %> runs-on: ubuntu-24.04-arm steps: - uses: actions/checkout@v4 - # https://github.com/orgs/community/discussions/26351#discussioncomment-3251595 - - name: free disk space - run: | - df -h - sudo swapoff -a - sudo rm -f /swapfile - sudo apt clean - df -h - -<% platforms.each do |pl| %> - - name: Use X64 cache from primary pipeline of <%= pl %> + - name: Use X64 cache from tree pipeline of ${{ matrix.platform }} uses: actions/cache/restore@v4 with: path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-<%= pl %>-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-<%= pl %>-buildxz + key: ${{ runner.os }}-on-X64-${{ matrix.tree_dep }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-${{ matrix.tree_dep }} enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-<%= pl %> - - name: Use ARM64 cache from primary pipeline of <%= pl %> + - name: Use ARM64 cache from tree pipeline of ${{ matrix.platform }} uses: actions/cache/restore@v4 with: path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-<%= pl %>-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-<%= pl %>-buildxz + key: ${{ runner.os }}-on-ARM64-${{ matrix.tree_dep }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-${{ matrix.tree_dep }} enableCrossOsArchive: true fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-<%= pl %> -<% end %> + - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler-cache: true - uses: docker/login-action@v3 with: @@ -136,7 +110,7 @@ jobs: - name: Use cache and push docker image env: RCD_IMAGE_VERSION: snapshot - RCD_DOCKER_BUILD: docker buildx build <%= platforms.map{|pl| "--cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-#{pl} --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-#{pl} " }.join %> --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new + RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64 --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new run: | docker buildx create --driver docker-container --use - bundle exec rake release:images + bundle exec rake release:${{ matrix.platform }} diff --git a/.github/workflows/release-images.yml b/.github/workflows/release-images.yml index 7fb6f64..6b2102d 100644 --- a/.github/workflows/release-images.yml +++ b/.github/workflows/release-images.yml @@ -16,50 +16,143 @@ concurrency: group: "${{github.workflow}}-${{github.ref}}" cancel-in-progress: true - - - jobs: - build: - name: "build ${{ matrix.platform }} ${{ matrix.os }}" + + common-7f790bc6d2444edacd5337c9048dae13842eb9ff: + name: "build ${{ matrix.os }} common-7f790bc6d2444edacd5337c9048dae13842eb9ff" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false matrix: os: - ubuntu-latest - ubuntu-24.04-arm - platform: - - - aarch64-linux-gnu - - - aarch64-linux-musl - - - aarch64-mingw-ucrt - - - arm-linux-gnu + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 - - arm-linux-musl + with: + ref: ${{ inputs.tag }} - - arm64-darwin + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true - - jruby + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 + enableCrossOsArchive: true + - name: Build the image layers common-7f790bc6d2444edacd5337c9048dae13842eb9ff on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-7f790bc6d2444edacd5337c9048dae13842eb9ff RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - - x64-mingw-ucrt + common-d1f437046b79903f679102aadd5269e80f584d09: + name: "build ${{ matrix.os }} common-d1f437046b79903f679102aadd5269e80f584d09" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 - - x64-mingw32 + with: + ref: ${{ inputs.tag }} - - x86-linux-gnu + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true - - x86-linux-musl + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 + enableCrossOsArchive: true + - name: Build the image layers common-d1f437046b79903f679102aadd5269e80f584d09 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-d1f437046b79903f679102aadd5269e80f584d09 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - - x86-mingw32 + common-8c26987a5e78ace67587139520ec4d44e00a8f54: + name: "build ${{ matrix.os }} common-8c26987a5e78ace67587139520ec4d44e00a8f54" + needs: common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 - - x86_64-darwin + with: + ref: ${{ inputs.tag }} - - x86_64-linux-gnu + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true - - x86_64-linux-musl + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 + ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 + enableCrossOsArchive: true + - name: Build the image layers common-8c26987a5e78ace67587139520ec4d44e00a8f54 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-8c26987a5e78ace67587139520ec4d44e00a8f54 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0: + name: "build ${{ matrix.os }} common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0" + + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 @@ -69,21 +162,23 @@ jobs: - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler-cache: true - name: Fetch docker buildx layer cache uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}-buildxz + key: ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 + ${{ runner.os }}-on-${{ runner.arch }}- enableCrossOsArchive: true - - name: Build the image for platform ${{ matrix.platform }} on ${{ runner.arch }} + - name: Build the image layers common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + bundle exec rake build:common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Show docker images run: docker images - name: Update and prune docker buildx layer cache @@ -91,298 +186,713 @@ jobs: rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - push: - name: push - needs: build + common-723ac6e8df696b68867754088d542e27005deaaf: + name: "build ${{ matrix.os }} common-723ac6e8df696b68867754088d542e27005deaaf" + needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff strategy: fail-fast: false - runs-on: ubuntu-24.04-arm + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - # https://github.com/orgs/community/discussions/26351#discussioncomment-3251595 - - name: free disk space - run: | - df -h - sudo swapoff -a - sudo rm -f /swapfile - sudo apt clean - df -h + with: + ref: ${{ inputs.tag }} + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true - - name: Use X64 cache from primary pipeline of aarch64-linux-gnu - uses: actions/cache/restore@v4 + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-aarch64-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-aarch64-linux-gnu-buildxz + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-723ac6e8df696b68867754088d542e27005deaaf-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-723ac6e8df696b68867754088d542e27005deaaf + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-aarch64-linux-gnu - - name: Use ARM64 cache from primary pipeline of aarch64-linux-gnu - uses: actions/cache/restore@v4 + - name: Build the image layers common-723ac6e8df696b68867754088d542e27005deaaf on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-723ac6e8df696b68867754088d542e27005deaaf RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-fbc527a24691e48b3ceae3946e031e5e7e88c321: + name: "build ${{ matrix.os }} common-fbc527a24691e48b3ceae3946e031e5e7e88c321" + needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-aarch64-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-aarch64-linux-gnu-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-aarch64-linux-gnu + ref: ${{ inputs.tag }} - - name: Use X64 cache from primary pipeline of aarch64-linux-musl - uses: actions/cache/restore@v4 + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-aarch64-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-aarch64-linux-musl-buildxz - enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-aarch64-linux-musl - - name: Use ARM64 cache from primary pipeline of aarch64-linux-musl - uses: actions/cache/restore@v4 + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-aarch64-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-aarch64-linux-musl-buildxz + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-fbc527a24691e48b3ceae3946e031e5e7e88c321-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-fbc527a24691e48b3ceae3946e031e5e7e88c321 + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-aarch64-linux-musl + - name: Build the image layers common-fbc527a24691e48b3ceae3946e031e5e7e88c321 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-fbc527a24691e48b3ceae3946e031e5e7e88c321 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-63da25377d0818f37111c2410d4816b73d1a9060: + name: "build ${{ matrix.os }} common-63da25377d0818f37111c2410d4816b73d1a9060" + needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 - - name: Use X64 cache from primary pipeline of aarch64-mingw-ucrt - uses: actions/cache/restore@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-aarch64-mingw-ucrt-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-aarch64-mingw-ucrt-buildxz - enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-aarch64-mingw-ucrt - - name: Use ARM64 cache from primary pipeline of aarch64-mingw-ucrt - uses: actions/cache/restore@v4 + ref: ${{ inputs.tag }} + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-aarch64-mingw-ucrt-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-aarch64-mingw-ucrt-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-aarch64-mingw-ucrt + ruby-version: "3.4" + bundler-cache: true - - name: Use X64 cache from primary pipeline of arm-linux-gnu - uses: actions/cache/restore@v4 + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-arm-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-arm-linux-gnu-buildxz + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-63da25377d0818f37111c2410d4816b73d1a9060-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-63da25377d0818f37111c2410d4816b73d1a9060 + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-arm-linux-gnu - - name: Use ARM64 cache from primary pipeline of arm-linux-gnu - uses: actions/cache/restore@v4 + - name: Build the image layers common-63da25377d0818f37111c2410d4816b73d1a9060 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-63da25377d0818f37111c2410d4816b73d1a9060 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-dc7239babc93dee187ce0f0fa030de8c792e8611: + name: "build ${{ matrix.os }} common-dc7239babc93dee187ce0f0fa030de8c792e8611" + needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-arm-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-arm-linux-gnu-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-arm-linux-gnu + ref: ${{ inputs.tag }} - - name: Use X64 cache from primary pipeline of arm-linux-musl - uses: actions/cache/restore@v4 + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-arm-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-arm-linux-musl-buildxz - enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-arm-linux-musl - - name: Use ARM64 cache from primary pipeline of arm-linux-musl - uses: actions/cache/restore@v4 + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-arm-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-arm-linux-musl-buildxz + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-dc7239babc93dee187ce0f0fa030de8c792e8611-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-dc7239babc93dee187ce0f0fa030de8c792e8611 + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-arm-linux-musl + - name: Build the image layers common-dc7239babc93dee187ce0f0fa030de8c792e8611 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-dc7239babc93dee187ce0f0fa030de8c792e8611 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-2829589da6681b1b5f379e6d68ff6be60cba5cf6: + name: "build ${{ matrix.os }} common-2829589da6681b1b5f379e6d68ff6be60cba5cf6" + needs: common-d1f437046b79903f679102aadd5269e80f584d09 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 - - name: Use X64 cache from primary pipeline of arm64-darwin - uses: actions/cache/restore@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-arm64-darwin-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-arm64-darwin-buildxz - enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-arm64-darwin - - name: Use ARM64 cache from primary pipeline of arm64-darwin - uses: actions/cache/restore@v4 + ref: ${{ inputs.tag }} + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-arm64-darwin-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-arm64-darwin-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-arm64-darwin + ruby-version: "3.4" + bundler-cache: true - - name: Use X64 cache from primary pipeline of jruby - uses: actions/cache/restore@v4 + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-jruby-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-jruby-buildxz + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-2829589da6681b1b5f379e6d68ff6be60cba5cf6-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 + ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-jruby - - name: Use ARM64 cache from primary pipeline of jruby - uses: actions/cache/restore@v4 + - name: Build the image layers common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-bc540754626a1ebf8164f8ae4378b9104b383663: + name: "build ${{ matrix.os }} common-bc540754626a1ebf8164f8ae4378b9104b383663" + needs: common-d1f437046b79903f679102aadd5269e80f584d09 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-jruby-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-jruby-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-jruby + ref: ${{ inputs.tag }} - - name: Use X64 cache from primary pipeline of x64-mingw-ucrt - uses: actions/cache/restore@v4 + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x64-mingw-ucrt-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x64-mingw-ucrt-buildxz - enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x64-mingw-ucrt - - name: Use ARM64 cache from primary pipeline of x64-mingw-ucrt - uses: actions/cache/restore@v4 + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x64-mingw-ucrt-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x64-mingw-ucrt-buildxz + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-bc540754626a1ebf8164f8ae4378b9104b383663-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-bc540754626a1ebf8164f8ae4378b9104b383663 + ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x64-mingw-ucrt + - name: Build the image layers common-bc540754626a1ebf8164f8ae4378b9104b383663 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-bc540754626a1ebf8164f8ae4378b9104b383663 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f: + name: "build ${{ matrix.os }} common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 - - name: Use X64 cache from primary pipeline of x64-mingw32 - uses: actions/cache/restore@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x64-mingw32-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x64-mingw32-buildxz - enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x64-mingw32 - - name: Use ARM64 cache from primary pipeline of x64-mingw32 - uses: actions/cache/restore@v4 + ref: ${{ inputs.tag }} + + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x64-mingw32-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x64-mingw32-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x64-mingw32 + ruby-version: "3.4" + bundler-cache: true - - name: Use X64 cache from primary pipeline of x86-linux-gnu - uses: actions/cache/restore@v4 + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x86-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x86-linux-gnu-buildxz + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86-linux-gnu - - name: Use ARM64 cache from primary pipeline of x86-linux-gnu - uses: actions/cache/restore@v4 + - name: Build the image layers common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-2378386d2f098439bb4555bfc930aa62eab2dd65: + name: "build ${{ matrix.os }} common-2378386d2f098439bb4555bfc930aa62eab2dd65" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x86-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x86-linux-gnu-buildxz - enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86-linux-gnu + ref: ${{ inputs.tag }} - - name: Use X64 cache from primary pipeline of x86-linux-musl - uses: actions/cache/restore@v4 + - uses: ruby/setup-ruby@v1 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x86-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x86-linux-musl-buildxz + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-2378386d2f098439bb4555bfc930aa62eab2dd65-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-2378386d2f098439bb4555bfc930aa62eab2dd65 + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86-linux-musl - - name: Use ARM64 cache from primary pipeline of x86-linux-musl - uses: actions/cache/restore@v4 + - name: Build the image layers common-2378386d2f098439bb4555bfc930aa62eab2dd65 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-2378386d2f098439bb4555bfc930aa62eab2dd65 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-8fd4771bba44643d3934e41c218db66645f9e96f: + name: "build ${{ matrix.os }} common-8fd4771bba44643d3934e41c218db66645f9e96f" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x86-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x86-linux-musl-buildxz + ref: ${{ inputs.tag }} + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-8fd4771bba44643d3934e41c218db66645f9e96f-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-8fd4771bba44643d3934e41c218db66645f9e96f + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86-linux-musl + - name: Build the image layers common-8fd4771bba44643d3934e41c218db66645f9e96f on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-8fd4771bba44643d3934e41c218db66645f9e96f RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-fad6604335c2d8c64475e5d69c083d0cce4f63a7: + name: "build ${{ matrix.os }} common-fad6604335c2d8c64475e5d69c083d0cce4f63a7" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 - - name: Use X64 cache from primary pipeline of x86-mingw32 - uses: actions/cache/restore@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x86-mingw32-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x86-mingw32-buildxz + ref: ${{ inputs.tag }} + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-fad6604335c2d8c64475e5d69c083d0cce4f63a7-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86-mingw32 - - name: Use ARM64 cache from primary pipeline of x86-mingw32 - uses: actions/cache/restore@v4 + - name: Build the image layers common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-c435c444a8baec018c75861cf5b32aeb9345683e: + name: "build ${{ matrix.os }} common-c435c444a8baec018c75861cf5b32aeb9345683e" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x86-mingw32-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x86-mingw32-buildxz + ref: ${{ inputs.tag }} + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-c435c444a8baec018c75861cf5b32aeb9345683e-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-c435c444a8baec018c75861cf5b32aeb9345683e + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86-mingw32 + - name: Build the image layers common-c435c444a8baec018c75861cf5b32aeb9345683e on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-c435c444a8baec018c75861cf5b32aeb9345683e RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-cda3746d187096bfcb5179842dc5b8f845ea3da6: + name: "build ${{ matrix.os }} common-cda3746d187096bfcb5179842dc5b8f845ea3da6" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 - - name: Use X64 cache from primary pipeline of x86_64-darwin - uses: actions/cache/restore@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x86_64-darwin-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x86_64-darwin-buildxz + ref: ${{ inputs.tag }} + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-cda3746d187096bfcb5179842dc5b8f845ea3da6-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-cda3746d187096bfcb5179842dc5b8f845ea3da6 + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86_64-darwin - - name: Use ARM64 cache from primary pipeline of x86_64-darwin - uses: actions/cache/restore@v4 + - name: Build the image layers common-cda3746d187096bfcb5179842dc5b8f845ea3da6 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-cda3746d187096bfcb5179842dc5b8f845ea3da6 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b: + name: "build ${{ matrix.os }} common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x86_64-darwin-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x86_64-darwin-buildxz + ref: ${{ inputs.tag }} + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86_64-darwin + - name: Build the image layers common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-7b065f9c97f9d9f355f67f09b97c844d21539e42: + name: "build ${{ matrix.os }} common-7b065f9c97f9d9f355f67f09b97c844d21539e42" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 - - name: Use X64 cache from primary pipeline of x86_64-linux-gnu - uses: actions/cache/restore@v4 with: - path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x86_64-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x86_64-linux-gnu-buildxz + ref: ${{ inputs.tag }} + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-7b065f9c97f9d9f355f67f09b97c844d21539e42-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-7b065f9c97f9d9f355f67f09b97c844d21539e42 + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86_64-linux-gnu - - name: Use ARM64 cache from primary pipeline of x86_64-linux-gnu - uses: actions/cache/restore@v4 + - name: Build the image layers common-7b065f9c97f9d9f355f67f09b97c844d21539e42 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-7b065f9c97f9d9f355f67f09b97c844d21539e42 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + common-58bf949eac408202d0b3113ff93f6330354c92a1: + name: "build ${{ matrix.os }} common-58bf949eac408202d0b3113ff93f6330354c92a1" + needs: common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + - ubuntu-24.04-arm + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + with: - path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x86_64-linux-gnu-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x86_64-linux-gnu-buildxz + ref: ${{ inputs.tag }} + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.4" + bundler-cache: true + + - name: Fetch docker buildx layer cache + uses: actions/cache@v4 + with: + path: tmp/build-cache-${{ runner.arch }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-58bf949eac408202d0b3113ff93f6330354c92a1-${{ github.sha }} + restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-common-58bf949eac408202d0b3113ff93f6330354c92a1 + ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 enableCrossOsArchive: true - fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86_64-linux-gnu + - name: Build the image layers common-58bf949eac408202d0b3113ff93f6330354c92a1 on ${{ runner.arch }} + run: | + # Change docker to a cache-able driver + docker buildx create --driver docker-container --use + bundle exec rake build:common-58bf949eac408202d0b3113ff93f6330354c92a1 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" + - name: Show docker images + run: docker images + - name: Update and prune docker buildx layer cache + run: | + rm -rf tmp/build-cache-${{ runner.arch }} + mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} + + + push: + name: push + needs: [common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f,common-723ac6e8df696b68867754088d542e27005deaaf,common-2378386d2f098439bb4555bfc930aa62eab2dd65,common-8fd4771bba44643d3934e41c218db66645f9e96f,common-fbc527a24691e48b3ceae3946e031e5e7e88c321,common-2829589da6681b1b5f379e6d68ff6be60cba5cf6,common-fad6604335c2d8c64475e5d69c083d0cce4f63a7,common-c435c444a8baec018c75861cf5b32aeb9345683e,common-cda3746d187096bfcb5179842dc5b8f845ea3da6,common-63da25377d0818f37111c2410d4816b73d1a9060,common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b,common-bc540754626a1ebf8164f8ae4378b9104b383663,common-7b065f9c97f9d9f355f67f09b97c844d21539e42,common-dc7239babc93dee187ce0f0fa030de8c792e8611,common-58bf949eac408202d0b3113ff93f6330354c92a1] + strategy: + fail-fast: false + matrix: + include: + + - platform: aarch64-linux-gnu + tree_dep: common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f + + - platform: aarch64-linux-musl + tree_dep: common-723ac6e8df696b68867754088d542e27005deaaf + + - platform: aarch64-mingw-ucrt + tree_dep: common-2378386d2f098439bb4555bfc930aa62eab2dd65 + + - platform: arm-linux-gnu + tree_dep: common-8fd4771bba44643d3934e41c218db66645f9e96f + + - platform: arm-linux-musl + tree_dep: common-fbc527a24691e48b3ceae3946e031e5e7e88c321 + + - platform: arm64-darwin + tree_dep: common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 + + - platform: x64-mingw-ucrt + tree_dep: common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 + + - platform: x64-mingw32 + tree_dep: common-c435c444a8baec018c75861cf5b32aeb9345683e + + - platform: x86-linux-gnu + tree_dep: common-cda3746d187096bfcb5179842dc5b8f845ea3da6 + + - platform: x86-linux-musl + tree_dep: common-63da25377d0818f37111c2410d4816b73d1a9060 + + - platform: x86-mingw32 + tree_dep: common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b + + - platform: x86_64-darwin + tree_dep: common-bc540754626a1ebf8164f8ae4378b9104b383663 + + - platform: x86_64-linux-gnu + tree_dep: common-7b065f9c97f9d9f355f67f09b97c844d21539e42 + + - platform: x86_64-linux-musl + tree_dep: common-dc7239babc93dee187ce0f0fa030de8c792e8611 + + - platform: jruby + tree_dep: common-58bf949eac408202d0b3113ff93f6330354c92a1 + + runs-on: ubuntu-24.04-arm + steps: + - uses: actions/checkout@v4 - - name: Use X64 cache from primary pipeline of x86_64-linux-musl + - name: Use X64 cache from tree pipeline of ${{ matrix.platform }} uses: actions/cache/restore@v4 with: path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-x86_64-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-x86_64-linux-musl-buildxz + key: ${{ runner.os }}-on-X64-${{ matrix.tree_dep }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-${{ matrix.tree_dep }} enableCrossOsArchive: true - - run: mv tmp/build-cache-X64 tmp/build-cache-X64-x86_64-linux-musl - - name: Use ARM64 cache from primary pipeline of x86_64-linux-musl + - name: Use ARM64 cache from tree pipeline of ${{ matrix.platform }} uses: actions/cache/restore@v4 with: path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-x86_64-linux-musl-buildxz-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-x86_64-linux-musl-buildxz + key: ${{ runner.os }}-on-ARM64-${{ matrix.tree_dep }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-${{ matrix.tree_dep }} enableCrossOsArchive: true fail-on-cache-miss: true - - run: mv tmp/build-cache-ARM64 tmp/build-cache-ARM64-x86_64-linux-musl - uses: ruby/setup-ruby@v1 with: - ruby-version: "3.3" + ruby-version: "3.4" bundler-cache: true - uses: docker/login-action@v3 with: @@ -392,7 +902,7 @@ jobs: - name: Use cache and push docker image env: RCD_IMAGE_VERSION: snapshot - RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-aarch64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-aarch64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-aarch64-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-aarch64-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-aarch64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-aarch64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-arm-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-arm-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-arm-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-arm-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-arm64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-arm64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-jruby --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-jruby --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x64-mingw-ucrt --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x64-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x64-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86-mingw32 --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86_64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86_64-darwin --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86_64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86_64-linux-gnu --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64-x86_64-linux-musl --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64-x86_64-linux-musl --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new + RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64 --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new run: | docker buildx create --driver docker-container --use - bundle exec rake release:images + bundle exec rake release:${{ matrix.platform }} diff --git a/Dockerfile.mri.erb b/Dockerfile.mri.erb index ba8656f..a7b489f 100644 --- a/Dockerfile.mri.erb +++ b/Dockerfile.mri.erb @@ -12,6 +12,65 @@ RUN apt-get -y update && \ apt-get install -y autoconf cmake pkg-config zlib1g-dev libreadline-dev libsqlite0-dev libssl-dev libyaml-dev libffi-dev && \ rm -rf /var/lib/apt/lists/* +## +## install rbenv and ruby-build +## +RUN groupadd -r rubyuser && useradd -r -g rubyuser -G sudo -p "" --create-home rubyuser + +ENV RBENV_ROOT=/usr/local/rbenv + +# chown after running `rbenv init` because that command creates some subdirectories +RUN git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \ + git clone https://github.com/rbenv/ruby-build.git ${RBENV_ROOT}/plugins/ruby-build && \ + \ + echo "export RBENV_ROOT=/usr/local/rbenv" >> /etc/rubybashrc && \ + echo "export PATH=$RBENV_ROOT/bin:\$PATH" >> /etc/rubybashrc && \ + $RBENV_ROOT/bin/rbenv init - --no-rehash bash >> /etc/rubybashrc && \ + echo "source /etc/rubybashrc" >> /etc/bashrc && \ + echo "source /etc/rubybashrc" >> /etc/bash.bashrc && \ + \ + chown -R rubyuser:rubyuser ${RBENV_ROOT} && \ + find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+sw +ENV BASH_ENV=/etc/rubybashrc + + +## +## set up rake-compiler and install bootstrap rubies +## +USER rubyuser + +ENV RBENV_RUBIES="3.1.7 3.4.5" + +# Install the bootstrap rubies +RUN bash -c " \ + echo 'gem: --no-ri --no-rdoc --no-document' >> ~/.gemrc && \ + export CFLAGS='-s -O3 -fno-fast-math -fPIC' && \ + for v in ${RBENV_RUBIES} ; do \ + rbenv install \$v -- --disable-install-doc ; \ + done && \ + find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+w \ +" + +# Install rake-compiler and patch it to build and install static libraries for Linux rubies +COPY build/patches /home/rubyuser/patches +RUN bash -c " \ + for v in ${RBENV_RUBIES} ; do \ + rbenv shell \$v && \ + gem install rake-compiler -v1.2.9 && \ + cd ${RBENV_ROOT}/versions/\$v/lib/ruby/gems/*/gems/rake-compiler-1.2.9 && \ + for patch in /home/rubyuser/patches/rake-compiler-1.2.9/*.patch ; do \ + patch -p1 < \$patch ; \ + done \ + done \ +" + +# Install rake-compiler's cross rubies in global dir instead of /root +RUN sudo mkdir -p /usr/local/rake-compiler && \ + sudo chown rubyuser.rubyuser /usr/local/rake-compiler && \ + ln -s /usr/local/rake-compiler ~/.rake-compiler + +USER root + ## ## Install cross compilers ## @@ -80,64 +139,8 @@ RUN git clone --branch=cross_platform https://github.com/markmentovai/bootstrap_ rm -rf bootstrap_cmds <% end %> - -## -## install rbenv and ruby-build -## -RUN groupadd -r rubyuser && useradd -r -g rubyuser -G sudo -p "" --create-home rubyuser - -ENV RBENV_ROOT=/usr/local/rbenv - -# chown after running `rbenv init` because that command creates some subdirectories -RUN git clone https://github.com/rbenv/rbenv.git ${RBENV_ROOT} && \ - git clone https://github.com/rbenv/ruby-build.git ${RBENV_ROOT}/plugins/ruby-build && \ - \ - echo "export RBENV_ROOT=/usr/local/rbenv" >> /etc/rubybashrc && \ - echo "export PATH=$RBENV_ROOT/bin:\$PATH" >> /etc/rubybashrc && \ - $RBENV_ROOT/bin/rbenv init - --no-rehash bash >> /etc/rubybashrc && \ - echo "source /etc/rubybashrc" >> /etc/bashrc && \ - echo "source /etc/rubybashrc" >> /etc/bash.bashrc && \ - \ - chown -R rubyuser:rubyuser ${RBENV_ROOT} && \ - find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+sw -ENV BASH_ENV=/etc/rubybashrc - - -## -## set up rake-compiler and install bootstrap rubies -## USER rubyuser -ENV RBENV_RUBIES="3.1.7 3.4.5" - -# Install the bootstrap rubies -RUN bash -c " \ - echo 'gem: --no-ri --no-rdoc --no-document' >> ~/.gemrc && \ - export CFLAGS='-s -O3 -fno-fast-math -fPIC' && \ - for v in ${RBENV_RUBIES} ; do \ - rbenv install \$v -- --disable-install-doc ; \ - done && \ - find ${RBENV_ROOT} -type d -print0 | sudo xargs -0 chmod g+w \ -" - -# Install rake-compiler and patch it to build and install static libraries for Linux rubies -COPY build/patches /home/rubyuser/patches -RUN bash -c " \ - for v in ${RBENV_RUBIES} ; do \ - rbenv shell \$v && \ - gem install rake-compiler -v1.2.9 && \ - cd ${RBENV_ROOT}/versions/\$v/lib/ruby/gems/*/gems/rake-compiler-1.2.9 && \ - for patch in /home/rubyuser/patches/rake-compiler-1.2.9/*.patch ; do \ - patch -p1 < \$patch ; \ - done \ - done \ -" - -# Install rake-compiler's cross rubies in global dir instead of /root -RUN sudo mkdir -p /usr/local/rake-compiler && \ - sudo chown rubyuser.rubyuser /usr/local/rake-compiler && \ - ln -s /usr/local/rake-compiler ~/.rake-compiler - <% # # Build ruby versions with ruby2_keywords using ruby-3.x diff --git a/Rakefile b/Rakefile index f764ca5..dbedb71 100644 --- a/Rakefile +++ b/Rakefile @@ -55,22 +55,23 @@ host_platforms = [ local_platform = host_platforms.find { |_,reg| reg =~ RUBY_PLATFORM } or raise("RUBY_PLATFORM #{RUBY_PLATFORM} is not supported as host") -namespace :build do - - mkdir_p "tmp/docker" +mkdir_p "tmp/docker" - docker_platform, _ = local_platform - platforms.each do |platform, target| - sdf = "tmp/docker/Dockerfile.mri.#{platform}" - df = ERB.new(File.read("Dockerfile.mri.erb"), trim_mode: ">").result(binding) - File.write(sdf, df) - CLEAN.include(sdf) - end - sdf = "tmp/docker/Dockerfile.jruby" - df = File.read("Dockerfile.jruby") +docker_platform, _ = local_platform +platforms.each do |platform, target| + sdf = "tmp/docker/Dockerfile.mri.#{platform}" + df = ERB.new(File.read("Dockerfile.mri.erb"), trim_mode: ">").result(binding) File.write(sdf, df) + CLEAN.include(sdf) +end +sdf = "tmp/docker/Dockerfile.jruby" +df = File.read("Dockerfile.jruby") +File.write(sdf, df) - RakeCompilerDock::ParallelDockerBuild.new(platforms.map{|pl, _| "tmp/docker/Dockerfile.mri.#{pl}" } + ["tmp/docker/Dockerfile.jruby"], workdir: "tmp/docker", task_prefix: "common-", platform: docker_platform) +parallel_docker_build = RakeCompilerDock::ParallelDockerBuild.new(platforms.map{|pl, _| "tmp/docker/Dockerfile.mri.#{pl}" } + ["tmp/docker/Dockerfile.jruby"], workdir: "tmp/docker", task_prefix: "common-") + +namespace :build do + parallel_docker_build.define_rake_tasks platform: docker_platform platforms.each do |platform, target| sdf = "tmp/docker/Dockerfile.mri.#{platform}" @@ -128,6 +129,48 @@ namespace :release do desc "Push all docker images on #{host_pl}" multitask :images => platform end + + desc "Show download sizes of the release images" + task :sizes do + require "yaml" + + ths = platforms.map do |pl, _| + image_name = RakeCompilerDock::Starter.container_image_name(platform: pl) + Thread.new do + [ pl, + IO.popen("docker manifest inspect #{image_name} -v", &:read) + ] + end + end + + hlayers = Hash.new{|h,k| h[k] = {} } + isize_sums = Hash.new{|h,k| h[k] = 0 } + + ths.map(&:value).each do |pl, ystr| + y = YAML.load(ystr) + y = [y] unless y.is_a?(Array) + y.each do |img| + next unless img + host_pl = "#{img.dig("Descriptor", "platform", "architecture")}-#{ + img.dig("Descriptor", "platform", "os")}" + next if host_pl=="unknown-unknown" + lays = img.dig("OCIManifest", "layers") || img.dig("SchemaV2Manifest", "layers") + isize = lays.map do |lay| + hlayers[host_pl][lay["digest"]] = lay["size"] + end.sum + isize_sums[host_pl] += isize + puts format("%-15s %-20s:%12d MB", host_pl, pl, isize/1024/1024) + end + end + puts "----------" + isize_sums.each do |host_pl, isize| + puts format("%-15s %-20s:%12d MB", host_pl, "all-separate", isize/1024/1024) + end + hlayers.each do |host_pl, layers| + asize = layers.values.sum + puts format("%-15s %-20s:%12d MB", host_pl, "all-combined", asize/1024/1024) + end + end end namespace :prepare do diff --git a/build/parallel_docker_build.rb b/build/parallel_docker_build.rb index 4858f35..2922f38 100644 --- a/build/parallel_docker_build.rb +++ b/build/parallel_docker_build.rb @@ -36,7 +36,11 @@ def docker_build(filename, tag: nil, output: false, platform: ) class ParallelDockerBuild include Rake::DSL - def initialize(dockerfiles, workdir: "tmp/docker", inputdir: ".", task_prefix: "common-", platform: "local") + attr_reader :file_deps + attr_reader :tree_deps + attr_reader :final_deps + + def initialize(dockerfiles, workdir: "tmp/docker", inputdir: ".", task_prefix: "common-") FileUtils.mkdir_p(workdir) files = parse_dockerfiles(dockerfiles, inputdir) @@ -45,8 +49,11 @@ def initialize(dockerfiles, workdir: "tmp/docker", inputdir: ".", task_prefix: " vcs = find_commons(files) # pp vcs - define_common_tasks(vcs, workdir, task_prefix) - @platform = platform + @file_deps = {} + @tree_deps = {} + @final_deps = {} + + write_docker_files(vcs, workdir, task_prefix) end # Read given dockerfiles from inputdir and split into a list of commands. @@ -100,27 +107,45 @@ def find_commons(files, vmask=nil, li=0) end.compact.to_h end - # Write intermediate dockerfiles to workdir and define rake tasks - # - # The rake tasks are named after the dockerfiles given to #new . - # This also adds dependant intermediate tasks as prerequisites. - def define_common_tasks(vcs, workdir, task_prefix, plines=[]) + # Write intermediate dockerfiles to workdir and fill properties + def write_docker_files(vcs, workdir, task_prefix, plines=[]) vcs.map do |files, (lines, nvcs)| fn = "#{task_prefix}#{Digest::SHA1.hexdigest(files.join)}" - File.write(File.join(workdir, fn), (plines + lines).join) - task fn do - RakeCompilerDock.docker_build(File.join(workdir, fn), platform: @platform) + wfn = File.join(workdir, fn) + File.write(wfn, (plines + lines).join) + @file_deps[fn] = wfn + + files.each do |file| + @final_deps[file] = fn end - nfn = define_common_tasks(nvcs, workdir, task_prefix, plines + lines) + nfn = write_docker_files(nvcs, workdir, task_prefix, plines + lines) nfn.each do |file| - task file => fn - end - files.each do |file| - task file => fn + @tree_deps[file] = fn end fn end end + + # Define rake tasks for building common docker files + # + # The rake tasks are named after the dockerfiles given to #new . + # This also adds dependant intermediate tasks as prerequisites. + def define_rake_tasks(**build_options) + file_deps.each do |fn, wfn| + # p file_deps: {fn => wfn} + task fn do + RakeCompilerDock.docker_build(wfn, **build_options) + end + end + tree_deps.each do |file, prereq| + # p tree_deps: {file => prereq} + task file => prereq + end + final_deps.each do |file, prereq| + # p final_deps: {file => prereq} + task file => prereq + end + end end end diff --git a/test/test_parallel_docker_build.rb b/test/test_parallel_docker_build.rb index 318fa2d..1bdfb73 100644 --- a/test/test_parallel_docker_build.rb +++ b/test/test_parallel_docker_build.rb @@ -44,7 +44,7 @@ def teardown def test_tasks Dir.chdir(@tmpdir) do - RakeCompilerDock::ParallelDockerBuild.new(%w[ File0 File1 File2 File3 ], task_prefix: "y") + RakeCompilerDock::ParallelDockerBuild.new(%w[ File0 File1 File2 File3 ], task_prefix: "y").define_rake_tasks end assert_operator Rake::Task["File0"].prerequisites, :include?, hd("File0File1") From 66f3e5a0af1b58a5e50272453ab355783cee7492 Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Wed, 29 Oct 2025 16:20:26 +0100 Subject: [PATCH 4/4] Improve readability of job names and for possible use in per-push-CI runs --- .github/workflows/publish-images.yml | 361 ++++++++++------------- .github/workflows/publish-images.yml.erb | 32 +- .github/workflows/release-images.yml | 361 ++++++++++------------- 3 files changed, 327 insertions(+), 427 deletions(-) diff --git a/.github/workflows/publish-images.yml b/.github/workflows/publish-images.yml index 6e66d4a..d6ebad8 100644 --- a/.github/workflows/publish-images.yml +++ b/.github/workflows/publish-images.yml @@ -1,3 +1,5 @@ +# This file is generated. Please edit publish-images.yml.erb instead! + name: Weekly publish docker images to GHCR on: @@ -12,9 +14,9 @@ concurrency: jobs: - common-7f790bc6d2444edacd5337c9048dae13842eb9ff: - name: "build ${{ matrix.os }} common-7f790bc6d2444edacd5337c9048dae13842eb9ff" - needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + aarch64-linux-musl: + name: "build aarch64-linux-musl ${{ matrix.os }}" + needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff strategy: fail-fast: false matrix: @@ -34,25 +36,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-aarch64-linux-musl-${{ github.sha }} restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-aarch64-linux-musl ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff - ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-7f790bc6d2444edacd5337c9048dae13842eb9ff on ${{ runner.arch }} + - name: Build the image layers aarch64-linux-musl on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-7f790bc6d2444edacd5337c9048dae13842eb9ff RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:aarch64-linux-musl RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-d1f437046b79903f679102aadd5269e80f584d09: - name: "build ${{ matrix.os }} common-d1f437046b79903f679102aadd5269e80f584d09" + common-7f790bc6d2444edacd5337c9048dae13842eb9ff: + name: "build common-7f790bc6d2444edacd5337c9048dae13842eb9ff ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -73,26 +73,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-d1f437046b79903f679102aadd5269e80f584d09 on ${{ runner.arch }} + - name: Build the image layers common-7f790bc6d2444edacd5337c9048dae13842eb9ff on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-d1f437046b79903f679102aadd5269e80f584d09 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:common-7f790bc6d2444edacd5337c9048dae13842eb9ff RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-8c26987a5e78ace67587139520ec4d44e00a8f54: - name: "build ${{ matrix.os }} common-8c26987a5e78ace67587139520ec4d44e00a8f54" - needs: common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 + arm-linux-musl: + name: "build arm-linux-musl ${{ matrix.os }}" + needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff strategy: fail-fast: false matrix: @@ -112,26 +110,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-arm-linux-musl-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 - ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 + ${{ runner.os }}-on-${{ runner.arch }}-arm-linux-musl + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff enableCrossOsArchive: true - - name: Build the image layers common-8c26987a5e78ace67587139520ec4d44e00a8f54 on ${{ runner.arch }} + - name: Build the image layers arm-linux-musl on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-8c26987a5e78ace67587139520ec4d44e00a8f54 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:arm-linux-musl RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0: - name: "build ${{ matrix.os }} common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0" - + x86-linux-musl: + name: "build x86-linux-musl ${{ matrix.os }}" + needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff strategy: fail-fast: false matrix: @@ -151,25 +147,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x86-linux-musl-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 - ${{ runner.os }}-on-${{ runner.arch }}- + ${{ runner.os }}-on-${{ runner.arch }}-x86-linux-musl + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff enableCrossOsArchive: true - - name: Build the image layers common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 on ${{ runner.arch }} + - name: Build the image layers x86-linux-musl on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x86-linux-musl RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-723ac6e8df696b68867754088d542e27005deaaf: - name: "build ${{ matrix.os }} common-723ac6e8df696b68867754088d542e27005deaaf" + x86_64-linux-musl: + name: "build x86_64-linux-musl ${{ matrix.os }}" needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff strategy: fail-fast: false @@ -190,26 +184,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-723ac6e8df696b68867754088d542e27005deaaf-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x86_64-linux-musl-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-723ac6e8df696b68867754088d542e27005deaaf + ${{ runner.os }}-on-${{ runner.arch }}-x86_64-linux-musl ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff enableCrossOsArchive: true - - name: Build the image layers common-723ac6e8df696b68867754088d542e27005deaaf on ${{ runner.arch }} + - name: Build the image layers x86_64-linux-musl on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-723ac6e8df696b68867754088d542e27005deaaf RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x86_64-linux-musl RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-fbc527a24691e48b3ceae3946e031e5e7e88c321: - name: "build ${{ matrix.os }} common-fbc527a24691e48b3ceae3946e031e5e7e88c321" - needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff + arm64-darwin: + name: "build arm64-darwin ${{ matrix.os }}" + needs: common-d1f437046b79903f679102aadd5269e80f584d09 strategy: fail-fast: false matrix: @@ -229,26 +221,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-fbc527a24691e48b3ceae3946e031e5e7e88c321-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-arm64-darwin-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-fbc527a24691e48b3ceae3946e031e5e7e88c321 - ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff + ${{ runner.os }}-on-${{ runner.arch }}-arm64-darwin + ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 enableCrossOsArchive: true - - name: Build the image layers common-fbc527a24691e48b3ceae3946e031e5e7e88c321 on ${{ runner.arch }} + - name: Build the image layers arm64-darwin on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-fbc527a24691e48b3ceae3946e031e5e7e88c321 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:arm64-darwin RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-63da25377d0818f37111c2410d4816b73d1a9060: - name: "build ${{ matrix.os }} common-63da25377d0818f37111c2410d4816b73d1a9060" - needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff + common-d1f437046b79903f679102aadd5269e80f584d09: + name: "build common-d1f437046b79903f679102aadd5269e80f584d09 ${{ matrix.os }}" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false matrix: @@ -268,26 +258,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-63da25377d0818f37111c2410d4816b73d1a9060-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-63da25377d0818f37111c2410d4816b73d1a9060 - ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff + ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-63da25377d0818f37111c2410d4816b73d1a9060 on ${{ runner.arch }} + - name: Build the image layers common-d1f437046b79903f679102aadd5269e80f584d09 on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-63da25377d0818f37111c2410d4816b73d1a9060 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:common-d1f437046b79903f679102aadd5269e80f584d09 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-dc7239babc93dee187ce0f0fa030de8c792e8611: - name: "build ${{ matrix.os }} common-dc7239babc93dee187ce0f0fa030de8c792e8611" - needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff + x86_64-darwin: + name: "build x86_64-darwin ${{ matrix.os }}" + needs: common-d1f437046b79903f679102aadd5269e80f584d09 strategy: fail-fast: false matrix: @@ -307,26 +295,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-dc7239babc93dee187ce0f0fa030de8c792e8611-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x86_64-darwin-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-dc7239babc93dee187ce0f0fa030de8c792e8611 - ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff + ${{ runner.os }}-on-${{ runner.arch }}-x86_64-darwin + ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 enableCrossOsArchive: true - - name: Build the image layers common-dc7239babc93dee187ce0f0fa030de8c792e8611 on ${{ runner.arch }} + - name: Build the image layers x86_64-darwin on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-dc7239babc93dee187ce0f0fa030de8c792e8611 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x86_64-darwin RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-2829589da6681b1b5f379e6d68ff6be60cba5cf6: - name: "build ${{ matrix.os }} common-2829589da6681b1b5f379e6d68ff6be60cba5cf6" - needs: common-d1f437046b79903f679102aadd5269e80f584d09 + aarch64-linux-gnu: + name: "build aarch64-linux-gnu ${{ matrix.os }}" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false matrix: @@ -346,26 +332,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-2829589da6681b1b5f379e6d68ff6be60cba5cf6-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-aarch64-linux-gnu-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 - ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 + ${{ runner.os }}-on-${{ runner.arch }}-aarch64-linux-gnu + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 on ${{ runner.arch }} + - name: Build the image layers aarch64-linux-gnu on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:aarch64-linux-gnu RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-bc540754626a1ebf8164f8ae4378b9104b383663: - name: "build ${{ matrix.os }} common-bc540754626a1ebf8164f8ae4378b9104b383663" - needs: common-d1f437046b79903f679102aadd5269e80f584d09 + common-8c26987a5e78ace67587139520ec4d44e00a8f54: + name: "build common-8c26987a5e78ace67587139520ec4d44e00a8f54 ${{ matrix.os }}" + needs: common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 strategy: fail-fast: false matrix: @@ -385,25 +369,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-bc540754626a1ebf8164f8ae4378b9104b383663-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-bc540754626a1ebf8164f8ae4378b9104b383663 - ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 + ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 enableCrossOsArchive: true - - name: Build the image layers common-bc540754626a1ebf8164f8ae4378b9104b383663 on ${{ runner.arch }} + - name: Build the image layers common-8c26987a5e78ace67587139520ec4d44e00a8f54 on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-bc540754626a1ebf8164f8ae4378b9104b383663 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:common-8c26987a5e78ace67587139520ec4d44e00a8f54 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f: - name: "build ${{ matrix.os }} common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f" + aarch64-mingw-ucrt: + name: "build aarch64-mingw-ucrt ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -424,25 +406,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-aarch64-mingw-ucrt-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f + ${{ runner.os }}-on-${{ runner.arch }}-aarch64-mingw-ucrt ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f on ${{ runner.arch }} + - name: Build the image layers aarch64-mingw-ucrt on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:aarch64-mingw-ucrt RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-2378386d2f098439bb4555bfc930aa62eab2dd65: - name: "build ${{ matrix.os }} common-2378386d2f098439bb4555bfc930aa62eab2dd65" + arm-linux-gnu: + name: "build arm-linux-gnu ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -463,25 +443,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-2378386d2f098439bb4555bfc930aa62eab2dd65-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-arm-linux-gnu-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-2378386d2f098439bb4555bfc930aa62eab2dd65 + ${{ runner.os }}-on-${{ runner.arch }}-arm-linux-gnu ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-2378386d2f098439bb4555bfc930aa62eab2dd65 on ${{ runner.arch }} + - name: Build the image layers arm-linux-gnu on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-2378386d2f098439bb4555bfc930aa62eab2dd65 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:arm-linux-gnu RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-8fd4771bba44643d3934e41c218db66645f9e96f: - name: "build ${{ matrix.os }} common-8fd4771bba44643d3934e41c218db66645f9e96f" + x64-mingw-ucrt: + name: "build x64-mingw-ucrt ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -502,25 +480,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-8fd4771bba44643d3934e41c218db66645f9e96f-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x64-mingw-ucrt-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-8fd4771bba44643d3934e41c218db66645f9e96f + ${{ runner.os }}-on-${{ runner.arch }}-x64-mingw-ucrt ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-8fd4771bba44643d3934e41c218db66645f9e96f on ${{ runner.arch }} + - name: Build the image layers x64-mingw-ucrt on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-8fd4771bba44643d3934e41c218db66645f9e96f RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x64-mingw-ucrt RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-fad6604335c2d8c64475e5d69c083d0cce4f63a7: - name: "build ${{ matrix.os }} common-fad6604335c2d8c64475e5d69c083d0cce4f63a7" + x64-mingw32: + name: "build x64-mingw32 ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -541,25 +517,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-fad6604335c2d8c64475e5d69c083d0cce4f63a7-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x64-mingw32-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 + ${{ runner.os }}-on-${{ runner.arch }}-x64-mingw32 ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 on ${{ runner.arch }} + - name: Build the image layers x64-mingw32 on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x64-mingw32 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-c435c444a8baec018c75861cf5b32aeb9345683e: - name: "build ${{ matrix.os }} common-c435c444a8baec018c75861cf5b32aeb9345683e" + x86-linux-gnu: + name: "build x86-linux-gnu ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -580,25 +554,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-c435c444a8baec018c75861cf5b32aeb9345683e-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x86-linux-gnu-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-c435c444a8baec018c75861cf5b32aeb9345683e + ${{ runner.os }}-on-${{ runner.arch }}-x86-linux-gnu ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-c435c444a8baec018c75861cf5b32aeb9345683e on ${{ runner.arch }} + - name: Build the image layers x86-linux-gnu on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-c435c444a8baec018c75861cf5b32aeb9345683e RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x86-linux-gnu RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-cda3746d187096bfcb5179842dc5b8f845ea3da6: - name: "build ${{ matrix.os }} common-cda3746d187096bfcb5179842dc5b8f845ea3da6" + x86-mingw32: + name: "build x86-mingw32 ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -619,25 +591,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-cda3746d187096bfcb5179842dc5b8f845ea3da6-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x86-mingw32-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-cda3746d187096bfcb5179842dc5b8f845ea3da6 + ${{ runner.os }}-on-${{ runner.arch }}-x86-mingw32 ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-cda3746d187096bfcb5179842dc5b8f845ea3da6 on ${{ runner.arch }} + - name: Build the image layers x86-mingw32 on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-cda3746d187096bfcb5179842dc5b8f845ea3da6 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x86-mingw32 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b: - name: "build ${{ matrix.os }} common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b" + x86_64-linux-gnu: + name: "build x86_64-linux-gnu ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -658,26 +628,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x86_64-linux-gnu-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b + ${{ runner.os }}-on-${{ runner.arch }}-x86_64-linux-gnu ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b on ${{ runner.arch }} + - name: Build the image layers x86_64-linux-gnu on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x86_64-linux-gnu RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-7b065f9c97f9d9f355f67f09b97c844d21539e42: - name: "build ${{ matrix.os }} common-7b065f9c97f9d9f355f67f09b97c844d21539e42" - needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0: + name: "build common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 ${{ matrix.os }}" + strategy: fail-fast: false matrix: @@ -697,25 +665,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-7b065f9c97f9d9f355f67f09b97c844d21539e42-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-7b065f9c97f9d9f355f67f09b97c844d21539e42 - ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 + ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 + ${{ runner.os }}-on-${{ runner.arch }}- enableCrossOsArchive: true - - name: Build the image layers common-7b065f9c97f9d9f355f67f09b97c844d21539e42 on ${{ runner.arch }} + - name: Build the image layers common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-7b065f9c97f9d9f355f67f09b97c844d21539e42 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-58bf949eac408202d0b3113ff93f6330354c92a1: - name: "build ${{ matrix.os }} common-58bf949eac408202d0b3113ff93f6330354c92a1" + jruby: + name: "build jruby ${{ matrix.os }}" needs: common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 strategy: fail-fast: false @@ -736,18 +702,16 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-58bf949eac408202d0b3113ff93f6330354c92a1-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-jruby-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-58bf949eac408202d0b3113ff93f6330354c92a1 + ${{ runner.os }}-on-${{ runner.arch }}-jruby ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 enableCrossOsArchive: true - - name: Build the image layers common-58bf949eac408202d0b3113ff93f6330354c92a1 on ${{ runner.arch }} + - name: Build the image layers jruby on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-58bf949eac408202d0b3113ff93f6330354c92a1 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:jruby RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} @@ -756,56 +720,41 @@ jobs: push: name: push - needs: [common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f,common-723ac6e8df696b68867754088d542e27005deaaf,common-2378386d2f098439bb4555bfc930aa62eab2dd65,common-8fd4771bba44643d3934e41c218db66645f9e96f,common-fbc527a24691e48b3ceae3946e031e5e7e88c321,common-2829589da6681b1b5f379e6d68ff6be60cba5cf6,common-fad6604335c2d8c64475e5d69c083d0cce4f63a7,common-c435c444a8baec018c75861cf5b32aeb9345683e,common-cda3746d187096bfcb5179842dc5b8f845ea3da6,common-63da25377d0818f37111c2410d4816b73d1a9060,common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b,common-bc540754626a1ebf8164f8ae4378b9104b383663,common-7b065f9c97f9d9f355f67f09b97c844d21539e42,common-dc7239babc93dee187ce0f0fa030de8c792e8611,common-58bf949eac408202d0b3113ff93f6330354c92a1] + needs: [aarch64-linux-gnu,aarch64-linux-musl,aarch64-mingw-ucrt,arm-linux-gnu,arm-linux-musl,arm64-darwin,x64-mingw-ucrt,x64-mingw32,x86-linux-gnu,x86-linux-musl,x86-mingw32,x86_64-darwin,x86_64-linux-gnu,x86_64-linux-musl,jruby] strategy: fail-fast: false matrix: - include: + platform: - - platform: aarch64-linux-gnu - tree_dep: common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f + - aarch64-linux-gnu - - platform: aarch64-linux-musl - tree_dep: common-723ac6e8df696b68867754088d542e27005deaaf + - aarch64-linux-musl - - platform: aarch64-mingw-ucrt - tree_dep: common-2378386d2f098439bb4555bfc930aa62eab2dd65 + - aarch64-mingw-ucrt - - platform: arm-linux-gnu - tree_dep: common-8fd4771bba44643d3934e41c218db66645f9e96f + - arm-linux-gnu - - platform: arm-linux-musl - tree_dep: common-fbc527a24691e48b3ceae3946e031e5e7e88c321 + - arm-linux-musl - - platform: arm64-darwin - tree_dep: common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 + - arm64-darwin - - platform: x64-mingw-ucrt - tree_dep: common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 + - x64-mingw-ucrt - - platform: x64-mingw32 - tree_dep: common-c435c444a8baec018c75861cf5b32aeb9345683e + - x64-mingw32 - - platform: x86-linux-gnu - tree_dep: common-cda3746d187096bfcb5179842dc5b8f845ea3da6 + - x86-linux-gnu - - platform: x86-linux-musl - tree_dep: common-63da25377d0818f37111c2410d4816b73d1a9060 + - x86-linux-musl - - platform: x86-mingw32 - tree_dep: common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b + - x86-mingw32 - - platform: x86_64-darwin - tree_dep: common-bc540754626a1ebf8164f8ae4378b9104b383663 + - x86_64-darwin - - platform: x86_64-linux-gnu - tree_dep: common-7b065f9c97f9d9f355f67f09b97c844d21539e42 + - x86_64-linux-gnu - - platform: x86_64-linux-musl - tree_dep: common-dc7239babc93dee187ce0f0fa030de8c792e8611 + - x86_64-linux-musl - - platform: jruby - tree_dep: common-58bf949eac408202d0b3113ff93f6330354c92a1 + - jruby runs-on: ubuntu-24.04-arm steps: @@ -815,15 +764,15 @@ jobs: uses: actions/cache/restore@v4 with: path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-${{ matrix.tree_dep }}-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-${{ matrix.tree_dep }} + key: ${{ runner.os }}-on-X64-${{ matrix.platform }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-${{ matrix.platform }} enableCrossOsArchive: true - name: Use ARM64 cache from tree pipeline of ${{ matrix.platform }} uses: actions/cache/restore@v4 with: path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-${{ matrix.tree_dep }}-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-${{ matrix.tree_dep }} + key: ${{ runner.os }}-on-ARM64-${{ matrix.platform }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-${{ matrix.platform }} enableCrossOsArchive: true fail-on-cache-miss: true @@ -839,7 +788,7 @@ jobs: - name: Use cache and push docker image env: RCD_IMAGE_VERSION: snapshot - RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64 --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new + RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64 run: | docker buildx create --driver docker-container --use bundle exec rake release:${{ matrix.platform }} diff --git a/.github/workflows/publish-images.yml.erb b/.github/workflows/publish-images.yml.erb index 7411f3a..940cb53 100644 --- a/.github/workflows/publish-images.yml.erb +++ b/.github/workflows/publish-images.yml.erb @@ -1,3 +1,5 @@ +<%= "# This file is generated. Please edit publish-images.yml.erb instead!" %> + <% if release %> name: Release docker images to GHCR # @@ -23,10 +25,13 @@ concurrency: cancel-in-progress: true jobs: -<% (parallel_docker_build.tree_deps.values + parallel_docker_build.tree_deps.keys).uniq.each do |job| %> +<% parallel_docker_build.tree_deps.to_a.flatten.uniq.each do |tree_dep| + dockerfile = parallel_docker_build.final_deps.invert[tree_dep] + job = dockerfile ? dockerfile[/[-\w]+$/] : tree_dep +%> <%= job %>: - name: "build ${{ matrix.os }} <%= job %>" - <%= need = parallel_docker_build.tree_deps[job]; "needs: #{need}" if need %> + name: "build <%= job %> ${{ matrix.os }}" + <%= need = parallel_docker_build.tree_deps[tree_dep]; "needs: #{need}" if need %> strategy: fail-fast: false matrix: @@ -59,8 +64,6 @@ jobs: # Change docker to a cache-able driver docker buildx create --driver docker-container --use bundle exec rake build:<%= job %> RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} @@ -69,14 +72,13 @@ jobs: push: name: push - needs: [<%= parallel_docker_build.final_deps.values.join(",") %>] + needs: [<%= parallel_docker_build.final_deps.keys.map{|a| a[/[-\w]+$/] }.join(",") %>] strategy: fail-fast: false matrix: - include: -<% parallel_docker_build.final_deps.each do |dockerfile, tree_dep| %> - - platform: <%= dockerfile[/[-\w]+$/] %> - tree_dep: <%= tree_dep %> + platform: +<% parallel_docker_build.final_deps.each do |dockerfile, _| %> + - <%= dockerfile[/[-\w]+$/] %> <% end %> runs-on: ubuntu-24.04-arm steps: @@ -86,15 +88,15 @@ jobs: uses: actions/cache/restore@v4 with: path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-${{ matrix.tree_dep }}-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-${{ matrix.tree_dep }} + key: ${{ runner.os }}-on-X64-${{ matrix.platform }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-${{ matrix.platform }} enableCrossOsArchive: true - name: Use ARM64 cache from tree pipeline of ${{ matrix.platform }} uses: actions/cache/restore@v4 with: path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-${{ matrix.tree_dep }}-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-${{ matrix.tree_dep }} + key: ${{ runner.os }}-on-ARM64-${{ matrix.platform }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-${{ matrix.platform }} enableCrossOsArchive: true fail-on-cache-miss: true @@ -110,7 +112,7 @@ jobs: - name: Use cache and push docker image env: RCD_IMAGE_VERSION: snapshot - RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64 --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new + RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64 run: | docker buildx create --driver docker-container --use bundle exec rake release:${{ matrix.platform }} diff --git a/.github/workflows/release-images.yml b/.github/workflows/release-images.yml index 6b2102d..a3822c1 100644 --- a/.github/workflows/release-images.yml +++ b/.github/workflows/release-images.yml @@ -1,3 +1,5 @@ +# This file is generated. Please edit publish-images.yml.erb instead! + name: Release docker images to GHCR # @@ -18,9 +20,9 @@ concurrency: jobs: - common-7f790bc6d2444edacd5337c9048dae13842eb9ff: - name: "build ${{ matrix.os }} common-7f790bc6d2444edacd5337c9048dae13842eb9ff" - needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + aarch64-linux-musl: + name: "build aarch64-linux-musl ${{ matrix.os }}" + needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff strategy: fail-fast: false matrix: @@ -43,25 +45,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-aarch64-linux-musl-${{ github.sha }} restore-keys: | + ${{ runner.os }}-on-${{ runner.arch }}-aarch64-linux-musl ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff - ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-7f790bc6d2444edacd5337c9048dae13842eb9ff on ${{ runner.arch }} + - name: Build the image layers aarch64-linux-musl on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-7f790bc6d2444edacd5337c9048dae13842eb9ff RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:aarch64-linux-musl RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-d1f437046b79903f679102aadd5269e80f584d09: - name: "build ${{ matrix.os }} common-d1f437046b79903f679102aadd5269e80f584d09" + common-7f790bc6d2444edacd5337c9048dae13842eb9ff: + name: "build common-7f790bc6d2444edacd5337c9048dae13842eb9ff ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -85,26 +85,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-d1f437046b79903f679102aadd5269e80f584d09 on ${{ runner.arch }} + - name: Build the image layers common-7f790bc6d2444edacd5337c9048dae13842eb9ff on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-d1f437046b79903f679102aadd5269e80f584d09 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:common-7f790bc6d2444edacd5337c9048dae13842eb9ff RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-8c26987a5e78ace67587139520ec4d44e00a8f54: - name: "build ${{ matrix.os }} common-8c26987a5e78ace67587139520ec4d44e00a8f54" - needs: common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 + arm-linux-musl: + name: "build arm-linux-musl ${{ matrix.os }}" + needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff strategy: fail-fast: false matrix: @@ -127,26 +125,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-arm-linux-musl-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 - ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 + ${{ runner.os }}-on-${{ runner.arch }}-arm-linux-musl + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff enableCrossOsArchive: true - - name: Build the image layers common-8c26987a5e78ace67587139520ec4d44e00a8f54 on ${{ runner.arch }} + - name: Build the image layers arm-linux-musl on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-8c26987a5e78ace67587139520ec4d44e00a8f54 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:arm-linux-musl RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0: - name: "build ${{ matrix.os }} common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0" - + x86-linux-musl: + name: "build x86-linux-musl ${{ matrix.os }}" + needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff strategy: fail-fast: false matrix: @@ -169,25 +165,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x86-linux-musl-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 - ${{ runner.os }}-on-${{ runner.arch }}- + ${{ runner.os }}-on-${{ runner.arch }}-x86-linux-musl + ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff enableCrossOsArchive: true - - name: Build the image layers common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 on ${{ runner.arch }} + - name: Build the image layers x86-linux-musl on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x86-linux-musl RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-723ac6e8df696b68867754088d542e27005deaaf: - name: "build ${{ matrix.os }} common-723ac6e8df696b68867754088d542e27005deaaf" + x86_64-linux-musl: + name: "build x86_64-linux-musl ${{ matrix.os }}" needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff strategy: fail-fast: false @@ -211,26 +205,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-723ac6e8df696b68867754088d542e27005deaaf-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x86_64-linux-musl-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-723ac6e8df696b68867754088d542e27005deaaf + ${{ runner.os }}-on-${{ runner.arch }}-x86_64-linux-musl ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff enableCrossOsArchive: true - - name: Build the image layers common-723ac6e8df696b68867754088d542e27005deaaf on ${{ runner.arch }} + - name: Build the image layers x86_64-linux-musl on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-723ac6e8df696b68867754088d542e27005deaaf RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x86_64-linux-musl RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-fbc527a24691e48b3ceae3946e031e5e7e88c321: - name: "build ${{ matrix.os }} common-fbc527a24691e48b3ceae3946e031e5e7e88c321" - needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff + arm64-darwin: + name: "build arm64-darwin ${{ matrix.os }}" + needs: common-d1f437046b79903f679102aadd5269e80f584d09 strategy: fail-fast: false matrix: @@ -253,26 +245,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-fbc527a24691e48b3ceae3946e031e5e7e88c321-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-arm64-darwin-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-fbc527a24691e48b3ceae3946e031e5e7e88c321 - ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff + ${{ runner.os }}-on-${{ runner.arch }}-arm64-darwin + ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 enableCrossOsArchive: true - - name: Build the image layers common-fbc527a24691e48b3ceae3946e031e5e7e88c321 on ${{ runner.arch }} + - name: Build the image layers arm64-darwin on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-fbc527a24691e48b3ceae3946e031e5e7e88c321 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:arm64-darwin RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-63da25377d0818f37111c2410d4816b73d1a9060: - name: "build ${{ matrix.os }} common-63da25377d0818f37111c2410d4816b73d1a9060" - needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff + common-d1f437046b79903f679102aadd5269e80f584d09: + name: "build common-d1f437046b79903f679102aadd5269e80f584d09 ${{ matrix.os }}" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false matrix: @@ -295,26 +285,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-63da25377d0818f37111c2410d4816b73d1a9060-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-63da25377d0818f37111c2410d4816b73d1a9060 - ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff + ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-63da25377d0818f37111c2410d4816b73d1a9060 on ${{ runner.arch }} + - name: Build the image layers common-d1f437046b79903f679102aadd5269e80f584d09 on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-63da25377d0818f37111c2410d4816b73d1a9060 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:common-d1f437046b79903f679102aadd5269e80f584d09 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-dc7239babc93dee187ce0f0fa030de8c792e8611: - name: "build ${{ matrix.os }} common-dc7239babc93dee187ce0f0fa030de8c792e8611" - needs: common-7f790bc6d2444edacd5337c9048dae13842eb9ff + x86_64-darwin: + name: "build x86_64-darwin ${{ matrix.os }}" + needs: common-d1f437046b79903f679102aadd5269e80f584d09 strategy: fail-fast: false matrix: @@ -337,26 +325,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-dc7239babc93dee187ce0f0fa030de8c792e8611-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x86_64-darwin-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-dc7239babc93dee187ce0f0fa030de8c792e8611 - ${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff + ${{ runner.os }}-on-${{ runner.arch }}-x86_64-darwin + ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 enableCrossOsArchive: true - - name: Build the image layers common-dc7239babc93dee187ce0f0fa030de8c792e8611 on ${{ runner.arch }} + - name: Build the image layers x86_64-darwin on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-dc7239babc93dee187ce0f0fa030de8c792e8611 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x86_64-darwin RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-2829589da6681b1b5f379e6d68ff6be60cba5cf6: - name: "build ${{ matrix.os }} common-2829589da6681b1b5f379e6d68ff6be60cba5cf6" - needs: common-d1f437046b79903f679102aadd5269e80f584d09 + aarch64-linux-gnu: + name: "build aarch64-linux-gnu ${{ matrix.os }}" + needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false matrix: @@ -379,26 +365,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-2829589da6681b1b5f379e6d68ff6be60cba5cf6-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-aarch64-linux-gnu-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 - ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 + ${{ runner.os }}-on-${{ runner.arch }}-aarch64-linux-gnu + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 on ${{ runner.arch }} + - name: Build the image layers aarch64-linux-gnu on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:aarch64-linux-gnu RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-bc540754626a1ebf8164f8ae4378b9104b383663: - name: "build ${{ matrix.os }} common-bc540754626a1ebf8164f8ae4378b9104b383663" - needs: common-d1f437046b79903f679102aadd5269e80f584d09 + common-8c26987a5e78ace67587139520ec4d44e00a8f54: + name: "build common-8c26987a5e78ace67587139520ec4d44e00a8f54 ${{ matrix.os }}" + needs: common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 strategy: fail-fast: false matrix: @@ -421,25 +405,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-bc540754626a1ebf8164f8ae4378b9104b383663-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-bc540754626a1ebf8164f8ae4378b9104b383663 - ${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 + ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 + ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 enableCrossOsArchive: true - - name: Build the image layers common-bc540754626a1ebf8164f8ae4378b9104b383663 on ${{ runner.arch }} + - name: Build the image layers common-8c26987a5e78ace67587139520ec4d44e00a8f54 on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-bc540754626a1ebf8164f8ae4378b9104b383663 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:common-8c26987a5e78ace67587139520ec4d44e00a8f54 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f: - name: "build ${{ matrix.os }} common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f" + aarch64-mingw-ucrt: + name: "build aarch64-mingw-ucrt ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -463,25 +445,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-aarch64-mingw-ucrt-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f + ${{ runner.os }}-on-${{ runner.arch }}-aarch64-mingw-ucrt ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f on ${{ runner.arch }} + - name: Build the image layers aarch64-mingw-ucrt on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:aarch64-mingw-ucrt RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-2378386d2f098439bb4555bfc930aa62eab2dd65: - name: "build ${{ matrix.os }} common-2378386d2f098439bb4555bfc930aa62eab2dd65" + arm-linux-gnu: + name: "build arm-linux-gnu ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -505,25 +485,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-2378386d2f098439bb4555bfc930aa62eab2dd65-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-arm-linux-gnu-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-2378386d2f098439bb4555bfc930aa62eab2dd65 + ${{ runner.os }}-on-${{ runner.arch }}-arm-linux-gnu ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-2378386d2f098439bb4555bfc930aa62eab2dd65 on ${{ runner.arch }} + - name: Build the image layers arm-linux-gnu on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-2378386d2f098439bb4555bfc930aa62eab2dd65 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:arm-linux-gnu RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-8fd4771bba44643d3934e41c218db66645f9e96f: - name: "build ${{ matrix.os }} common-8fd4771bba44643d3934e41c218db66645f9e96f" + x64-mingw-ucrt: + name: "build x64-mingw-ucrt ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -547,25 +525,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-8fd4771bba44643d3934e41c218db66645f9e96f-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x64-mingw-ucrt-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-8fd4771bba44643d3934e41c218db66645f9e96f + ${{ runner.os }}-on-${{ runner.arch }}-x64-mingw-ucrt ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-8fd4771bba44643d3934e41c218db66645f9e96f on ${{ runner.arch }} + - name: Build the image layers x64-mingw-ucrt on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-8fd4771bba44643d3934e41c218db66645f9e96f RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x64-mingw-ucrt RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-fad6604335c2d8c64475e5d69c083d0cce4f63a7: - name: "build ${{ matrix.os }} common-fad6604335c2d8c64475e5d69c083d0cce4f63a7" + x64-mingw32: + name: "build x64-mingw32 ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -589,25 +565,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-fad6604335c2d8c64475e5d69c083d0cce4f63a7-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x64-mingw32-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 + ${{ runner.os }}-on-${{ runner.arch }}-x64-mingw32 ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 on ${{ runner.arch }} + - name: Build the image layers x64-mingw32 on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x64-mingw32 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-c435c444a8baec018c75861cf5b32aeb9345683e: - name: "build ${{ matrix.os }} common-c435c444a8baec018c75861cf5b32aeb9345683e" + x86-linux-gnu: + name: "build x86-linux-gnu ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -631,25 +605,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-c435c444a8baec018c75861cf5b32aeb9345683e-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x86-linux-gnu-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-c435c444a8baec018c75861cf5b32aeb9345683e + ${{ runner.os }}-on-${{ runner.arch }}-x86-linux-gnu ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-c435c444a8baec018c75861cf5b32aeb9345683e on ${{ runner.arch }} + - name: Build the image layers x86-linux-gnu on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-c435c444a8baec018c75861cf5b32aeb9345683e RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x86-linux-gnu RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-cda3746d187096bfcb5179842dc5b8f845ea3da6: - name: "build ${{ matrix.os }} common-cda3746d187096bfcb5179842dc5b8f845ea3da6" + x86-mingw32: + name: "build x86-mingw32 ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -673,25 +645,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-cda3746d187096bfcb5179842dc5b8f845ea3da6-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x86-mingw32-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-cda3746d187096bfcb5179842dc5b8f845ea3da6 + ${{ runner.os }}-on-${{ runner.arch }}-x86-mingw32 ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-cda3746d187096bfcb5179842dc5b8f845ea3da6 on ${{ runner.arch }} + - name: Build the image layers x86-mingw32 on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-cda3746d187096bfcb5179842dc5b8f845ea3da6 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x86-mingw32 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b: - name: "build ${{ matrix.os }} common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b" + x86_64-linux-gnu: + name: "build x86_64-linux-gnu ${{ matrix.os }}" needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 strategy: fail-fast: false @@ -715,26 +685,24 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-x86_64-linux-gnu-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b + ${{ runner.os }}-on-${{ runner.arch }}-x86_64-linux-gnu ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 enableCrossOsArchive: true - - name: Build the image layers common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b on ${{ runner.arch }} + - name: Build the image layers x86_64-linux-gnu on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:x86_64-linux-gnu RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-7b065f9c97f9d9f355f67f09b97c844d21539e42: - name: "build ${{ matrix.os }} common-7b065f9c97f9d9f355f67f09b97c844d21539e42" - needs: common-8c26987a5e78ace67587139520ec4d44e00a8f54 + common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0: + name: "build common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 ${{ matrix.os }}" + strategy: fail-fast: false matrix: @@ -757,25 +725,23 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-7b065f9c97f9d9f355f67f09b97c844d21539e42-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-7b065f9c97f9d9f355f67f09b97c844d21539e42 - ${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 + ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 + ${{ runner.os }}-on-${{ runner.arch }}- enableCrossOsArchive: true - - name: Build the image layers common-7b065f9c97f9d9f355f67f09b97c844d21539e42 on ${{ runner.arch }} + - name: Build the image layers common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-7b065f9c97f9d9f355f67f09b97c844d21539e42 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} mv tmp/build-cache-new tmp/build-cache-${{ runner.arch }} - common-58bf949eac408202d0b3113ff93f6330354c92a1: - name: "build ${{ matrix.os }} common-58bf949eac408202d0b3113ff93f6330354c92a1" + jruby: + name: "build jruby ${{ matrix.os }}" needs: common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 strategy: fail-fast: false @@ -799,18 +765,16 @@ jobs: uses: actions/cache@v4 with: path: tmp/build-cache-${{ runner.arch }} - key: ${{ runner.os }}-on-${{ runner.arch }}-common-58bf949eac408202d0b3113ff93f6330354c92a1-${{ github.sha }} + key: ${{ runner.os }}-on-${{ runner.arch }}-jruby-${{ github.sha }} restore-keys: | - ${{ runner.os }}-on-${{ runner.arch }}-common-58bf949eac408202d0b3113ff93f6330354c92a1 + ${{ runner.os }}-on-${{ runner.arch }}-jruby ${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 enableCrossOsArchive: true - - name: Build the image layers common-58bf949eac408202d0b3113ff93f6330354c92a1 on ${{ runner.arch }} + - name: Build the image layers jruby on ${{ runner.arch }} run: | # Change docker to a cache-able driver docker buildx create --driver docker-container --use - bundle exec rake build:common-58bf949eac408202d0b3113ff93f6330354c92a1 RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - - name: Show docker images - run: docker images + bundle exec rake build:jruby RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-${{ runner.arch }} --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new" - name: Update and prune docker buildx layer cache run: | rm -rf tmp/build-cache-${{ runner.arch }} @@ -819,56 +783,41 @@ jobs: push: name: push - needs: [common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f,common-723ac6e8df696b68867754088d542e27005deaaf,common-2378386d2f098439bb4555bfc930aa62eab2dd65,common-8fd4771bba44643d3934e41c218db66645f9e96f,common-fbc527a24691e48b3ceae3946e031e5e7e88c321,common-2829589da6681b1b5f379e6d68ff6be60cba5cf6,common-fad6604335c2d8c64475e5d69c083d0cce4f63a7,common-c435c444a8baec018c75861cf5b32aeb9345683e,common-cda3746d187096bfcb5179842dc5b8f845ea3da6,common-63da25377d0818f37111c2410d4816b73d1a9060,common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b,common-bc540754626a1ebf8164f8ae4378b9104b383663,common-7b065f9c97f9d9f355f67f09b97c844d21539e42,common-dc7239babc93dee187ce0f0fa030de8c792e8611,common-58bf949eac408202d0b3113ff93f6330354c92a1] + needs: [aarch64-linux-gnu,aarch64-linux-musl,aarch64-mingw-ucrt,arm-linux-gnu,arm-linux-musl,arm64-darwin,x64-mingw-ucrt,x64-mingw32,x86-linux-gnu,x86-linux-musl,x86-mingw32,x86_64-darwin,x86_64-linux-gnu,x86_64-linux-musl,jruby] strategy: fail-fast: false matrix: - include: + platform: - - platform: aarch64-linux-gnu - tree_dep: common-b45d14aea28f4d30cfaa5bc6a34d751db67da79f + - aarch64-linux-gnu - - platform: aarch64-linux-musl - tree_dep: common-723ac6e8df696b68867754088d542e27005deaaf + - aarch64-linux-musl - - platform: aarch64-mingw-ucrt - tree_dep: common-2378386d2f098439bb4555bfc930aa62eab2dd65 + - aarch64-mingw-ucrt - - platform: arm-linux-gnu - tree_dep: common-8fd4771bba44643d3934e41c218db66645f9e96f + - arm-linux-gnu - - platform: arm-linux-musl - tree_dep: common-fbc527a24691e48b3ceae3946e031e5e7e88c321 + - arm-linux-musl - - platform: arm64-darwin - tree_dep: common-2829589da6681b1b5f379e6d68ff6be60cba5cf6 + - arm64-darwin - - platform: x64-mingw-ucrt - tree_dep: common-fad6604335c2d8c64475e5d69c083d0cce4f63a7 + - x64-mingw-ucrt - - platform: x64-mingw32 - tree_dep: common-c435c444a8baec018c75861cf5b32aeb9345683e + - x64-mingw32 - - platform: x86-linux-gnu - tree_dep: common-cda3746d187096bfcb5179842dc5b8f845ea3da6 + - x86-linux-gnu - - platform: x86-linux-musl - tree_dep: common-63da25377d0818f37111c2410d4816b73d1a9060 + - x86-linux-musl - - platform: x86-mingw32 - tree_dep: common-697f3ca4a0ddea1b26a66aee35ab6fc30ae3010b + - x86-mingw32 - - platform: x86_64-darwin - tree_dep: common-bc540754626a1ebf8164f8ae4378b9104b383663 + - x86_64-darwin - - platform: x86_64-linux-gnu - tree_dep: common-7b065f9c97f9d9f355f67f09b97c844d21539e42 + - x86_64-linux-gnu - - platform: x86_64-linux-musl - tree_dep: common-dc7239babc93dee187ce0f0fa030de8c792e8611 + - x86_64-linux-musl - - platform: jruby - tree_dep: common-58bf949eac408202d0b3113ff93f6330354c92a1 + - jruby runs-on: ubuntu-24.04-arm steps: @@ -878,15 +827,15 @@ jobs: uses: actions/cache/restore@v4 with: path: tmp/build-cache-X64 - key: ${{ runner.os }}-on-X64-${{ matrix.tree_dep }}-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-X64-${{ matrix.tree_dep }} + key: ${{ runner.os }}-on-X64-${{ matrix.platform }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-X64-${{ matrix.platform }} enableCrossOsArchive: true - name: Use ARM64 cache from tree pipeline of ${{ matrix.platform }} uses: actions/cache/restore@v4 with: path: tmp/build-cache-ARM64 - key: ${{ runner.os }}-on-ARM64-${{ matrix.tree_dep }}-${{ github.sha }} - restore-keys: ${{ runner.os }}-on-ARM64-${{ matrix.tree_dep }} + key: ${{ runner.os }}-on-ARM64-${{ matrix.platform }}-${{ github.sha }} + restore-keys: ${{ runner.os }}-on-ARM64-${{ matrix.platform }} enableCrossOsArchive: true fail-on-cache-miss: true @@ -902,7 +851,7 @@ jobs: - name: Use cache and push docker image env: RCD_IMAGE_VERSION: snapshot - RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64 --cache-to=type=local,compression=zstd,dest=tmp/build-cache-new + RCD_DOCKER_BUILD: docker buildx build --cache-from=type=local,compression=zstd,src=tmp/build-cache-X64 --cache-from=type=local,compression=zstd,src=tmp/build-cache-ARM64 run: | docker buildx create --driver docker-container --use bundle exec rake release:${{ matrix.platform }}