Skip to content

WIP

WIP #10

Workflow file for this run

name: "Package and release gems with precompiled binaries"
on:
workflow_dispatch:
inputs:
release:
description: "If the whole build passes on all platforms, release the gems on RubyGems.org"
required: false
type: boolean
default: false
push:
jobs:
compile:
timeout-minutes: 20
name: "Cross compile the gem on different ruby versions"
strategy:
matrix:
os: ["windows-latest"]
runs-on: "${{ matrix.os }}"
steps:
- name: "Checkout code"
uses: "actions/checkout@v5"
- name: "Setup Ruby"
uses: "ruby/setup-ruby@v1"
with:
ruby-version: "3.1.7"
bundler-cache: true
- name: "Set RUST_TARGET for windows"
if: ${{ runner.os == 'Windows' }}
run: echo "RUST_TARGET=x86_64-pc-windows-gnu" >> $GITHUB_ENV
- name: "Run cibuildgem"
uses: "shopify/cibuildgem/.github/actions/cibuildgem@main"
with:
step: "compile"
# test:
# timeout-minutes: 20
# name: "Run the test suite"
# needs: compile
# strategy:
# matrix:
# os: ["macos-latest", "ubuntu-22.04", "ubuntu-22.04-arm", "windows-latest", "macos-15-intel"]
# rubies: ["3.1", "3.2", "3.3", "3.4"]
# type: ["cross", "native"]
# runs-on: "${{ matrix.os }}"
# steps:
# - name: "Checkout code"
# uses: "actions/checkout@v5"
# - name: "Setup Ruby"
# uses: "ruby/setup-ruby@v1"
# with:
# ruby-version: "${{ matrix.rubies }}"
# bundler-cache: true
# - uses: oxidize-rb/actions/cargo-binstall@e5f9a49a7812a078584072f6e3f657ad247c8771 # v1.4.4
# with:
# crate: "b3sum"
# version: "1.5.1"
# - name: "Run cibuildgem"
# uses: "shopify/cibuildgem/.github/actions/cibuildgem@main"
# with:
# step: "test_${{ matrix.type }}"
# install:
# timeout-minutes: 5
# name: "Verify the gem can be installed"
# needs: test
# strategy:
# matrix:
# os: ["macos-latest", "ubuntu-22.04", "ubuntu-22.04-arm", "windows-latest", "macos-15-intel"]
# runs-on: "${{ matrix.os }}"
# steps:
# - name: "Setup Ruby"
# uses: "ruby/setup-ruby@v1"
# with:
# ruby-version: "3.4.7"
# - name: "Run cibuildgem"
# uses: "shopify/cibuildgem/.github/actions/cibuildgem@main"
# with:
# step: "install"
# release:
# permissions:
# id-token: write
# contents: read
# timeout-minutes: 5
# if: ${{ inputs.release }}
# name: "Release all gems with RubyGems"
# needs: install
# runs-on: "ubuntu-latest"
# steps:
# - name: "Setup Ruby"
# uses: "ruby/setup-ruby@v1"
# with:
# ruby-version: "3.4.7"
# - name: "Run cibuildgem"
# uses: "shopify/cibuildgem/.github/actions/cibuildgem@main"
# with:
# step: "release"