Skip to content

Commit ceba6c4

Browse files
just bump gcc
1 parent ce0c30e commit ceba6c4

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

.github/docker/rb-sys-protoc.Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,14 @@ RUN case "$TARGETARCH" in \
1717

1818
FROM ${BASE_IMAGE}
1919

20+
ARG EXTRA_APT_PACKAGES=""
21+
22+
RUN if [ -n "$EXTRA_APT_PACKAGES" ]; then \
23+
apt-get update && \
24+
apt-get install -y --no-install-recommends $EXTRA_APT_PACKAGES && \
25+
rm -rf /var/lib/apt/lists/*; \
26+
fi
27+
2028
COPY --from=protoc /opt/protoc/bin/protoc /usr/local/bin/protoc
2129
COPY --from=protoc /opt/protoc/include /usr/local/include
2230

.github/workflows/build-gems.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,15 @@ jobs:
4848
run: |
4949
gem install rb_sys --no-document
5050
rb_sys_version="$(ruby -e 'require "rb_sys/version"; puts RbSys::VERSION')"
51+
extra_apt_packages=""
52+
if [[ "${{ matrix.rubyPlatform }}" == "x86_64-linux" ]]; then
53+
extra_apt_packages="gcc-10 g++-10"
54+
fi
5155
custom_image="temporalio-rbsys/${{ matrix.rubyPlatform }}:${rb_sys_version}-protoc-${PROTOC_VERSION}"
5256
docker build \
5357
--platform linux/amd64 \
5458
--build-arg BASE_IMAGE="rbsys/${{ matrix.rubyPlatform }}:${rb_sys_version}" \
59+
--build-arg EXTRA_APT_PACKAGES="${extra_apt_packages}" \
5560
--build-arg PROTOC_VERSION="${PROTOC_VERSION}" \
5661
-t "$custom_image" \
5762
-f ../.github/docker/rb-sys-protoc.Dockerfile \
@@ -66,11 +71,11 @@ jobs:
6671
working-directory: ./temporalio
6772
run: |
6873
# aws-lc-sys rejects the Ubuntu 20.04 GCC 9 toolchain in the
69-
# current rb-sys x86_64 Linux image, but clang-12 is already
70-
# available there and passes the compiler self-check.
74+
# current rb-sys x86_64 Linux image, so use GCC 10 in the
75+
# derived image for that target.
7176
if [[ "${{ matrix.rubyPlatform }}" == "x86_64-linux" ]]; then
72-
export CC_x86_64_unknown_linux_gnu=clang-12
73-
export CXX_x86_64_unknown_linux_gnu=clang++-12
77+
export CC_x86_64_unknown_linux_gnu=gcc-10
78+
export CXX_x86_64_unknown_linux_gnu=g++-10
7479
fi
7580
RCD_IMAGE="${{ steps.build-rb-sys-dock-image.outputs.image }}" rb-sys-dock --platform "${{ matrix.rubyPlatform }}" --ruby-versions "3.3,3.4,4.0" --mount-toolchains --build
7681
echo "gem-path=$(find pkg -name '*-${{ matrix.rubyPlatform }}.gem')" >> "$GITHUB_OUTPUT"

0 commit comments

Comments
 (0)