build(deps): update rake-compiler-dock requirement from 1.7.0 to 1.8.0 in /precompiled #287
Workflow file for this run
This file contains 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
name: precompiled | |
concurrency: | |
group: "${{github.workflow}}-${{github.ref}}" | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 8 * * 3" # At 08:00 on Wednesday # https://crontab.guru/#0_8_*_*_3 | |
push: | |
branches: | |
- main | |
- v*.*.x | |
tags: | |
- v*.*.* | |
pull_request: | |
types: [opened, synchronize] | |
branches: | |
- '*' | |
paths: ["precompiled/**/*", ".github/workflows/precompiled.yml"] | |
jobs: | |
ruby_versions: | |
outputs: | |
setup_ruby: "['3.1', '3.2', '3.3', '3.4']" | |
image_tag: "['3.1', '3.2', '3.3', '3.4']" | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "generating rubies ..." | |
rcd_image_version: | |
runs-on: ubuntu-latest | |
outputs: | |
rcd_image_version: ${{steps.rcd_image_version.outputs.rcd_image_version}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
working-directory: precompiled | |
ruby-version: "3.3" | |
bundler-cache: true | |
bundler: latest | |
- id: rcd_image_version | |
run: bundle exec ruby -e 'require "rake_compiler_dock"; puts "rcd_image_version=#{RakeCompilerDock::IMAGE_VERSION}"' >> $GITHUB_OUTPUT | |
working-directory: precompiled | |
test: | |
needs: ["ruby_versions"] | |
strategy: | |
fail-fast: false | |
matrix: | |
runs-on: ["ubuntu-latest", "macos-13", "windows-latest"] | |
ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby) }} | |
runs-on: ${{matrix.runs-on}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
working-directory: precompiled | |
ruby-version: ${{matrix.ruby}} | |
bundler-cache: true | |
- uses: actions/cache@v4 | |
with: | |
path: precompiled/ports | |
key: precompiled-ports-${{matrix.runs-on}}-${{hashFiles('precompiled/ext/precompiled/extconf.rb')}} | |
- run: bundle exec rake compile test | |
working-directory: precompiled | |
generic-package: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: precompiled/ports/archives | |
key: archives-ubuntu-${{hashFiles('precompiled/ext/precompiled/extconf.rb')}} | |
- uses: ruby/setup-ruby@v1 | |
with: | |
working-directory: precompiled | |
ruby-version: "3.3" | |
bundler-cache: true | |
- run: ./bin/test-gem-build gems ruby | |
working-directory: precompiled | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: cruby-gem | |
path: precompiled/gems | |
retention-days: 1 | |
generic-install: | |
needs: ["generic-package", "ruby_versions"] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "macos-13", "windows-latest"] | |
ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby) }} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
working-directory: precompiled | |
ruby-version: "${{ matrix.ruby }}" | |
- uses: actions/download-artifact@v4 | |
with: | |
name: cruby-gem | |
path: precompiled/gems | |
- run: ./bin/test-gem-install gems | |
working-directory: precompiled | |
shell: bash | |
native-package: | |
needs: ["rcd_image_version"] | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- "aarch64-linux-gnu" | |
- "aarch64-linux-musl" | |
- "arm-linux-gnu" | |
- "arm-linux-musl" | |
- "x86-linux-gnu" | |
- "x86-linux-musl" | |
- "x86_64-linux-gnu" | |
- "x86_64-linux-musl" | |
- "arm64-darwin" | |
- "x86_64-darwin" | |
- "x64-mingw-ucrt" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v4 | |
with: | |
path: precompiled/ports/archives | |
key: archives-ubuntu-${{hashFiles('precompiled/ext/precompiled/extconf.rb')}} | |
- run: | | |
docker run --rm -v $PWD/precompiled:/precompiled -w /precompiled \ | |
ghcr.io/rake-compiler/rake-compiler-dock-image:${{ needs.rcd_image_version.outputs.rcd_image_version }}-mri-${{ matrix.platform }} \ | |
./bin/test-gem-build gems ${{ matrix.platform }} | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: "cruby-${{ matrix.platform }}-gem" | |
path: precompiled/gems | |
retention-days: 1 | |
linux-install: | |
needs: ["native-package", "ruby_versions"] | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- "aarch64-linux-gnu" | |
- "aarch64-linux-musl" | |
- "arm-linux-gnu" | |
- "arm-linux-musl" | |
- "x86-linux-gnu" | |
- "x86-linux-musl" | |
- "x86_64-linux-gnu" | |
- "x86_64-linux-musl" | |
ruby: ${{ fromJSON(needs.ruby_versions.outputs.image_tag) }} | |
include: | |
# declare docker image for each platform | |
- { platform: aarch64-linux-musl, docker_tag: "-alpine", bootstrap: "apk add bash &&" } | |
- { platform: arm-linux-musl, docker_tag: "-alpine", bootstrap: "apk add bash &&" } | |
- { platform: x86-linux-musl, docker_tag: "-alpine", bootstrap: "apk add bash &&" } | |
- { platform: x86_64-linux-musl, docker_tag: "-alpine", bootstrap: "apk add bash &&" } | |
# declare docker platform for each platform | |
- { platform: aarch64-linux-gnu, docker_platform: "--platform=linux/arm64" } | |
- { platform: aarch64-linux-musl, docker_platform: "--platform=linux/arm64" } | |
- { platform: arm-linux-gnu, docker_platform: "--platform=linux/arm/v7" } | |
- { platform: arm-linux-musl, docker_platform: "--platform=linux/arm/v7" } | |
- { platform: x86-linux-gnu, docker_platform: "--platform=linux/386" } | |
- { platform: x86-linux-musl, docker_platform: "--platform=linux/386" } | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: cruby-${{ matrix.platform }}-gem | |
path: precompiled/gems | |
- run: | | |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
docker run --rm -v $PWD/precompiled:/precompiled -w /precompiled \ | |
${{ matrix.docker_platform }} ruby:${{ matrix.ruby }}${{ matrix.docker_tag }} \ | |
sh -c " | |
gem update --system && | |
${{ matrix.bootstrap }} | |
./bin/test-gem-install gems | |
" | |
darwin-install: | |
needs: ["native-package", "ruby_versions"] | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- arm64-darwin | |
- x86_64-darwin | |
ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby) }} | |
include: | |
- { platform: arm64-darwin, os: macos-14 } | |
- { platform: x86_64-darwin, os: macos-13 } | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "${{matrix.ruby}}" | |
- uses: actions/download-artifact@v4 | |
with: | |
name: cruby-${{matrix.platform}}-gem | |
path: precompiled/gems | |
- run: ./bin/test-gem-install gems | |
working-directory: precompiled | |
windows-install: | |
needs: ["native-package", "ruby_versions"] | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: ${{ fromJSON(needs.ruby_versions.outputs.setup_ruby) }} | |
runs-on: windows-2022 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "${{matrix.ruby}}" | |
- uses: actions/download-artifact@v4 | |
with: | |
name: cruby-x64-mingw-ucrt-gem | |
path: precompiled/gems | |
- run: ./bin/test-gem-install gems | |
working-directory: precompiled |