File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -174,6 +174,18 @@ jobs:
174174 env :
175175 PRISM_BUILD_MINIMAL : " 1"
176176
177+ build-with-various-compilers :
178+ runs-on : ubuntu-latest
179+ steps :
180+ - uses : actions/checkout@v6
181+ - name : Set up Ruby
182+ uses : ruby/setup-ruby@v1
183+ with :
184+ ruby-version : ruby
185+ bundler-cache : true
186+ - name : Build with various compilers
187+ run : bundle exec rake build_in_docker
188+
177189 build-java :
178190 runs-on : ubuntu-latest
179191 env :
Original file line number Diff line number Diff line change @@ -76,3 +76,21 @@ namespace :build do
7676 desc "Build a development version of the gem"
7777 task dev : [ "build:dev_version_set" , "build" , "build:dev_version_clear" ]
7878end
79+
80+ task :build_in_docker => :templates do
81+ # 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 |
84+ dockerfile = <<~DOCKERFILE
85+ FROM ghcr.io/ruby/ruby-ci-image:#{ compiler }
86+ USER root
87+ ADD . /prism
88+ WORKDIR /prism
89+ RUN #{ compiler } --version
90+ RUN make CC=#{ compiler }
91+ DOCKERFILE
92+ File . write 'Dockerfile' , dockerfile
93+ sh "docker build ."
94+ rm 'Dockerfile'
95+ end
96+ end
You can’t perform that action at this time.
0 commit comments