From 11d75a3e90f3ed63254be11ec6a73dd1332bd892 Mon Sep 17 00:00:00 2001 From: Mike Dalessio Date: Thu, 1 Sep 2022 09:40:51 -0400 Subject: [PATCH] fix: ship an x86_64-linux-musl platform gem This was not strictly necessary before now because musl platforms have always used the generic platform gem, but recent changes in rubygems and bundler introduced new behaviors around libc flavors, and so we're going the extra mile here to be explicit. See #192 for context, also see https://github.com/rubygems/rubygems/pull/5875 --- .github/workflows/gem-install.yml | 15 ++++++++++++++- README.md | 1 + lib/tailwindcss/upstream.rb | 1 + rakelib/package.rake | 18 ++++++++++-------- 4 files changed, 26 insertions(+), 9 deletions(-) diff --git a/.github/workflows/gem-install.yml b/.github/workflows/gem-install.yml index 5991669e..c34aee94 100644 --- a/.github/workflows/gem-install.yml +++ b/.github/workflows/gem-install.yml @@ -5,7 +5,7 @@ jobs: strategy: fail-fast: false matrix: - platform: ["ruby", "x64-mingw32", "x64-mingw-ucrt", "x86_64-darwin", "x86_64-linux"] + platform: ["ruby", "x64-mingw32", "x64-mingw-ucrt", "x86_64-darwin", "x86_64-linux", "x86_64-linux-musl"] runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -49,6 +49,19 @@ jobs: - run: "gem install pkg/tailwindcss-rails-*.gem" - run: "tailwindcss --help" + linux-musl-install: + needs: ["package"] + runs-on: ubuntu-latest + container: + image: ruby:3.1-alpine + steps: + - uses: actions/download-artifact@v2 + with: + name: gem-x86_64-linux-musl + path: pkg + - run: "gem install pkg/tailwindcss-rails-*.gem" + - run: "tailwindcss --help" + darwin-install: needs: ["package"] runs-on: macos-latest diff --git a/README.md b/README.md index a580de04..ec16049a 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,7 @@ Some users are reporting this error even when running on one of the supported na - x64-mingw-ucrt - x86_64-darwin - x86_64-linux +- x86_64-linux-musl - aarch64-linux #### Check Bundler PLATFORMS diff --git a/lib/tailwindcss/upstream.rb b/lib/tailwindcss/upstream.rb index 89e58649..d231e5c6 100644 --- a/lib/tailwindcss/upstream.rb +++ b/lib/tailwindcss/upstream.rb @@ -10,6 +10,7 @@ module Upstream "x64-mingw-ucrt" => "tailwindcss-windows-x64.exe", "x86_64-darwin" => "tailwindcss-macos-x64", "x86_64-linux" => "tailwindcss-linux-x64", + "x86_64-linux-musl" => "tailwindcss-linux-x64", "aarch64-linux" => "tailwindcss-linux-arm64", } end diff --git a/rakelib/package.rake b/rakelib/package.rake index 53416ac5..5b2e3568 100644 --- a/rakelib/package.rake +++ b/rakelib/package.rake @@ -39,6 +39,7 @@ # - pkg/tailwindcss-rails-1.0.0-x64-mingw-ucrt.gem # - pkg/tailwindcss-rails-1.0.0-x86_64-darwin.gem # - pkg/tailwindcss-rails-1.0.0-x86_64-linux.gem +# - pkg/tailwindcss-rails-1.0.0-x86_64-linux-musl.gem # # Note that in addition to the native gems, a vanilla "ruby" gem will also be created without # either the `exe/tailwindcss` script or a binary executable present. @@ -46,14 +47,15 @@ # # New rake tasks created: # -# - rake gem:ruby # Build the ruby gem -# - rake gem:aarch64-linux # Build the aarch64-linux gem -# - rake gem:arm64-darwin # Build the arm64-darwin gem -# - rake gem:x64-mingw32 # Build the x64-mingw32 gem -# - rake gem:x64-mingw-ucrt # Build the x64-mingw-ucrt gem -# - rake gem:x86_64-darwin # Build the x86_64-darwin gem -# - rake gem:x86_64-linux # Build the x86_64-linux gem -# - rake download # Download all tailwindcss binaries +# - rake gem:ruby # Build the ruby gem +# - rake gem:aarch64-linux # Build the aarch64-linux gem +# - rake gem:arm64-darwin # Build the arm64-darwin gem +# - rake gem:x64-mingw32 # Build the x64-mingw32 gem +# - rake gem:x64-mingw-ucrt # Build the x64-mingw-ucrt gem +# - rake gem:x86_64-darwin # Build the x86_64-darwin gem +# - rake gem:x86_64-linux # Build the x86_64-linux gem +# - rake gem:x86_64-linux-musl # Build the x86_64-linux gem +# - rake download # Download all tailwindcss binaries # # Modified rake tasks: #