-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 1.58 KB
/
build-gems.yml
File metadata and controls
71 lines (60 loc) · 1.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
name: Build gems
on:
push:
tags:
- "v*"
- "cross-gem/*"
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
ci-data:
runs-on: ubuntu-latest
outputs:
result: ${{ steps.fetch.outputs.result }}
steps:
- uses: oxidize-rb/actions/fetch-ci-data@v1
id: fetch
with:
supported-ruby-platforms: |
exclude: ["arm-linux", "x64-mingw32"]
stable-ruby-versions: |
exclude: ["head"]
source-gem:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ruby
- name: Build gem
run: bundle exec rake build
- uses: actions/upload-artifact@v7
with:
name: source-gem
path: pkg/*.gem
cross-gem:
name: Compile native gem for ${{ matrix.platform }}
runs-on: ubuntu-latest
needs: ci-data
strategy:
matrix:
platform: ${{ fromJSON(needs.ci-data.outputs.result).supported-ruby-platforms }}
steps:
- uses: actions/checkout@v6
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ruby
- uses: oxidize-rb/actions/cross-gem@v1
id: cross-gem
with:
platform: ${{ matrix.platform }}
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ',') }}
- uses: actions/upload-artifact@v7
with:
name: cross-gem
path: ${{ steps.cross-gem.outputs.gem-path }}