Merge pull request #87 from flavorjones/flavorjones-dep-tailwindcss-v… #33
Workflow file for this run
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
name: ci | |
concurrency: | |
group: "${{github.workflow}}-${{github.ref}}" | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
tags: | |
- v*.*.* | |
pull_request: | |
types: [opened, synchronize] | |
branches: | |
- '*' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: ["3.0", "3.1", "3.2", "3.3", "3.4", "head"] | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rm Gemfile.lock | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{matrix.ruby}} | |
bundler: latest | |
bundler-cache: true | |
- name: Run tests | |
run: bundle exec rake test | |
package: | |
needs: [ "test" ] | |
name: "package (${{ matrix.platform }})" | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- "ruby" | |
- "aarch64-linux-gnu" | |
- "aarch64-linux-musl" | |
- "arm64-darwin" | |
- "x64-mingw-ucrt" | |
- "x64-mingw32" | |
- "x86_64-darwin" | |
- "x86_64-linux-gnu" | |
- "x86_64-linux-musl" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rm Gemfile.lock | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.2" | |
bundler: latest | |
bundler-cache: true | |
- run: "bundle exec rake gem:${{matrix.platform}}" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: gem-${{matrix.platform}} | |
path: pkg | |
retention-days: 1 | |
install-ruby: | |
name: "install (ruby)" | |
needs: [ "package" ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.2" | |
- uses: actions/download-artifact@v4 | |
with: | |
name: gem-ruby | |
path: pkg | |
- run: "gem install pkg/tailwindcss-ruby-*.gem" | |
- run: "tailwindcss 2>&1 | fgrep 'ERROR: Cannot find the tailwindcss executable'" | |
install-native: | |
name: "install (${{ matrix.platform }})" | |
needs: [ "package" ] | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby: [ "3.4" ] | |
platform: | |
- "aarch64-linux-gnu" | |
- "aarch64-linux-musl" | |
- "arm64-darwin" | |
- "x64-mingw-ucrt" | |
# - "x64-mingw32" # because it's on a different version of ruby, we just add it in an "include" below | |
- "x86_64-darwin" | |
- "x86_64-linux-gnu" | |
- "x86_64-linux-musl" | |
include: | |
- { platform: aarch64-linux-gnu, docker_platform: "--platform=linux/arm64/v8" } | |
- { platform: aarch64-linux-musl, docker_tag: "-alpine", docker_platform: "--platform=linux/arm64/v8", bootstrap: "apk add build-base &&" } | |
- { platform: arm64-darwin, runs_on: macos-14 } | |
- { platform: x64-mingw-ucrt, runs_on: windows-latest } | |
- { platform: x64-mingw32, runs_on: windows-latest, ruby: "3.0" } | |
- { platform: x86_64-darwin, runs_on: macos-13 } | |
- { platform: x86_64-linux-musl, docker_tag: "-alpine", bootstrap: "apk add build-base &&" } | |
runs-on: ${{ matrix.runs_on || 'ubuntu-latest' }} | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: gem-${{ matrix.platform }} | |
path: pkg | |
- if: ${{ matrix.runs_on }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
- if: ${{ matrix.runs_on }} | |
run: "gem install pkg/tailwindcss-ruby-*.gem" | |
- if: ${{ matrix.runs_on }} | |
run: "tailwindcss --help" | |
- if: ${{ (! matrix.runs_on) && matrix.docker_platform }} | |
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes | |
- if: ${{ ! matrix.runs_on }} | |
run: | | |
docker run --rm -v $PWD:/tailwindcss-ruby -w /tailwindcss-ruby \ | |
${{ matrix.docker_platform }} ruby:${{ matrix.ruby }}${{ matrix.docker_tag }} \ | |
sh -c " | |
${{ matrix.bootstrap }} | |
gem install pkg/tailwindcss-ruby-*.gem | |
tailwindcss --help | |
" |