Skip to content

Commit dfcd0b6

Browse files
committed
ci: install ruby-dev and compiler toolchain in docker images
so that we can compile Prism as a C extension when needed
1 parent 9c84f8d commit dfcd0b6

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,10 +239,10 @@ jobs:
239239
# declare rubygems for each ruby version
240240
- { ruby: "3.0", rubygems: "3.5.23" }
241241
# declare docker image for each platform
242-
- { platform: aarch64-linux-musl, runon: "ubuntu-24.04-arm", docker_tag: "-alpine" }
243-
- { platform: arm-linux-musl, runon: "ubuntu-24.04-arm", docker_tag: "-alpine" }
244-
- { platform: x86-linux-musl, runon: "ubuntu-latest", docker_tag: "-alpine" }
245-
- { platform: x86_64-linux-musl, runon: "ubuntu-latest", docker_tag: "-alpine" }
242+
- { platform: aarch64-linux-musl, runon: "ubuntu-24.04-arm", docker_tag: "-alpine", bootstrap: "apk add build-base &&" }
243+
- { platform: arm-linux-musl, runon: "ubuntu-24.04-arm", docker_tag: "-alpine", bootstrap: "apk add build-base &&" }
244+
- { platform: x86-linux-musl, runon: "ubuntu-latest", docker_tag: "-alpine", bootstrap: "apk add build-base &&" }
245+
- { platform: x86_64-linux-musl, runon: "ubuntu-latest", docker_tag: "-alpine", bootstrap: "apk add build-base &&" }
246246
- { platform: x86_64-linux, runon: "ubuntu-latest" }
247247
- { platform: x86_64-linux-gnu, runon: "ubuntu-latest" }
248248
# declare docker platform for each platform
@@ -267,6 +267,7 @@ jobs:
267267
docker run --rm -v $PWD:/work -w /work \
268268
${{ matrix.docker_platform}} ruby:${{ matrix.ruby }}${{ matrix.docker_tag }} \
269269
sh -c "
270+
${{ matrix.bootstrap }}
270271
if test -n '${{ matrix.rubygems }}' ; then gem update --system ${{ matrix.rubygems }} ; fi &&
271272
gem install --local *.gem --verbose &&
272273
cd test/rcd_test/ &&

test/env/Dockerfile.alpine

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ ARG from_image
22
FROM ${from_image}
33

44
RUN uname -a
5-
RUN apk add ruby ruby-rake git
5+
RUN apk add ruby ruby-dev ruby-rake git build-base
66

77
RUN ruby --version
88
RUN gem env

test/env/Dockerfile.debian

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ RUN uname -a
88
RUN apt-get update -qq && \
99
apt-get install -yq \
1010
-o Dpkg::Options::='--force-confnew' \
11-
ruby \
11+
ruby ruby-dev build-essentials \
1212
git
1313

1414
RUN ruby --version

0 commit comments

Comments
 (0)