fix: support alpine linux with musl libc #64
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: Build | |
on: | |
workflow_call: # from release | |
inputs: | |
ref: | |
type: 'string' | |
default: ${{github.ref}} | |
pull_request: | |
branches: | |
- "main" | |
push: | |
branches: # branches that are not used for release-please | |
- "**" | |
- "!main" | |
- "!release-please-action" | |
jobs: | |
build: | |
strategy: | |
matrix: | |
ruby-version: ['2.7','3.2','3.3'] | |
os: ['ubuntu-latest','ubuntu-24.04'] # mac-os when/if Macfuse can be deployed on CI images | |
fuse_pkg: ['fuse','fuse3'] | |
chroot: [ '' ] | |
include: | |
- ruby-version: '3.3' | |
os: 'ubuntu-latest' | |
chroot: 'alpine' | |
runs-on: ${{ matrix.os }} | |
env: | |
TERM: color # Pretty spec output | |
GIT_REF: ${{ inputs.ref || github.ref }} | |
GIT_BASE_REF: ${{ github.base_ref || 'undefined' }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ env.GIT_REF }} | |
- name: Preinstall | |
env: | |
FUSE_PKG: ${{ matrix.fuse_pkg }} | |
run: .github/scripts/pre_install_${{runner.os}}.sh | |
if: ${{ matrix.chroot != 'alpine' }} | |
- name: Set up Ruby ${{ matrix.ruby-version }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
if: ${{ matrix.chroot != 'alpine' }} | |
- name: Setup Alpine Linux | |
uses: jirutka/setup-alpine@v1 | |
with: | |
packages: > | |
build-base | |
${{ matrix.fuse_pkg }} | |
ruby | |
ruby-bundler | |
if: ${{ matrix.chroot == 'alpine' }} | |
- name: Run tests | |
run: bundle exec rake | |
shell: alpine.sh {0} # we can't use variables in shell | |
if: ${{ matrix.chroot == 'alpine' }} | |
- name: Run tests | |
run: bundle exec rake | |
if: ${{ matrix.chroot != 'alpine' }} |