Skip to content

Commit

Permalink
add linux-musl native gems
Browse files Browse the repository at this point in the history
  • Loading branch information
flavorjones committed Jan 27, 2024
1 parent 3ddf292 commit 30e90e5
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 22 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/precompiled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,17 @@ jobs:
matrix:
platform:
- "aarch64-linux"
- "aarch64-linux-musl"
- "arm-linux"
- "arm-linux-musl"
- "arm64-darwin" # github actions does not support this runtime, but let's build anyway
- "x64-mingw-ucrt"
- "x64-mingw32"
- "x86-linux"
- "x86-linux-musl"
- "x86_64-darwin"
- "x86_64-linux"
- "x86_64-linux-musl"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -137,15 +141,27 @@ jobs:
matrix:
platform:
- "aarch64-linux"
- "aarch64-linux-musl"
- "arm-linux"
- "arm-linux-musl"
- "x86-linux"
- "x86-linux-musl"
- "x86_64-linux"
- "x86_64-linux-musl"
ruby: ["3.0", "3.1", "3.2", "3.3"]
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, docker_platform: "--platform=linux/arm64/v8" }
- { platform: aarch64-linux, docker_platform: "--platform=linux/arm64" }
- { platform: aarch64-linux-musl, docker_platform: "--platform=linux/arm64" }
- { platform: arm-linux, docker_platform: "--platform=linux/arm/v7" }
- { platform: arm-linux-musl, docker_platform: "--platform=linux/arm/v7" }
- { platform: x86-linux, docker_platform: "--platform=linux/386" }
- { platform: x86-linux-musl, docker_platform: "--platform=linux/386" }
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -156,27 +172,11 @@ jobs:
- 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 }} \
./bin/test-gem-install gems
cruby-x86_64-musl-install:
needs: ["cruby-native-package"]
strategy:
fail-fast: false
matrix:
ruby: ["3.0", "3.1", "3.2", "3.3"]
runs-on: ubuntu-latest
container:
image: "ruby:${{matrix.ruby}}-alpine"
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: cruby-x86_64-linux-gem
path: precompiled/gems
- run: apk add bash
- run: ./bin/test-gem-install gems
working-directory: precompiled
${{ matrix.docker_platform }} ruby:${{ matrix.ruby }}${{ matrix.docker_tag }} \
sh -c "
${{ matrix.bootstrap }}
./bin/test-gem-install gems
"
cruby-x86_64-darwin-install:
needs: ["cruby-native-package"]
Expand Down
4 changes: 4 additions & 0 deletions precompiled/Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,17 @@ require "rake_compiler_dock"
cross_rubies = ["3.3.0", "3.2.0", "3.1.0", "3.0.0"]
cross_platforms = [
"aarch64-linux",
"aarch64-linux-musl",
"arm-linux",
"arm-linux-musl",
"arm64-darwin",
"x64-mingw-ucrt",
"x64-mingw32",
"x86-linux",
"x86-linux-musl",
"x86_64-darwin",
"x86_64-linux",
"x86_64-linux-musl",
]
ENV["RUBY_CC_VERSION"] = cross_rubies.join(":")

Expand Down

0 comments on commit 30e90e5

Please # to comment.