Skip to content

GitHub workflow for building gems #10

GitHub workflow for building gems

GitHub workflow for building gems #10

Workflow file for this run

name: Build Gems
on:
pull_request:
push:
branches:
- main
- "releases/*"
jobs:
build-gems:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rubyPlatform: ["aarch64-linux", "x86_64-linux", "arm64-darwin", "x86_64-darwin", "x64-mingw-ucrt"]
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: recursive
- name: Setup Ruby and Rust
uses: oxidize-rb/actions/setup-ruby-and-rust@v1
with:
ruby-version: "3.3"
bundler-cache: true
cargo-cache: true
cargo-vendor: true
working-directory: ./temporalio
cache-version: v1-${{ matrix.rubyPlatform }}
- name: Cross compile gems
uses: oxidize-rb/actions/cross-gem@v1
with:
platform: ${{ matrix.rubyPlatform }}
ruby-versions: "3.1,3.2,3.3"
working-directory: ./temporalio
- name: Upload gems
uses: actions/upload-artifact@v4
with:
name: gems
path: ${{ steps.cross-gem.outputs.gem-path }}
smoke-test-gems:
needs:
- build-gems
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-arm, macos-intel, macos-latest, windows-latest]
include:
- os: ubuntu-arm
runsOn: ubuntu-24.04-arm64-2-core
- os: macos-intel
runsOn: macos-12
runs-on: ${{ matrix.runsOn || matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Download gems
uses: actions/download-artifact@v4
with:
name: gems
path: local-gems
- name: Run smoke test
working-directory: ./temporalio
run: bundle exec rake smoke_test_gem[../local-gems]