Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/docker/rb-sys-protoc.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@ RUN case "$TARGETARCH" in \

FROM ${BASE_IMAGE}

ARG GCC_VERSION=""

RUN if [ -n "$GCC_VERSION" ]; then \
apt-get update && \
apt-get install -y --no-install-recommends gcc-${GCC_VERSION} g++-${GCC_VERSION} && \
rm -rf /var/lib/apt/lists/*; \
fi

RUN touch /etc/rubybashrc && \
if [ -n "$GCC_VERSION" ]; then \
echo "export CC=gcc-${GCC_VERSION}" >> /etc/rubybashrc; \
echo "export CXX=g++-${GCC_VERSION}" >> /etc/rubybashrc; \
echo "export AR=gcc-ar-${GCC_VERSION}" >> /etc/rubybashrc; \
echo "export CC_x86_64_unknown_linux_gnu=gcc-${GCC_VERSION}" >> /etc/rubybashrc; \
echo "export CXX_x86_64_unknown_linux_gnu=g++-${GCC_VERSION}" >> /etc/rubybashrc; \
echo "export CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=gcc-${GCC_VERSION}" >> /etc/rubybashrc; \
fi

COPY --from=protoc /opt/protoc/bin/protoc /usr/local/bin/protoc
COPY --from=protoc /opt/protoc/include /usr/local/include

Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/build-gems.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,15 @@ jobs:
matrix:
# TODO(cretz): Enable x64-mingw-ucrt if we can figure out Windows issue, see
# https://github.com/temporalio/sdk-ruby/issues/172
rubyPlatform: ["aarch64-linux", "aarch64-linux-musl", "x86_64-linux", "x86_64-linux-musl", "arm64-darwin", "x86_64-darwin"]
include:
- rubyPlatform: aarch64-linux
- rubyPlatform: aarch64-linux-musl
# aws-lc-rs fails to refuses to use GCC version included in image due to compiler bug
Comment thread
chris-olszewski marked this conversation as resolved.
Outdated
- rubyPlatform: x86_64-linux
gccVersion: "10"
- rubyPlatform: x86_64-linux-musl
- rubyPlatform: arm64-darwin
- rubyPlatform: x86_64-darwin
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
Expand Down Expand Up @@ -51,6 +59,7 @@ jobs:
docker build \
--platform linux/amd64 \
--build-arg BASE_IMAGE="rbsys/${{ matrix.rubyPlatform }}:${rb_sys_version}" \
--build-arg GCC_VERSION="${{ matrix.gccVersion || '' }}" \
--build-arg PROTOC_VERSION="${PROTOC_VERSION}" \
-t "$custom_image" \
-f ../.github/docker/rb-sys-protoc.Dockerfile \
Expand Down
Loading