Skip to content

Split out separate GNU and Musl gems #656

Split out separate GNU and Musl gems

Split out separate GNU and Musl gems #656

Workflow file for this run

name: re2 Tests
concurrency:
group: "${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}"
cancel-in-progress: true
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
schedule:
- cron: "30 4 * * 4"
env:
RUBYOPT: "--enable-frozen-string-literal --debug-frozen-string-literal"
jobs:
build-cruby-gem:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ports/archives
key: archives-ubuntu-${{ hashFiles('dependencies.yml') }}
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.4.0-rc1"
bundler-cache: true
- run: bundle exec rake gem
- uses: actions/upload-artifact@v4
with:
name: cruby-gem
path: pkg/*.gem
precompile-aarch64-linux-gnu:
uses: ./.github/workflows/precompile-gem.yml
with:
platform: aarch64-linux-gnu
precompile-aarch64-linux-musl:
uses: ./.github/workflows/precompile-gem.yml
with:
platform: aarch64-linux-musl
precompile-arm-linux-gnu:
uses: ./.github/workflows/precompile-gem.yml
with:
platform: arm-linux-gnu
precompile-arm-linux-musl:
uses: ./.github/workflows/precompile-gem.yml
with:
platform: arm-linux-musl
precompile-x86-linux-gnu:
uses: ./.github/workflows/precompile-gem.yml
with:
platform: x86-linux-gnu
precompile-x86-linux-musl:
uses: ./.github/workflows/precompile-gem.yml
with:
platform: x86-linux-musl
precompile-x86_64-linux-gnu:
uses: ./.github/workflows/precompile-gem.yml
with:
platform: x86_64-linux-gnu
precompile-x86_64-linux-musl:
uses: ./.github/workflows/precompile-gem.yml
with:
platform: x86_64-linux-musl
precompile-arm64-darwin:
uses: ./.github/workflows/precompile-gem.yml
with:
platform: arm64-darwin
precompile-x86_64-darwin:
uses: ./.github/workflows/precompile-gem.yml
with:
platform: x86_64-darwin
precompile-x64-mingw-ucrt:
uses: ./.github/workflows/precompile-gem.yml
with:
platform: x64-mingw-ucrt
test-re2-abi:
needs: "build-cruby-gem"
runs-on: ubuntu-22.04
strategy:
matrix:
ruby: ["3.4.0-rc1", "3.1"] # oldest and newest
libre2:
- version: "20150501"
soname: 0
- version: "20200302"
soname: 1
- version: "20200303"
soname: 6
- version: "20200501"
soname: 7
- version: "20200706"
soname: 8
- version: "20201101"
soname: 9
- version: "20221201"
soname: 10
- version: "20230701"
soname: 11
steps:
- uses: actions/checkout@v4
- name: Remove any existing libre2 installation
run: sudo apt-get remove -y libre2-dev libre2-9
- name: Download and install specific release of libre2
run: |
curl -Lo libre2-dev.deb https://github.com/mudge/re2-ci/releases/download/v22.04/libre2-dev_${{ matrix.libre2.version }}_amd64.deb
sudo apt -f install ./libre2-dev.deb
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
bundler-cache: true
- uses: actions/download-artifact@v4
with:
name: cruby-gem
path: pkg
- run: ./scripts/test-gem-install --enable-system-libraries
env:
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle
test-ubuntu:
needs: "build-cruby-gem"
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4.0-rc1"]
sys: ["enable", "disable"]
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{ matrix.ruby }}
apt-get: libre2-dev
bundler-cache: true
- uses: actions/download-artifact@v4
with:
name: cruby-gem
path: pkg
- run: ./scripts/test-gem-install --${{ matrix.sys }}-system-libraries
env:
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle
test-macos:
needs: "build-cruby-gem"
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4.0-rc1"]
sys: ["enable", "disable"]
runs-on: "macos-13"
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{ matrix.ruby }}
brew: re2
bundler-cache: true
- uses: actions/download-artifact@v4
with:
name: cruby-gem
path: pkg
- run: ./scripts/test-gem-install --${{ matrix.sys }}-system-libraries
env:
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle
test-windows-2022:
needs: "build-cruby-gem"
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "head"]
sys: ["enable", "disable"]
runs-on: "windows-2022"
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: ${{ matrix.ruby }}
mingw: re2
bundler-cache: true
- uses: actions/download-artifact@v4
with:
name: cruby-gem
path: pkg
- run: ./scripts/test-gem-install --${{ matrix.sys }}-system-libraries
shell: bash
env:
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle
test-freebsd:
needs: "build-cruby-gem"
strategy:
fail-fast: false
matrix:
sys: ["enable", "disable"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: cruby-gem
path: pkg
- uses: vmactions/freebsd-vm@v1
with:
usesh: true
copyback: false
prepare: pkg install -y ruby devel/ruby-gems sysutils/rubygem-bundler devel/pkgconf devel/cmake shells/bash devel/re2
run: ./scripts/test-gem-install --${{ matrix.sys }}-system-libraries
test-vendored-and-system:
needs: "build-cruby-gem"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install RE2
run: sudo apt-get install -y libre2-dev
- uses: ruby/setup-ruby@v1
id: setup-ruby
with:
ruby-version: "3.4.0-rc1"
bundler-cache: true
- uses: actions/download-artifact@v4
with:
name: cruby-gem
path: pkg
- name: "Link libre2 into Ruby's lib directory"
run: ln -s /usr/lib/x86_64-linux-gnu/libre2.so ${{ steps.setup-ruby.outputs.ruby-prefix }}/lib/libre2.so
- run: ./scripts/test-gem-install
env:
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle
test-precompiled-aarch64-linux-gnu:
needs: "precompile-aarch64-linux-gnu"
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4.0-rc1"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: cruby-aarch64-linux-gnu-gem
path: pkg
- name: Enable execution of multi-architecture containers by QEMU
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- run: |
docker run --rm -v "$(pwd):/re2" -w /re2 \
--platform=linux/arm64 \
ruby:${{ matrix.ruby }} \
./scripts/test-gem-install
test-precompiled-aarch64-linux-musl:
needs: "precompile-aarch64-linux-musl"
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4.0-rc1"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: cruby-aarch64-linux-musl-gem
path: pkg
- name: Enable execution of multi-architecture containers by QEMU
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- run: |
docker run --rm -v "$(pwd):/re2" -w /re2 \
--platform=linux/arm64 \
ruby:${{ matrix.ruby }}-alpine \
sh -c "gem update --system && apk add bash && ./scripts/test-gem-install"
test-precompiled-arm-linux-gnu:
needs: "precompile-arm-linux-gnu"
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4.0-rc1"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: cruby-arm-linux-gnu-gem
path: pkg
- name: enable execution of multi-architecture containers by qemu
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- run: |
docker run --rm -v "$(pwd):/re2" -w /re2 \
--platform=linux/arm/v7 \
ruby:${{ matrix.ruby }} \
./scripts/test-gem-install
test-precompiled-arm-linux-musl:
needs: "precompile-arm-linux-musl"
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4.0-rc1"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: cruby-arm-linux-musl-gem
path: pkg
- name: enable execution of multi-architecture containers by qemu
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- run: |
docker run --rm -v "$(pwd):/re2" -w /re2 \
--platform=linux/arm/v7 \
ruby:${{ matrix.ruby }}-alpine \
sh -c "gem update --system && apk add bash && ./scripts/test-gem-install"
test-precompiled-x86-linux-gnu:
needs: "precompile-x86-linux-gnu"
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4.0-rc1"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: cruby-x86-linux-gnu-gem
path: pkg
- name: Enable execution of multi-architecture containers by QEMU
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- run: |
docker run --rm -v "$(pwd):/re2" -w /re2 \
--platform=linux/386 \
ruby:${{ matrix.ruby }} \
./scripts/test-gem-install
test-precompiled-x86-linux-musl:
needs: "precompile-x86-linux-musl"
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4.0-rc1"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: cruby-x86-linux-musl-gem
path: pkg
- name: Enable execution of multi-architecture containers by QEMU
run: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- run: |
docker run --rm -v "$(pwd):/re2" -w /re2 \
--platform=linux/386 \
ruby:${{ matrix.ruby }}-alpine \
sh -c "gem update --system && apk add bash && ./scripts/test-gem-install"
test-precompiled-x86_64-linux-gnu:
needs: "precompile-x86_64-linux-gnu"
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4.0-rc1"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
bundler-cache: true
- uses: actions/download-artifact@v4
with:
name: cruby-x86_64-linux-gnu-gem
path: pkg
- run: ./scripts/test-gem-install
env:
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle
test-precompiled-x86_64-linux-musl:
needs: "precompile-x86_64-linux-musl"
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4.0-rc1"]
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-musl-gem
path: pkg
- run: gem update --system
- run: apk add bash
- run: ./scripts/test-gem-install
test-precompiled-arm64-darwin:
needs: "precompile-arm64-darwin"
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4.0-rc1"]
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
bundler-cache: true
- uses: actions/download-artifact@v4
with:
name: cruby-arm64-darwin-gem
path: pkg
- run: ./scripts/test-gem-install
env:
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle
test-precompiled-x86_64-darwin:
needs: "precompile-x86_64-darwin"
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "3.4.0-rc1"]
runs-on: macos-13
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "${{ matrix.ruby }}"
bundler-cache: true
- uses: actions/download-artifact@v4
with:
name: cruby-x86_64-darwin-gem
path: pkg
- run: ./scripts/test-gem-install
env:
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle
test-precompiled-x64-mingw-ucrt:
needs: "precompile-x64-mingw-ucrt"
strategy:
fail-fast: false
matrix:
ruby: ["3.1", "3.2", "3.3", "head"]
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- uses: MSP-Greg/setup-ruby-pkgs@v1
with:
ruby-version: "${{ matrix.ruby }}"
bundler-cache: true
- uses: actions/download-artifact@v4
with:
name: cruby-x64-mingw-ucrt-gem
path: pkg
- run: ./scripts/test-gem-install
shell: bash
env:
BUNDLE_PATH: ${{ github.workspace }}/vendor/bundle
ruby-memcheck:
runs-on: "ubuntu-latest"
env:
BUNDLE_WITH: memcheck
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: ports/archives
key: archives-ubuntu-${{ hashFiles('dependencies.yml') }}
- uses: ruby/setup-ruby-pkgs@v1
with:
ruby-version: "3.4.0-rc1"
apt-get: valgrind
bundler-cache: true
- run: bundle exec rake spec:valgrind