Merge pull request #237 from bytecodealliance/wasmtime-1401 #253
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Build gems | |
on: | |
workflow_dispatch: | |
push: | |
branches: ["main", "cross-gem/*", "pkg/*"] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ci-data: | |
runs-on: ubuntu-latest | |
outputs: | |
result: ${{ steps.fetch.outputs.result }} | |
steps: | |
- id: fetch | |
uses: oxidize-rb/actions/fetch-ci-data@v1 | |
with: | |
supported-ruby-platforms: | | |
exclude: [arm-linux] # no cranelift support yet | |
stable-ruby-versions: | | |
exclude: [head] | |
native: | |
name: Build native gems | |
needs: ci-data | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby-platform: ${{ fromJSON(needs.ci-data.outputs.result).supported-ruby-platforms }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1 | |
with: | |
ruby-version: "3.2" | |
bundler-cache: true | |
cargo-cache: true | |
cargo-vendor: true | |
cache-version: v2-${{ matrix.ruby-platform }} | |
- name: Set vars | |
id: vars | |
run: | | |
echo "rb-sys-version=$(bundle exec ruby -rrb_sys -e 'puts RbSys::VERSION')" >> $GITHUB_OUTPUT | |
- uses: oxidize-rb/cross-gem-action@main | |
with: | |
version: ${{ steps.vars.outputs.rb-sys-version }} | |
platform: ${{ matrix.ruby-platform }} | |
ruby-versions: ${{ join(fromJSON(needs.ci-data.outputs.result).stable-ruby-versions, ', ') }} | |
- name: Smoke gem install | |
if: matrix.ruby-platform == 'x86_64-linux' # GitHub actions architecture | |
run: bundle exec rake pkg:${{ matrix.ruby-platform }}:test | |
source: | |
name: Build source gem | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: ["ubuntu-latest"] | |
ruby: ["3.2"] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true | |
cargo-cache: false | |
cache-version: v2 | |
- name: Smoke test gem install | |
shell: bash | |
run: bundle exec rake pkg:ruby:test |