feat: add windows arm support #26
Workflow file for this run
This file contains hidden or 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: test | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}' | |
| cancel-in-progress: true | |
| env: | |
| BUNDLER_VER: latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| build: | |
| name: Build gems | |
| uses: ./.github/workflows/gem-build.yml | |
| prepare: | |
| name: Prepare test matrix | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - id: set-matrix | |
| run: | | |
| # Read platforms.json and generate test matrix | |
| # For each platform where test=true, create entries for each test_os and ruby version | |
| # Use test_ruby_versions if specified, otherwise use default versions | |
| MATRIX=$(jq -c '{ | |
| include: [ | |
| .platforms | |
| | to_entries[] | |
| | .value[] | |
| | select(.test == true) | |
| | .test_os as $test_os | |
| | .platform as $platform | |
| | (.test_ruby_versions // ["3.1", "3.2", "3.3", "3.4", "4.0"]) as $ruby_versions | |
| | $test_os[] | |
| | . as $os | |
| | $ruby_versions[] | |
| | {os: $os, platform: $platform, ruby: .} | |
| ] | |
| }' .github/platforms.json) | |
| echo "matrix=$MATRIX" >> $GITHUB_OUTPUT | |
| test: | |
| needs: [build, prepare] | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| bundler: ${{ env.BUNDLER_VER }} | |
| bundler-cache: true | |
| - uses: actions/download-artifact@v7 | |
| with: | |
| name: lib-${{ github.run_number }}-${{ matrix.platform }} | |
| path: lib/ffi-libarchive-binary | |
| - run: bundle exec rspec |