@@ -24,205 +24,10 @@ concurrency:
24
24
group : ${{ github.workflow }} / ${{ startsWith(github.event_name, 'pull') && github.ref_name || github.sha }}
25
25
cancel-in-progress : ${{ startsWith(github.event_name, 'pull') }}
26
26
27
- # GitHub actions does not support YAML anchors. This creative use of
28
- # environment variables (plus the "echo $GITHUB_ENV" hack) is to reroute that
29
- # restriction.
30
- env :
31
- default_cc : clang-18
32
- append_cc : ' '
33
-
34
- # -O1 is faster than -O3 in our tests... Majority of time are consumed trying
35
- # to optimize binaries. Also GitHub Actions run on relatively modern CPUs
36
- # compared to, say, GCC 4 or Clang 3. We don't specify `-march=native`
37
- # because compilers tend not understand what the CPU is.
38
- optflags : ' -O1'
39
-
40
- # -g0 disables backtraces when SEGV. Do not set that.
41
- debugflags : ' -ggdb3'
42
-
43
- default_configure : >-
44
- --enable-debug-env
45
- --disable-install-doc
46
- --with-ext=-test-/cxxanyargs,+
47
- append_configure : >-
48
- --without-valgrind
49
- --without-jemalloc
50
- --without-gmp
51
-
52
- CONFIGURE_TTY : never
53
- GITPULLOPTIONS : --no-tags origin ${{ github.ref }}
54
- RUBY_DEBUG : ci rgengc
55
- RUBY_TESTOPTS : >-
56
- -q
57
- --color=always
58
- --tty=no
59
-
60
- permissions :
61
- contents : read
62
-
63
27
jobs :
64
28
compile :
65
- strategy :
66
- fail-fast : false
67
- matrix :
68
- env :
69
- - {}
70
- entry :
71
- # - { name: gcc-13, env: { default_cc: gcc-13 } }
72
- # - { name: gcc-12, env: { default_cc: gcc-12 } }
73
- # - { name: gcc-11, env: { default_cc: gcc-11 } }
74
- # - { name: gcc-10, env: { default_cc: gcc-10 } }
75
- # - { name: gcc-9, env: { default_cc: gcc-9 } }
76
- # - { name: gcc-8, env: { default_cc: gcc-8 } }
77
- # - { name: gcc-7, env: { default_cc: gcc-7 } }
78
- # - name: 'gcc-13 LTO'
79
- # container: gcc-13
80
- # env:
81
- # default_cc: 'gcc-13 -flto=auto -ffat-lto-objects -Werror=lto-type-mismatch'
82
- # optflags: '-O2'
83
- # shared: disable
84
- # # check: true
85
- # - { name: clang-19, env: { default_cc: clang-19 } }
86
- # - { name: clang-18, env: { default_cc: clang-18 } }
87
- # - { name: clang-17, env: { default_cc: clang-17 } }
88
- # - { name: clang-16, env: { default_cc: clang-16 } }
89
- # - { name: clang-15, env: { default_cc: clang-15 } }
90
- # - { name: clang-14, env: { default_cc: clang-14 } }
91
- # - { name: clang-13, env: { default_cc: clang-13 } }
92
- # - { name: clang-12, env: { default_cc: clang-12 } }
93
- # - { name: clang-11, env: { default_cc: clang-11 } }
94
- # - { name: clang-10, env: { default_cc: clang-10 } }
95
- # # llvm-objcopy<=9 doesn't have --wildcard. It compiles, but leaves Rust symbols in libyjit.o.
96
- # - { name: clang-9, env: { default_cc: clang-9, append_configure: '--disable-yjit' } }
97
- # - { name: clang-8, env: { default_cc: clang-8, append_configure: '--disable-yjit' } }
98
- # - { name: clang-7, env: { default_cc: clang-7, append_configure: '--disable-yjit' } }
99
- # - { name: clang-6.0, env: { default_cc: clang-6.0, append_configure: '--disable-yjit' } }
100
- # - name: 'clang-16 LTO'
101
- # container: clang-16
102
- # env:
103
- # default_cc: 'clang-16 -flto=auto'
104
- # optflags: '-O2'
105
- # shared: disable
106
- # # check: true
107
-
108
- # - { name: ext/Setup, static-exts: 'etc,json/*,*/escape' }
109
-
110
- # - { name: aarch64-linux-gnu, crosshost: aarch64-linux-gnu, container: crossbuild-essential-arm64 }
111
- # - { name: arm-linux-gnueabi, crosshost: arm-linux-gnueabi }
112
- # - { name: arm-linux-gnueabihf, crosshost: arm-linux-gnueabihf }
113
- # - { name: i686-w64-mingw32, crosshost: i686-w64-mingw32 }
114
- # - { name: powerpc-linux-gnu, crosshost: powerpc-linux-gnu }
115
- # - { name: powerpc64le-linux-gnu, crosshost: powerpc64le-linux-gnu, container: crossbuild-essential-ppc64el }
116
- # - { name: s390x-linux-gnu, crosshost: s390x-linux-gnu, container: crossbuild-essential-s390x }
117
- # - { name: x86_64-w64-mingw32, crosshost: x86_64-w64-mingw32, container: mingw-w64 }
118
-
119
- # # -Wno-strict-prototypes is necessary with current clang-15 since
120
- # # older autoconf generate functions without prototype and -pedantic
121
- # # now implies strict-prototypes. Disabling the error but leaving the
122
- # # warning generates a lot of noise from use of ANYARGS in
123
- # # rb_define_method() and friends.
124
- # # See: https://github.com/llvm/llvm-project/commit/11da1b53d8cd3507959022cd790d5a7ad4573d94
125
- # - { name: c99, env: { CFLAGS: '-std=c99 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } }
126
- # - { name: c11, env: { CFLAGS: '-std=c11 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } }
127
- # - { name: c17, env: { CFLAGS: '-std=c17 -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } }
128
- # - { name: c23, env: { CFLAGS: '-std=c2x -Werror=pedantic -pedantic-errors -Wno-strict-prototypes' } }
129
- # - { name: c++98, env: { CXXFLAGS: '-std=c++98 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
130
- # - { name: c++11, env: { CXXFLAGS: '-std=c++11 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
131
- # - { name: c++14, env: { CXXFLAGS: '-std=c++14 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
132
- # - { name: c++17, env: { CXXFLAGS: '-std=c++17 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
133
- # - { name: c++20, env: { CXXFLAGS: '-std=c++20 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
134
- # - { name: c++23, env: { CXXFLAGS: '-std=c++23 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
135
- # - { name: c++26, env: { CXXFLAGS: '-std=c++26 -Werror=pedantic -pedantic-errors -Wno-c++11-long-long' } }
136
-
137
- # - { name: '-O0', env: { optflags: '-O0 -march=x86-64 -mtune=generic' } }
138
- # - { name: '-O3', env: { optflags: '-O3 -march=x86-64 -mtune=generic' }, check: true }
139
-
140
- # - { name: gmp, env: { append_configure: '--with-gmp' }, check: true }
141
- # - { name: jemalloc, env: { append_configure: '--with-jemalloc' } }
142
- # - { name: valgrind, env: { append_configure: '--with-valgrind' } }
143
- # - { name: 'coroutine=ucontext', env: { append_configure: '--with-coroutine=ucontext' } }
144
- # - { name: 'coroutine=pthread', env: { append_configure: '--with-coroutine=pthread' } }
145
- # - { name: disable-jit, env: { append_configure: '--disable-yjit --disable-rjit' } }
146
- # - { name: disable-dln, env: { append_configure: '--disable-dln' } }
147
- # - { name: enable-mkmf-verbose, env: { append_configure: '--enable-mkmf-verbose' } }
148
- # - { name: disable-rubygems, env: { append_configure: '--disable-rubygems' } }
149
- # - { name: RUBY_DEVEL, env: { append_configure: '--enable-devel' } }
150
-
151
- # - { name: OPT_THREADED_CODE=0, env: { cppflags: '-DOPT_THREADED_CODE=0' } }
152
- # - { name: OPT_THREADED_CODE=1, env: { cppflags: '-DOPT_THREADED_CODE=1' } }
153
- # - { name: OPT_THREADED_CODE=2, env: { cppflags: '-DOPT_THREADED_CODE=2' } }
154
-
155
- # - { name: NDEBUG, env: { cppflags: '-DNDEBUG' } }
156
- # - { name: RUBY_DEBUG, env: { cppflags: '-DRUBY_DEBUG' } }
157
- # - { name: ARRAY_DEBUG, env: { cppflags: '-DARRAY_DEBUG' } }
158
- # - { name: BIGNUM_DEBUG, env: { cppflags: '-DBIGNUM_DEBUG' } }
159
- # - { name: CCAN_LIST_DEBUG, env: { cppflags: '-DCCAN_LIST_DEBUG' } }
160
- # - { name: CPDEBUG=-1, env: { cppflags: '-DCPDEBUG=-1' } }
161
- # - { name: ENC_DEBUG, env: { cppflags: '-DENC_DEBUG' } }
162
- # - { name: GC_DEBUG, env: { cppflags: '-DGC_DEBUG' } }
163
- # - { name: HASH_DEBUG, env: { cppflags: '-DHASH_DEBUG' } }
164
- # - { name: ID_TABLE_DEBUG, env: { cppflags: '-DID_TABLE_DEBUG' } }
165
- # - { name: RGENGC_DEBUG=-1, env: { cppflags: '-DRGENGC_DEBUG=-1' } }
166
- # - { name: SYMBOL_DEBUG, env: { cppflags: '-DSYMBOL_DEBUG' } }
167
-
168
- # - { name: RGENGC_CHECK_MODE, env: { cppflags: '-DRGENGC_CHECK_MODE' } }
169
- # - { name: VM_CHECK_MODE, env: { cppflags: '-DVM_CHECK_MODE' } }
170
-
171
- # - { name: USE_EMBED_CI=0, env: { cppflags: '-DUSE_EMBED_CI=0' } }
172
- # - name: USE_FLONUM=0
173
- # env:
174
- # cppflags: '-DUSE_FLONUM=0'
175
- # # yjit requires FLONUM for the pointer tagging scheme
176
- # append_configure: '--disable-yjit'
177
- # - { name: USE_GC_MALLOC_OBJ_INFO_DETAILS, env: { cppflags: '-DUSE_GC_MALLOC_OBJ_INFO_DETAILS' } }
178
- # - { name: USE_LAZY_LOAD, env: { cppflags: '-DUSE_LAZY_LOAD' } }
179
- # - { name: USE_SYMBOL_GC=0, env: { cppflags: '-DUSE_SYMBOL_GC=0' } }
180
- # - { name: USE_THREAD_CACHE=0, env: { cppflags: '-DUSE_THREAD_CACHE=0' } }
181
- # - { name: USE_RUBY_DEBUG_LOG=1, env: { cppflags: '-DUSE_RUBY_DEBUG_LOG=1' } }
182
- # - { name: USE_DEBUG_COUNTER, env: { cppflags: '-DUSE_DEBUG_COUNTER=1', RUBY_DEBUG_COUNTER_DISABLE: '1' } }
183
- # - { name: SHARABLE_MIDDLE_SUBSTRING, env: { cppflags: '-DSHARABLE_MIDDLE_SUBSTRING=1' } }
184
-
185
- # - { name: DEBUG_FIND_TIME_NUMGUESS, env: { cppflags: '-DDEBUG_FIND_TIME_NUMGUESS' } }
186
- # - { name: DEBUG_INTEGER_PACK, env: { cppflags: '-DDEBUG_INTEGER_PACK' } }
187
- # - { name: ENABLE_PATH_CHECK, env: { cppflags: '-DENABLE_PATH_CHECK' } }
188
-
189
- # - { name: GC_DEBUG_STRESS_TO_CLASS, env: { cppflags: '-DGC_DEBUG_STRESS_TO_CLASS' } }
190
- # - { name: GC_ENABLE_LAZY_SWEEP=0, env: { cppflags: '-DGC_ENABLE_LAZY_SWEEP=0' } }
191
- # - { name: GC_PROFILE_DETAIL_MEMOTY, env: { cppflags: '-DGC_PROFILE_DETAIL_MEMOTY' } }
192
- # - { name: GC_PROFILE_MORE_DETAIL, env: { cppflags: '-DGC_PROFILE_MORE_DETAIL' } }
193
-
194
- # - { name: CALC_EXACT_MALLOC_SIZE, env: { cppflags: '-DCALC_EXACT_MALLOC_SIZE' } }
195
- # - { name: MALLOC_ALLOCATED_SIZE_CHECK, env: { cppflags: '-DMALLOC_ALLOCATED_SIZE_CHECK' } }
196
-
197
- # - { name: IBF_ISEQ_ENABLE_LOCAL_BUFFER, env: { cppflags: '-DIBF_ISEQ_ENABLE_LOCAL_BUFFER' } }
198
-
199
- # - { name: RGENGC_ESTIMATE_OLDMALLOC, env: { cppflags: '-DRGENGC_ESTIMATE_OLDMALLOC' } }
200
- # - { name: RGENGC_FORCE_MAJOR_GC, env: { cppflags: '-DRGENGC_FORCE_MAJOR_GC' } }
201
- # - { name: RGENGC_OBJ_INFO, env: { cppflags: '-DRGENGC_OBJ_INFO' } }
202
- # - { name: RGENGC_PROFILE, env: { cppflags: '-DRGENGC_PROFILE' } }
203
-
204
- # - { name: VM_DEBUG_BP_CHECK, env: { cppflags: '-DVM_DEBUG_BP_CHECK' } }
205
- # - { name: VM_DEBUG_VERIFY_METHOD_CACHE, env: { cppflags: '-DVM_DEBUG_VERIFY_METHOD_CACHE' } }
206
-
207
- # - { name: enable-yjit, env: { append_configure: '--enable-yjit --disable-rjit' } }
208
- # - { name: enable-rjit, env: { append_configure: '--enable-rjit --disable-yjit' } }
209
- # - { name: YJIT_FORCE_ENABLE, env: { cppflags: '-DYJIT_FORCE_ENABLE' } }
210
- # - { name: RJIT_FORCE_ENABLE, env: { cppflags: '-DRJIT_FORCE_ENABLE' } }
211
- # - { name: UNIVERSAL_PARSER, env: { cppflags: '-DUNIVERSAL_PARSER' } }
212
- # - name: SHARED_GC
213
- # shared_gc: true
214
- # shared_gc_dir: '../gc'
215
- # env:
216
- # append_configure: '--with-shared-gc=../gc'
217
-
218
- name : ${{ matrix.entry.name }}
219
-
29
+ name : omnibus compilations
220
30
runs-on : ubuntu-latest
221
-
222
- container :
223
- image : ghcr.io/ruby/ruby-ci-image:${{ matrix.entry.container || matrix.entry.env.default_cc || 'clang-18' }}
224
- options : --user root
225
-
226
31
if : >-
227
32
${{!(false
228
33
|| contains(github.event.head_commit.message, '[DOC]')
233
38
|| (github.event_name == 'push' && github.actor == 'dependabot[bot]')
234
39
)}}
235
40
236
- env : ${{ matrix.entry.env || matrix.env }}
237
-
238
41
steps :
239
42
- run : id
240
43
working-directory :
@@ -247,75 +50,12 @@ jobs:
247
50
- uses : ./.github/actions/setup/directories
248
51
with :
249
52
srcdir : src
250
- builddir : build
251
53
makeup : true
252
54
clean : true
253
55
254
- - name : Run configure
255
- run : >
256
- ../src/configure -C ${default_configure} ${append_configure}
257
- --${{
258
- matrix.entry.crosshost && 'host' || 'with-gcc'
259
- }}=${{
260
- matrix.entry.crosshost || '"${default_cc}${append_cc:+ $append_cc}"'
261
- }}
262
- --${{ matrix.entry.shared || 'enable' }}-shared
263
-
264
- - name : Build shared GC
265
- run : >
266
- make probes.h &&
267
- export RUBY_GC_LIBRARY=librubygc.so &&
268
- echo "RUBY_GC_LIBRARY=$RUBY_GC_LIBRARY" >> $GITHUB_ENV &&
269
- mkdir ${{ matrix.entry.shared_gc_dir }} &&
270
- gcc -I../src -I../src/include -I. -I.ext/include/x86_64-linux
271
- -Wl,-undefined,dynamic_lookup -fPIC -g -O3 -shared
272
- -o ${{ matrix.entry.shared_gc_dir }}/$RUBY_GC_LIBRARY ../src/gc_impl.c
273
- if : ${{ matrix.entry.shared_gc }}
274
-
275
- - name : Add to ext/Setup
276
- id : ext-setup
277
- run : |
278
- mkdir ext
279
- cd ext
280
- for ext in {${{ matrix.entry.static-exts }}}; do
281
- echo "${ext}"
282
- done >> Setup
283
- if : ${{ (matrix.entry.static-exts || '') != '' }}
284
-
285
- - name : Clean up ext/Setup
286
- uses : gacts/run-and-post-run@4683764dd706df847f57b9bed39d08164bcd2690 # v1.4.1
56
+ - uses : ./.github/actions/compilers/gcc-13
287
57
with :
288
- shell : bash
289
- working-directory : build
290
- post : rm ext/Setup
291
- if : ${{ steps.ext-setup.outcome == 'success' }}
292
-
293
- - run : make showflags
294
-
295
- - run : make
296
-
297
- - run : make test
298
-
299
- - run : make install
300
- if : ${{ matrix.entry.check }}
58
+ name : ' GCC 13'
59
+ workdir : ' gcc-13'
301
60
302
- - run : make test-tool
303
- if : ${{ matrix.entry.check }}
304
-
305
- - run : make test-all TESTS='-- ruby -ext-'
306
- if : ${{ matrix.entry.check }}
307
-
308
- - run : make test-spec
309
- env :
310
- CHECK_LEAKS : true
311
- if : ${{ matrix.entry.check }}
312
-
313
- - uses : ./.github/actions/slack
314
- with :
315
- label : ${{ matrix.entry.name }}
316
- SLACK_WEBHOOK_URL : ${{ secrets.SIMPLER_ALERTS_URL }} # ruby-lang slack: ruby/simpler-alerts-bot
317
- if : ${{ failure() }}
318
61
319
- defaults :
320
- run :
321
- working-directory : build
0 commit comments