Skip to content

Commit 2f198b5

Browse files
authored
Update Rust edition and cross-gem building (#305)
1 parent 5be2e52 commit 2f198b5

File tree

11 files changed

+414
-308
lines changed

11 files changed

+414
-308
lines changed

.github/workflows/build-gems.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,22 @@ jobs:
3030
working-directory: ./temporalio
3131
cache-version: v1-${{ matrix.rubyPlatform }}
3232

33+
# Cannot use oxidize-rb/actions/cross-gem because it has older Rust and we
34+
# need --mount-toolchains to get latest Rust, see
35+
# https://github.com/oxidize-rb/actions/issues/61
3336
- name: Cross compile gem
34-
uses: oxidize-rb/actions/cross-gem@v1
3537
id: cross-gem
36-
with:
37-
platform: ${{ matrix.rubyPlatform }}
38-
ruby-versions: "3.2,3.3,3.4"
39-
working-directory: ./temporalio
38+
working-directory: ./temporalio
39+
run: |
40+
bundle exec rb-sys-dock --platform ${{ matrix.rubyPlatform }} --ruby-versions "3.2,3.3,3.4" --mount-toolchains --build
41+
echo "gem-path=$(find pkg -name '*-${{ matrix.rubyPlatform }}.gem')" >> $GITHUB_OUTPUT
4042
4143
- name: Upload gem
4244
uses: actions/upload-artifact@v4
4345
with:
46+
if-no-files-found: error
4447
name: ${{ matrix.rubyPlatform }}-gem
45-
path: ${{ steps.cross-gem.outputs.gem-path }}
48+
path: ./temporalio/${{ steps.cross-gem.outputs.gem-path }}
4649

4750
build-source-gem:
4851
runs-on: ubuntu-latest
@@ -84,7 +87,11 @@ jobs:
8487
#
8588
# TODO(cretz): Enable windows-latest if we can figure out Windows issue, see
8689
# https://github.com/temporalio/sdk-ruby/issues/172
87-
os: [ubuntu-latest, macos-intel, macos-latest]
90+
#
91+
# TODO(cretz): macos-intel (macos-13) is not tested against because the GH runner for it
92+
# does not have updated certificates and it is not easy to update them, see
93+
# https://github.com/temporalio/sdk-ruby/issues/306
94+
os: [ubuntu-latest, macos-latest]
8895
rubyVersion: ["3.2", "3.3", "3.4"]
8996
# Container defaults to empty/none, but additional container for Alpine
9097
# added later
@@ -93,16 +100,13 @@ jobs:
93100
include:
94101
- os: ubuntu-latest
95102
rubyPlatform: x86_64-linux
96-
- os: macos-intel
97-
runsOn: macos-13
98-
rubyPlatform: x86_64-darwin
99103
- os: macos-latest
100104
rubyPlatform: arm64-darwin
101105
- os: ubuntu-latest
102106
rubyVersion: "3.3"
103107
container: alpine/git:latest
104108
rubyPlatform: x86_64-linux-musl
105-
runs-on: ${{ matrix.runsOn || matrix.os }}
109+
runs-on: ${{ matrix.os }}
106110
container: ${{ matrix.container }}
107111
steps:
108112
- name: Checkout repository

0 commit comments

Comments
 (0)