Implement broader testing across platforms. #214
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
| --- | |
| # Continuous Integration Workflow: Test case suite run + validation build check | |
| name: CI | |
| # Controls when the action will run. | |
| # Triggers the workflow on push or pull request events but only for the master branch | |
| on: | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| jobs: | |
| # Job: Unit test suite | |
| unit-tests: | |
| name: "Unit Tests" | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| ruby: ['3.0', '3.1', '3.2', '3.3'] | |
| exclude: | |
| # create sparse matrix to avoid pointless duplication | |
| - os: macos-latest | |
| ruby: '3.1' | |
| - os: macos-latest | |
| ruby: '3.2' | |
| - os: windows-latest | |
| ruby: '3.1' | |
| - os: windows-latest | |
| ruby: '3.2' | |
| steps: | |
| # Install Multilib (Linux only) | |
| - name: Install Multilib | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update -qq | |
| sudo apt-get install --assume-yes --quiet gcc-multilib | |
| # Add MinGW GCC to PATH (Windows only — MSYS2 is pre-installed on the runner) | |
| - name: Add GCC to PATH | |
| if: matrix.os == 'windows-latest' | |
| run: echo "C:\msys64\mingw64\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| # Checks out repository under $GITHUB_WORKSPACE | |
| - name: Checkout Latest Repo | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| # Setup Ruby | |
| - name: Setup Ruby | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: ${{ matrix.ruby }} | |
| # Install Ruby dependencies | |
| - name: Install Ruby Dependencies | |
| run: | | |
| gem install bundler | |
| bundle install | |
| # Run Tests | |
| - name: Run All Unit Tests | |
| env: | |
| NO_COLOR: ${{ matrix.os == 'windows-latest' && '1' || '' }} | |
| run: | | |
| cd test && rake ci |