Use size-optimized docker build for on-push-CI as well #738
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This file is generated. Please edit publish-images.yml.erb instead! | |
| name: CI | |
| concurrency: | |
| group: "${{github.workflow}}-${{github.ref}}" | |
| cancel-in-progress: true | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "0 5 * * 3" # At 05:00 on Wednesday # https://crontab.guru/#0_5_*_*_3 | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - "*.*.*" | |
| pull_request: | |
| types: [opened, synchronize] | |
| branches: | |
| - "*" | |
| jobs: | |
| aarch64-linux-musl: | |
| name: "build aarch64-linux-musl, ${{ matrix.os }}" | |
| 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: | |
| ruby-version: "3.4" | |
| bundler-cache: true | |
| - name: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers aarch64-linux-musl on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-aarch64-linux-musl --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-aarch64-linux-musl" | |
| common-7f790bc6d2444edacd5337c9048dae13842eb9ff: | |
| name: "build common-7f790bc6d2444edacd5337c9048dae13842eb9ff, ${{ matrix.os }}" | |
| 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: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers common-7f790bc6d2444edacd5337c9048dae13842eb9ff on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff" | |
| arm-linux-musl: | |
| name: "build arm-linux-musl, ${{ matrix.os }}" | |
| 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: | |
| ruby-version: "3.4" | |
| bundler-cache: true | |
| - name: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers arm-linux-musl on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-arm-linux-musl --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-arm-linux-musl" | |
| x86-linux-musl: | |
| name: "build x86-linux-musl, ${{ matrix.os }}" | |
| 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: | |
| ruby-version: "3.4" | |
| bundler-cache: true | |
| - name: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers x86-linux-musl on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x86-linux-musl --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x86-linux-musl" | |
| x86_64-linux-musl: | |
| name: "build x86_64-linux-musl, ${{ matrix.os }}" | |
| 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: | |
| ruby-version: "3.4" | |
| bundler-cache: true | |
| - name: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers x86_64-linux-musl on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x86_64-linux-musl --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-7f790bc6d2444edacd5337c9048dae13842eb9ff --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x86_64-linux-musl" | |
| arm64-darwin: | |
| name: "build arm64-darwin, ${{ matrix.os }}" | |
| 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: | |
| ruby-version: "3.4" | |
| bundler-cache: true | |
| - name: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers arm64-darwin on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-arm64-darwin --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-arm64-darwin" | |
| common-d1f437046b79903f679102aadd5269e80f584d09: | |
| name: "build common-d1f437046b79903f679102aadd5269e80f584d09, ${{ matrix.os }}" | |
| 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: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers common-d1f437046b79903f679102aadd5269e80f584d09 on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09" | |
| x86_64-darwin: | |
| name: "build x86_64-darwin, ${{ matrix.os }}" | |
| 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: | |
| ruby-version: "3.4" | |
| bundler-cache: true | |
| - name: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers x86_64-darwin on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x86_64-darwin --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-d1f437046b79903f679102aadd5269e80f584d09 --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x86_64-darwin" | |
| aarch64-linux-gnu: | |
| name: "build aarch64-linux-gnu, ${{ matrix.os }}" | |
| 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: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers aarch64-linux-gnu on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-aarch64-linux-gnu --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-aarch64-linux-gnu" | |
| common-8c26987a5e78ace67587139520ec4d44e00a8f54: | |
| name: "build common-8c26987a5e78ace67587139520ec4d44e00a8f54, ${{ matrix.os }}" | |
| 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: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers common-8c26987a5e78ace67587139520ec4d44e00a8f54 on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54" | |
| aarch64-mingw-ucrt: | |
| name: "build aarch64-mingw-ucrt, ${{ matrix.os }}" | |
| 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: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers aarch64-mingw-ucrt on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-aarch64-mingw-ucrt --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-aarch64-mingw-ucrt" | |
| arm-linux-gnu: | |
| name: "build arm-linux-gnu, ${{ matrix.os }}" | |
| 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: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers arm-linux-gnu on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-arm-linux-gnu --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-arm-linux-gnu" | |
| x64-mingw-ucrt: | |
| name: "build x64-mingw-ucrt, ${{ matrix.os }}" | |
| 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: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers x64-mingw-ucrt on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x64-mingw-ucrt --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x64-mingw-ucrt" | |
| x64-mingw32: | |
| name: "build x64-mingw32, ${{ matrix.os }}" | |
| 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: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers x64-mingw32 on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x64-mingw32 --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x64-mingw32" | |
| x86-linux-gnu: | |
| name: "build x86-linux-gnu, ${{ matrix.os }}" | |
| 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: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers x86-linux-gnu on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x86-linux-gnu --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x86-linux-gnu" | |
| x86-mingw32: | |
| name: "build x86-mingw32, ${{ matrix.os }}" | |
| 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: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers x86-mingw32 on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x86-mingw32 --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x86-mingw32" | |
| x86_64-linux-gnu: | |
| name: "build x86_64-linux-gnu, ${{ matrix.os }}" | |
| 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: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers x86_64-linux-gnu on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x86_64-linux-gnu --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8c26987a5e78ace67587139520ec4d44e00a8f54 --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-x86_64-linux-gnu" | |
| common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0: | |
| name: "build common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0, ${{ matrix.os }}" | |
| 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: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}- --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0" | |
| jruby: | |
| name: "build jruby, ${{ matrix.os }}" | |
| 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: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image layers jruby on ${{ runner.arch }} | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| 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=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-jruby --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-common-8a6d86116e9a9ffad5888a4a8b7fbee50535dbe0 --cache-to=type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-jruby" | |
| build_source_gem: | |
| name: build source | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.3" | |
| working-directory: test/rcd_test | |
| bundler-cache: true | |
| - name: Build source gem | |
| run: | | |
| cd test/rcd_test/ | |
| bundle exec rake gem | |
| - name: Upload source gem | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gem-ruby | |
| path: test/rcd_test/pkg/rcd_test-?.?.?.gem # e.g. rcd_test-1.0.0.gem | |
| build_native_gem: | |
| name: build native | |
| 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: | |
| 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 | |
| os: | |
| # - ubuntu-latest | |
| - ubuntu-24.04-arm | |
| include: | |
| - platform: aarch64-linux-gnu | |
| alias: aarch64-linux | |
| - platform: aarch64-linux-musl | |
| - platform: aarch64-mingw-ucrt | |
| - platform: arm-linux-gnu | |
| alias: arm-linux | |
| - platform: arm-linux-musl | |
| - platform: arm64-darwin | |
| - platform: jruby | |
| - platform: x64-mingw-ucrt | |
| static: true | |
| - platform: x64-mingw32 | |
| static: true | |
| - platform: x86-linux-gnu | |
| alias: x86-linux | |
| - platform: x86-linux-musl | |
| - platform: x86-mingw32 | |
| - platform: x86_64-darwin | |
| - platform: x86_64-linux-gnu | |
| alias: x86_64-linux | |
| - platform: x86_64-linux-musl | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: "3.3" | |
| bundler-cache: true | |
| - name: Expose GitHub Runtime for docker cache | |
| uses: crazy-max/ghaction-github-runtime@v3 | |
| - name: Build the image from already filled cache | |
| env: | |
| RCD_TASK_DEPENDENCIES: "false" | |
| run: | | |
| docker buildx create --driver docker-container --use | |
| bundle exec rake build:${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from type=gha,scope=${{ runner.os }}-on-${{ runner.arch }}-${{ matrix.platform }}" | |
| - name: Show docker images | |
| run: docker images | |
| - name: Test the generated image | |
| run: bundle exec rake test TEST_PLATFORM=${{ matrix.platform }} | |
| - name: Build native gem | |
| run: | | |
| cd test/rcd_test/ | |
| bundle install | |
| bundle exec rake clean clobber | |
| bundle exec rake gem:${{ matrix.platform }} | |
| - name: Upload native gem | |
| if: runner.arch == 'ARM64' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gem-${{ matrix.platform }} | |
| path: test/rcd_test/pkg/*-*-*.gem | |
| - if: matrix.static | |
| name: Build static native gem | |
| env: | |
| RCD_TEST_CONFIG: "--link-static" | |
| run: | | |
| cd test/rcd_test/ | |
| bundle install | |
| bundle exec rake clean clobber | |
| bundle exec rake gem:${{ matrix.platform }} | |
| - if: matrix.static && runner.arch == 'ARM64' | |
| name: Upload static native gem | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gem-${{ matrix.platform }}-static | |
| path: test/rcd_test/pkg/*-*-*.gem | |
| - if: matrix.alias | |
| name: Build native gem ${{ matrix.alias }} | |
| run: | | |
| cd test/rcd_test/ | |
| bundle install | |
| bundle exec rake clean clobber | |
| bundle exec rake gem:${{ matrix.alias }} | |
| - if: matrix.alias && runner.arch == 'ARM64' | |
| name: Upload native gem ${{ matrix.alias }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: gem-${{ matrix.alias }} | |
| path: test/rcd_test/pkg/*-*-*.gem | |
| test_source_gem: | |
| name: source gem | |
| needs: build_source_gem | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest] | |
| ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: Download source gem | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: gem-ruby | |
| - name: Test source gem | |
| run: | | |
| gem install --local *.gem --verbose | |
| cd test/rcd_test/ | |
| bundle install | |
| ruby -rrcd_test -S rake test | |
| test-x86_64-linux-setup-ruby: | |
| name: "${{ matrix.platform }} setup-ruby(${{ matrix.ruby }})" | |
| needs: build_native_gem | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [x86_64-linux, x86_64-linux-gnu] | |
| ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"] | |
| include: | |
| # declare rubygems for each ruby version | |
| - { ruby: "3.0", rubygems: "3.5.23" } | |
| - { ruby: "2.7", rubygems: "3.4.22" } | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: Download gem-${{ matrix.platform }} | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: gem-${{ matrix.platform }} | |
| - if: matrix.rubygems | |
| run: gem update --system ${{ matrix.rubygems }} | |
| - name: Test gem-${{ matrix.platform }} | |
| run: | | |
| gem install --local *.gem --verbose | |
| cd test/rcd_test/ | |
| bundle install | |
| ruby -rrcd_test -S rake test | |
| test_architecture_matrix: | |
| name: "${{ matrix.platform }} ${{ matrix.ruby }}" | |
| needs: build_native_gem | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - aarch64-linux | |
| - aarch64-linux-gnu | |
| - aarch64-linux-musl | |
| - arm-linux | |
| - arm-linux-gnu | |
| - arm-linux-musl | |
| - x86-linux | |
| - x86-linux-gnu | |
| - x86-linux-musl | |
| - x86_64-linux | |
| - x86_64-linux-gnu | |
| - x86_64-linux-musl | |
| ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"] | |
| include: | |
| # declare rubygems for each ruby version | |
| - { ruby: "3.0", rubygems: "3.5.23" } | |
| - { ruby: "2.7", rubygems: "3.4.22" } | |
| # declare docker image for each platform | |
| - { platform: aarch64-linux-musl, runon: "ubuntu-24.04-arm", docker_tag: "-alpine" } | |
| - { platform: arm-linux-musl, runon: "ubuntu-24.04-arm", docker_tag: "-alpine" } | |
| - { platform: x86-linux-musl, runon: "ubuntu-latest", docker_tag: "-alpine" } | |
| - { platform: x86_64-linux-musl, runon: "ubuntu-latest", docker_tag: "-alpine" } | |
| - { platform: x86_64-linux, runon: "ubuntu-latest" } | |
| - { platform: x86_64-linux-gnu, runon: "ubuntu-latest" } | |
| # declare docker platform for each platform | |
| - { platform: aarch64-linux, runon: "ubuntu-24.04-arm", docker_platform: "--platform=linux/arm64" } | |
| - { platform: aarch64-linux-gnu, runon: "ubuntu-24.04-arm", docker_platform: "--platform=linux/arm64" } | |
| - { platform: aarch64-linux-musl, runon: "ubuntu-24.04-arm", docker_platform: "--platform=linux/arm64" } | |
| - { platform: arm-linux, runon: "ubuntu-24.04-arm", docker_platform: "--platform=linux/arm/v7" } | |
| - { platform: arm-linux-gnu, runon: "ubuntu-24.04-arm", docker_platform: "--platform=linux/arm/v7" } | |
| - { platform: arm-linux-musl, runon: "ubuntu-24.04-arm", docker_platform: "--platform=linux/arm/v7" } | |
| - { platform: x86-linux, runon: "ubuntu-latest", docker_platform: "--platform=linux/386" } | |
| - { platform: x86-linux-gnu, runon: "ubuntu-latest", docker_platform: "--platform=linux/386" } | |
| - { platform: x86-linux-musl, runon: "ubuntu-latest", docker_platform: "--platform=linux/386" } | |
| runs-on: ${{ matrix.runon }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download gem-${{ matrix.platform }} | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: gem-${{ matrix.platform }} | |
| - name: Run tests | |
| run: | | |
| docker run --rm -v $PWD:/work -w /work \ | |
| ${{ matrix.docker_platform}} ruby:${{ matrix.ruby }}${{ matrix.docker_tag }} \ | |
| sh -c " | |
| if test -n '${{ matrix.rubygems }}' ; then gem update --system ${{ matrix.rubygems }} ; fi && | |
| gem install --local *.gem --verbose && | |
| cd test/rcd_test/ && | |
| bundle install && | |
| ruby -rrcd_test -S rake test | |
| " | |
| test_the_rest: | |
| name: "${{ matrix.platform }} ${{ matrix.ruby }}" | |
| needs: build_native_gem | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-13, macos-14] | |
| ruby: ["3.4", "3.3", "3.2", "3.1", "3.0", "2.7"] | |
| include: | |
| - os: macos-13 | |
| platform: x86_64-darwin | |
| - os: macos-14 | |
| platform: arm64-darwin | |
| - os: ubuntu-latest | |
| ruby: jruby | |
| platform: jruby | |
| - os: windows-latest | |
| ruby: "2.7" | |
| platform: x64-mingw32 | |
| - os: windows-latest | |
| ruby: "3.0" | |
| platform: x64-mingw32 | |
| - os: windows-latest | |
| ruby: "3.1" | |
| platform: x64-mingw-ucrt | |
| - os: windows-latest | |
| ruby: "3.2" | |
| platform: x64-mingw-ucrt | |
| - os: windows-latest | |
| ruby: "3.3" | |
| platform: x64-mingw-ucrt | |
| - os: windows-latest | |
| ruby: "3.4" | |
| platform: x64-mingw-ucrt | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: Print ruby version and gem env | |
| run: | | |
| ruby --version | |
| gem env | |
| - name: Download gem-${{ matrix.platform }} | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: gem-${{ matrix.platform }} | |
| - name: Test gem-${{ matrix.platform }} | |
| run: | | |
| gem install --local *.gem --verbose | |
| cd test/rcd_test/ | |
| bundle install | |
| ruby -rrcd_test -S rake test | |
| test_windows_static: | |
| name: "static ${{ matrix.platform }} ${{ matrix.ruby }}" | |
| needs: build_native_gem | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: windows-latest | |
| ruby: "2.7" | |
| platform: x64-mingw32 | |
| - os: windows-latest | |
| ruby: "3.0" | |
| platform: x64-mingw32 | |
| - os: windows-latest | |
| ruby: "3.1" | |
| platform: x64-mingw-ucrt | |
| - os: windows-latest | |
| ruby: "3.2" | |
| platform: x64-mingw-ucrt | |
| - os: windows-latest | |
| ruby: "3.3" | |
| platform: x64-mingw-ucrt | |
| - os: windows-latest | |
| ruby: "3.4" | |
| platform: x64-mingw-ucrt | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| - name: Print ruby version and gem env | |
| run: | | |
| ruby --version | |
| gem env | |
| - name: Download gem-${{ matrix.platform }}-static | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: gem-${{ matrix.platform }}-static | |
| - name: Test gem-${{ matrix.platform }}-static | |
| run: | | |
| gem install --local *.gem --verbose | |
| cd test/rcd_test/ | |
| bundle install | |
| ruby -rrcd_test -S rake test | |
| test_ad_hoc: | |
| name: "${{ matrix.platform }} on ${{ matrix.from_image }}" | |
| needs: build_native_gem | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - runon: ubuntu-24.04-arm | |
| from_image: navikey/raspbian-bullseye | |
| image_platform: linux/arm/v7 | |
| platform: arm-linux # bullseye ships ruby 2.7, rubygems won't recognize -gnu suffix | |
| dockerfile: debian | |
| - runon: ubuntu-24.04-arm | |
| from_image: arm64v8/ubuntu | |
| image_platform: linux/aarch64 | |
| platform: aarch64-linux # arm64v8 ships ruby 3.0, rubygems won't recognize -gnu suffix | |
| dockerfile: debian | |
| - runon: ubuntu-latest | |
| from_image: i386/alpine | |
| image_platform: linux/386 | |
| platform: x86-linux-musl | |
| dockerfile: alpine | |
| - runon: ubuntu-24.04-arm | |
| from_image: arm32v6/alpine | |
| image_platform: linux/arm/v6 | |
| platform: arm-linux-musl | |
| dockerfile: alpine | |
| - runon: ubuntu-latest | |
| from_image: alpine | |
| image_platform: linux/amd64 | |
| platform: x86_64-linux-musl | |
| dockerfile: alpine | |
| runs-on: ${{ matrix.runon }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Download gem-${{ matrix.platform }} | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: gem-${{ matrix.platform }} | |
| - name: Build ${{ matrix.from_image }} image | |
| run: | | |
| docker build --rm --build-arg from_image=${{ matrix.from_image }} --platform=${{ matrix.image_platform }} -t ruby-test -f test/env/Dockerfile.${{ matrix.dockerfile }} . | |
| - name: Run tests | |
| run: docker run --rm -t --network=host -v `pwd`:/build ruby-test |