Skip to content

Commit 2d0b71d

Browse files
committed
WIP
1 parent f36707c commit 2d0b71d

File tree

1 file changed

+88
-0
lines changed

1 file changed

+88
-0
lines changed

.github/workflows/cibuildgem.yaml

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: "Package and release gems with precompiled binaries"
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
release:
6+
description: "If the whole build passes on all platforms, release the gems on RubyGems.org"
7+
required: false
8+
type: boolean
9+
default: false
10+
push:
11+
12+
jobs:
13+
compile:
14+
timeout-minutes: 20
15+
name: "Cross compile the gem on different ruby versions"
16+
strategy:
17+
matrix:
18+
os: ["macos-latest", "ubuntu-22.04"]
19+
runs-on: "${{ matrix.os }}"
20+
steps:
21+
- name: "Checkout code"
22+
uses: "actions/checkout@v5"
23+
- name: "Setup Ruby"
24+
uses: "ruby/setup-ruby@v1"
25+
with:
26+
ruby-version: "3.1.7"
27+
bundler-cache: true
28+
- name: "Run cibuildgem"
29+
uses: "shopify/cibuildgem/.github/actions/cibuildgem@main"
30+
with:
31+
step: "compile"
32+
test:
33+
timeout-minutes: 20
34+
name: "Run the test suite"
35+
needs: compile
36+
strategy:
37+
matrix:
38+
os: ["macos-latest", "ubuntu-22.04"]
39+
rubies: ["3.1", "3.2", "3.3", "3.4"]
40+
type: ["cross", "native"]
41+
runs-on: "${{ matrix.os }}"
42+
steps:
43+
- name: "Checkout code"
44+
uses: "actions/checkout@v5"
45+
- name: "Setup Ruby"
46+
uses: "ruby/setup-ruby@v1"
47+
with:
48+
ruby-version: "${{ matrix.rubies }}"
49+
bundler-cache: true
50+
- name: "Run cibuildgem"
51+
uses: "shopify/cibuildgem/.github/actions/cibuildgem@main"
52+
with:
53+
step: "test_${{ matrix.type }}"
54+
install:
55+
timeout-minutes: 5
56+
name: "Verify the gem can be installed"
57+
needs: test
58+
strategy:
59+
matrix:
60+
os: ["macos-latest", "ubuntu-22.04"]
61+
runs-on: "${{ matrix.os }}"
62+
steps:
63+
- name: "Setup Ruby"
64+
uses: "ruby/setup-ruby@v1"
65+
with:
66+
ruby-version: "3.4.7"
67+
- name: "Run cibuildgem"
68+
uses: "shopify/cibuildgem/.github/actions/cibuildgem@main"
69+
with:
70+
step: "install"
71+
release:
72+
permissions:
73+
id-token: write
74+
contents: read
75+
timeout-minutes: 5
76+
if: ${{ inputs.release }}
77+
name: "Release all gems with RubyGems"
78+
needs: install
79+
runs-on: "ubuntu-latest"
80+
steps:
81+
- name: "Setup Ruby"
82+
uses: "ruby/setup-ruby@v1"
83+
with:
84+
ruby-version: "3.4.7"
85+
- name: "Run cibuildgem"
86+
uses: "shopify/cibuildgem/.github/actions/cibuildgem@main"
87+
with:
88+
step: "release"

0 commit comments

Comments
 (0)