Skip to content

Commit de70cd3

Browse files
committed
Use docker.io gcc images to speed up the CI job by using smaller images
* These do not have ruby pre-installed, so we set SOEXT explicitly.
1 parent 2908c1c commit de70cd3

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

Rakefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,14 @@ end
7979

8080
task :build_in_docker => :templates do
8181
# Versions from https://github.com/ruby/ruby/blob/master/.github/workflows/compilers.yml
82-
compilers = (7..15).map { |v| "gcc-#{v}" }
83-
compilers.each do |compiler|
82+
versions = (7..15).to_a
83+
versions.each do |version|
8484
dockerfile = <<~DOCKERFILE
85-
FROM ghcr.io/ruby/ruby-ci-image:#{compiler}
86-
USER root
85+
FROM docker.io/library/gcc:#{version}
8786
ADD . /prism
8887
WORKDIR /prism
89-
RUN #{compiler} --version
90-
RUN make CC=#{compiler}
88+
RUN gcc --version
89+
RUN make SOEXT=so
9190
DOCKERFILE
9291
File.write 'Dockerfile', dockerfile
9392
sh "docker build ."

0 commit comments

Comments
 (0)