Skip to content

Commit 09a092c

Browse files
committed
lets try this
1 parent ff52762 commit 09a092c

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

lib/cibuildgem/container.rb

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,19 @@ def execute(command, runtime_ruby:)
1010
dockerfile = File.expand_path("../docker/Dockerfile", __FILE__)
1111
system("podman image build -t cibuildgem -f #{dockerfile}", exception: true)
1212

13-
puts ENV["RUNNER_TEMP"]
14-
# system("podman container run -it -v /Users/edouard/Documents/rubies:/opt/rubies -v /Users/edouard/Documents/config.yml:/root/.rake-compiler/config.yml cibuildgem /bin/bash")
13+
system("podman container run --rm -it #{volumes_mount} cibuildgem bash -i -c cibuildgem package")
1514
end
1615

17-
def cpu
18-
Gem::Platform.local.cpu
16+
private
17+
18+
def volumes_mount
19+
mounts = [
20+
"-v #{ENV['RUNNER_TEMP']}/rubies:/opt/rubies",
21+
"-v #{Dir.home}/.rake-compiler/config.yml:/root/.rake-compiler/config.yml",
22+
"-v #{Dir.pwd}:/project",
23+
]
24+
25+
mounts.join(" ")
1926
end
2027
end
2128
end

lib/cibuildgem/docker/Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ RUN unzip ruby-3.4.7.zip -d /opt/rubies
1010
RUN bash -c "source /usr/local/share/chruby/chruby.sh && chruby 3.4.7 && gem install cibuildgem"
1111
RUN echo "source /usr/local/share/chruby/chruby.sh" >> ~/.bashrc
1212
RUN echo "chruby 3.4.7" >> ~/.bashrc
13+
14+
WORKDIR /project

0 commit comments

Comments
 (0)