-
Notifications
You must be signed in to change notification settings - Fork 2
101 lines (100 loc) · 3.21 KB
/
gem-compile.yml
File metadata and controls
101 lines (100 loc) · 3.21 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: "Package 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
jobs:
compile:
timeout-minutes: 20
name: "Cross compile the gem on different ruby versions"
strategy:
matrix:
os: ["macos-latest", "ubuntu-22.04", "windows-latest"]
runs-on: "${{ matrix.os }}"
steps:
- name: "Install gperf"
if: ${{ matrix.os == 'windows-latest' }}
run: choco install gperf
- name: "Install gperf"
if: ${{ matrix.os == 'ubuntu-22.04' }}
run: sudo apt-get -qy install gperf
- name: "Checkout code"
uses: "actions/checkout@v5"
- name: "Setup Ruby"
uses: "ruby/setup-ruby@v1"
with:
ruby-version: "3.1.7"
bundler-cache: true
working-directory: "test/fixtures/date"
- name: "Run easy compile"
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
with:
step: "compile"
token: ${{ secrets.GITHUB_TOKEN }} # TODO Remove this before publishing the gem
working-directory: "test/fixtures/date"
test:
timeout-minutes: 30
name: "Run the test suite"
needs: compile
strategy:
matrix:
os: ["macos-latest", "ubuntu-22.04", "windows-latest"]
rubies: ["3.4.7", "3.1.7"]
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
working-directory: "test/fixtures/date"
- name: "Run easy compile"
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
with:
step: "test_${{ matrix.type }}"
token: ${{ secrets.GITHUB_TOKEN }} # TODO Remove this before publishing the gem
working-directory: "test/fixtures/date"
install:
timeout-minutes: 5
name: "Verify the gem can be installed"
needs: test
strategy:
matrix:
os: ["macos-latest", "ubuntu-22.04", "windows-latest"]
runs-on: "${{ matrix.os }}"
steps:
- name: "Setup Ruby"
uses: "ruby/setup-ruby@v1"
with:
ruby-version: "3.4.7"
- name: "Run easy compile"
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
with:
token: ${{ secrets.GITHUB_TOKEN }} # TODO Remove this before publishing the gem
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 easy compile"
uses: "shopify-playground/edouard-playground/.github/actions/easy_compile@main"
with:
step: "release"
token: ${{ secrets.GITHUB_TOKEN }}