Skip to content

Commit

Permalink
feat: add aarch64-linux-musl
Browse files Browse the repository at this point in the history
ci: extract testing matrices for aarch64-linux gnu and musl
  • Loading branch information
flavorjones committed Jan 18, 2024
1 parent 46dbb80 commit 828b465
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
64 changes: 64 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ jobs:
include:
- platform: aarch64-linux-gnu
alias: aarch64-linux
- platform: aarch64-linux-musl
- platform: arm-linux-gnu
alias: arm-linux
- platform: arm-linux-musl
Expand Down Expand Up @@ -380,6 +381,69 @@ jobs:
ruby -rrcd_test -S rake test
"
test_aarch64-linux-gnu:
name: aarch64-linux-gnu
needs: build_native_gem
strategy:
fail-fast: false
matrix:
ruby: ["3.3", "3.2", "3.1", "3.0", "2.7", "2.6", "2.5", "2.4"]
platform: [aarch64-linux, aarch64-linux-gnu]
# include:
# # ruby 3.0 and earlier ship rubygems < 3.2.33, so can't recognize the -gnu suffix
# - ruby: "3.3"
# platform: aarch64-linux-gnu
# - ruby: "3.2"
# platform: aarch64-linux-gnu
# - ruby: "3.1"
# platform: aarch64-linux-gnu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download gem-${{ matrix.platform }}
uses: actions/download-artifact@v3
with:
name: gem-${{ matrix.platform }}
- name: Run tests
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker run --rm -v $PWD:/work -w /work \
--platform=linux/arm64 ruby:${{ matrix.ruby }} \
sh -c "
gem install --local *.gem --verbose &&
cd test/rcd_test/ &&
bundle install &&
ruby -rrcd_test -S rake test
"
test_aarch64-linux-musl:
name: aarch64-linux-musl
needs: build_native_gem
strategy:
fail-fast: false
matrix:
ruby: ["3.3", "3.2", "3.1", "3.0", "2.7", "2.6", "2.5", "2.4"]
# ruby: ["3.3", "3.2", "3.1", "3.0", "2.7"] # ruby:2.6-alpine and earlier ship with rubygems that doesn't recognize the -musl suffix
platform: [aarch64-linux-musl]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Download gem-${{ matrix.platform }}
uses: actions/download-artifact@v3
with:
name: gem-${{ matrix.platform }}
- name: Run tests
run: |
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker run --rm -v $PWD:/work -w /work \
--platform=linux/arm64 ruby:${{ matrix.ruby }}-alpine \
sh -c "
gem install --local *.gem --verbose &&
cd test/rcd_test/ &&
bundle install &&
ruby -rrcd_test -S rake test
"
test_native_gem:
name: test native
needs: build_native_gem
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.bundle/
/.yardoc
/Dockerfile.mri.aarch64-linux-gnu
/Dockerfile.mri.aarch64-linux-musl
/Dockerfile.mri.arm-linux-gnu
/Dockerfile.mri.arm-linux-musl
/Dockerfile.mri.arm64-darwin
Expand Down
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ RakeCompilerDock::GemHelper.install_tasks
platforms = [
# tuple is [platform, target]
["aarch64-linux-gnu", "aarch64-linux-gnu"],
["aarch64-linux-musl", "aarch64-linux-musl"],
["arm-linux-gnu", "arm-linux-gnueabihf"],
["arm-linux-musl", "arm-linux-musleabihf"],
["arm64-darwin", "aarch64-apple-darwin"],
Expand Down
1 change: 1 addition & 0 deletions test/rcd_test/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ else
ext.cross_platform = %w[
aarch64-linux
aarch64-linux-gnu
aarch64-linux-musl
arm-linux
arm-linux-gnu
arm-linux-musl
Expand Down

0 comments on commit 828b465

Please sign in to comment.