Test cross build #3
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: release | |
on: | |
workflow_dispatch: | |
# TODO: remove | |
push: | |
branches: | |
- rb-sys-updates | |
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: | |
# Windows builds seem to compile properly, so may be worth enabling | |
supported-ruby-platforms: | | |
exclude: | |
- x64-mingw32 | |
- x64-mingw-ucrt | |
release: | |
needs: ci-data | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: ${{ fromJSON(needs.ci-data.outputs.result).supported-ruby-platforms }} | |
runs-on: ubuntu-latest | |
name: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oxidize-rb/actions/setup-ruby-and-rust@v1 | |
with: | |
ruby-version: 3.3 | |
bundler-cache: true | |
cargo-cache: true | |
- run: | | |
cargo install --locked --git https://github.com/ankane/cargo-3pl | |
git clone https://github.com/ankane/3pl-source.git | |
rust_target="$(bundle exec ruby -rrb_sys -e 'puts RbSys::ToolchainInfo.new("${{ matrix.platform }}").rust_target')" | |
cargo 3pl --target $rust_target --require-files --source 3pl-source > LICENSE-THIRD-PARTY.txt | |
- uses: oxidize-rb/actions/cross-gem@v1 | |
id: cross-gem | |
with: | |
platform: ${{ matrix.platform }} | |
ruby-versions: "3.3,3.2,3.1" | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: cross-gem | |
path: ${{ steps.cross-gem.outputs.gem-path }} |