@@ -4,8 +4,6 @@ concurrency:
4
4
cancel-in-progress : true
5
5
on :
6
6
workflow_dispatch :
7
- schedule :
8
- - cron : " 0 5 * * 3" # At 05:00 on Wednesday # https://crontab.guru/#0_5_*_*_3
9
7
push :
10
8
branches :
11
9
- main
17
15
- " *"
18
16
19
17
jobs :
20
- build_source_gem :
21
- name : build source
22
- runs-on : ubuntu-latest
23
- steps :
24
- - uses : actions/checkout@v4
25
- - uses : ruby/setup-ruby@v1
26
- with :
27
- ruby-version : " 3.3"
28
- working-directory : test/rcd_test
29
- bundler-cache : true
30
-
31
- - name : Build source gem
32
- run : |
33
- cd test/rcd_test/
34
- bundle exec rake gem
35
-
36
- - name : Upload source gem
37
- uses : actions/upload-artifact@v4
38
- with :
39
- name : gem-ruby
40
- path : test/rcd_test/pkg/rcd_test-?.?.?.gem # e.g. rcd_test-1.0.0.gem
41
-
42
18
build_native_gem :
43
19
name : build native
44
20
strategy :
45
21
fail-fast : false
46
22
matrix :
47
23
include :
48
24
- platform : aarch64-linux-gnu
49
- alias : aarch64-linux
50
- - platform : aarch64-linux-musl
51
- - platform : arm-linux-gnu
52
- alias : arm-linux
53
- - platform : arm-linux-musl
54
- - platform : arm64-darwin
55
- - platform : jruby
56
- - platform : x64-mingw-ucrt
57
- static : true
58
- - platform : x64-mingw32
59
- static : true
60
- - platform : x86-linux-gnu
61
- alias : x86-linux
62
- - platform : x86-linux-musl
63
- - platform : x86-mingw32
64
- - platform : x86_64-darwin
65
- - platform : x86_64-linux-gnu
66
- alias : x86_64-linux
67
- - platform : x86_64-linux-musl
68
- runs-on : ubuntu-latest
25
+ runs-on : macos-latest
69
26
steps :
70
27
- uses : actions/checkout@v4
71
- - uses : ruby/setup-ruby@v1
28
+ - uses : ruby/setup-ruby-pkgs @v1
72
29
with :
73
30
ruby-version : " 3.3"
74
- bundler-cache : true
75
-
31
+ brew : " docker docker-buildx colima"
32
+ - name : enable buildx command
33
+ run : |
34
+ mkdir -p ~/.docker
35
+ echo '{"cliPluginsExtraDirs": ["/opt/homebrew/lib/docker/cli-plugins"]}' > ~/.docker/config.json
36
+ cat ~/.docker/config.json
37
+ - name : start colima
38
+ run : |
39
+ colima start
76
40
- name : Fetch docker buildx layer cache
77
41
uses : actions/cache@v4
78
42
with :
82
46
- name : Build docker image
83
47
run : |
84
48
docker buildx create --driver docker-container --use
85
- bundle exec rake build:x86 :${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,src=tmp/build-cache --cache-to=type=local,dest=tmp/build-cache-new"
49
+ bundle exec rake build:arm :${{ matrix.platform }} RCD_DOCKER_BUILD="docker buildx build --cache-from=type=local,src=tmp/build-cache --cache-to=type=local,dest=tmp/build-cache-new"
86
50
docker images
87
51
- name : Update and prune docker buildx layer cache
88
52
run : |
@@ -137,31 +101,6 @@ jobs:
137
101
name : gem-${{ matrix.alias }}
138
102
path : test/rcd_test/pkg/*-*-*.gem
139
103
140
- test_source_gem :
141
- name : source gem
142
- needs : build_source_gem
143
- strategy :
144
- fail-fast : false
145
- matrix :
146
- os : [ubuntu-latest]
147
- ruby : ["3.4.0-rc1", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6", "2.5", "2.4"]
148
- runs-on : ${{ matrix.os }}
149
- steps :
150
- - uses : actions/checkout@v4
151
- - uses : ruby/setup-ruby@v1
152
- with :
153
- ruby-version : ${{ matrix.ruby }}
154
- - name : Download source gem
155
- uses : actions/download-artifact@v4
156
- with :
157
- name : gem-ruby
158
- - name : Test source gem
159
- run : |
160
- gem install --local *.gem --verbose
161
- cd test/rcd_test/
162
- bundle install
163
- ruby -rrcd_test -S rake test
164
-
165
104
test-x86_64-linux-setup-ruby :
166
105
name : " ${{ matrix.platform }} setup-ruby(${{ matrix.ruby }})"
167
106
needs : build_native_gem
0 commit comments