Skip to content

Commit ad12590

Browse files
authored
Merge pull request #420 from bytecodealliance/update-cross-gem
Update cross-gem action
2 parents 6139a43 + f10e463 commit ad12590

File tree

5 files changed

+34
-37
lines changed

5 files changed

+34
-37
lines changed

.github/workflows/build-gems.yml

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,28 +40,25 @@ jobs:
4040
steps:
4141
- uses: actions/checkout@v4
4242

43-
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
43+
- uses: ruby/setup-ruby@v1
4444
with:
4545
ruby-version: "3.4"
46-
bundler-cache: true
47-
cargo-cache: true
48-
cargo-vendor: true
49-
cache-version: v2-${{ matrix.ruby-platform }}
50-
51-
- name: Set vars
52-
id: vars
53-
run: |
54-
echo "rb-sys-version=$(bundle exec ruby -rrb_sys -e 'puts RbSys::VERSION')" >> $GITHUB_OUTPUT
5546

56-
- uses: oxidize-rb/cross-gem-action@main
47+
- uses: oxidize-rb/actions/cross-gem@v1
48+
id: cross-gem
5749
with:
58-
version: ${{ steps.vars.outputs.rb-sys-version }}
5950
platform: ${{ matrix.ruby-platform }}
60-
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ', ') }}
51+
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ',') }}
52+
53+
- uses: actions/upload-artifact@v4
54+
with:
55+
name: cross-gem-${{ matrix.ruby-platform }}
56+
path: ${{ steps.cross-gem.outputs.gem-path }}
57+
if-no-files-found: error
6158

6259
- name: Smoke gem install
6360
if: matrix.ruby-platform == 'x86_64-linux' # GitHub actions architecture
64-
run: bundle exec rake pkg:${{ matrix.ruby-platform }}:test
61+
run: bundle install && bundle exec rake pkg:${{ matrix.ruby-platform }}:test
6562

6663
source:
6764
name: Build source gem

.github/workflows/release.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,21 @@ jobs:
4040
steps:
4141
- uses: actions/checkout@v4
4242

43-
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
43+
- uses: ruby/setup-ruby@v1
4444
with:
45-
ruby-version: "3.3"
46-
bundler-cache: true
47-
cargo-cache: true
48-
cargo-vendor: true
49-
cache-version: v1-${{ matrix.ruby-platform }}
45+
ruby-version: "3.4"
5046

51-
- uses: oxidize-rb/cross-gem-action@main
47+
- uses: oxidize-rb/actions/cross-gem@v1
48+
id: cross-gem
5249
with:
53-
version: latest
5450
platform: ${{ matrix.ruby-platform }}
55-
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ', ') }}
51+
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ',') }}
52+
53+
- uses: actions/upload-artifact@v4
54+
with:
55+
name: cross-gem-${{ matrix.ruby-platform }}
56+
path: pkg/*-${{ matrix.ruby-platform }}.gem
57+
if-no-files-found: error
5658

5759
- name: Smoke gem install
5860
if: matrix.ruby-platform == 'x86_64-linux' # GitHub actions architecture
@@ -71,18 +73,16 @@ jobs:
7173

7274
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1
7375
with:
74-
ruby-version: "3.3"
76+
ruby-version: "3.4"
7577
bundler-cache: true
7678
cargo-cache: true
7779
cache-version: v1
7880

79-
# It seems that v4 is not compatible with how artifacts are uploaded by
80-
# oxidize-rb/cross-gem-action. So this must stay as v3 until the issue
81-
# below is fixed.
82-
# See https://github.com/oxidize-rb/actions/issues/27, for more details.
83-
- uses: actions/download-artifact@v3
81+
- uses: actions/download-artifact@v4
8482
with:
85-
name: cross-gem
83+
pattern: cross-gem-*
84+
merge-multiple: true
85+
path: pkg/
8686

8787
- name: Package source gem
8888
run: bundle exec rake pkg:ruby

Cargo.lock

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: .
33
specs:
44
wasmtime (28.0.0)
5-
rb_sys (~> 0.9.107)
5+
rb_sys (~> 0.9.108)
66

77
GEM
88
remote: https://rubygems.org/
@@ -38,7 +38,7 @@ GEM
3838
rake (13.2.1)
3939
rake-compiler (1.2.9)
4040
rake
41-
rb_sys (0.9.107)
41+
rb_sys (0.9.108)
4242
regexp_parser (2.10.0)
4343
rspec (3.13.0)
4444
rspec-core (~> 3.13.0)

wasmtime.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,5 @@ Gem::Specification.new do |spec|
2929

3030
spec.rdoc_options += ["--exclude", "vendor"]
3131

32-
spec.add_dependency "rb_sys", "~> 0.9.107"
32+
spec.add_dependency "rb_sys", "~> 0.9.108"
3333
end

0 commit comments

Comments
 (0)