Repository navigation
⬆️🪝 Update pre-commit hook rbubley/mirrors-prettier to v3.9.10 (#285) #694
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: | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-installer-scripts: | |
| name: Installer ${{ matrix.version }} (assertions=${{ matrix.assertions }}) on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| [ | |
| ubuntu-26.04, | |
| ubuntu-26.04-arm, | |
| macos-26, | |
| windows-2025, | |
| windows-11-arm, | |
| ] | |
| version: ["23.1.2"] | |
| assertions: ["ON", "OFF"] | |
| include: | |
| - os: ubuntu-26.04 | |
| version: "21.1.8" | |
| assertions: "ON" | |
| - os: windows-2025 | |
| version: "22.1.8" | |
| assertions: "ON" | |
| - os: macos-26 | |
| version: "f8cb798" | |
| assertions: "ON" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Test installer script (Bash) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| installer=installation/setup-mlir.sh | |
| if [[ '${{ matrix.version }}' != 23.1.2 ]]; then | |
| cp "$installer" /tmp/setup-mlir.sh | |
| installer=/tmp/setup-mlir.sh | |
| fi | |
| bash "$installer" -v ${{ matrix.version }} -p /tmp/mlir-install -a ${{ matrix.assertions }} | |
| grep -F "set(LLVM_ENABLE_ASSERTIONS ${{ matrix.assertions }})" /tmp/mlir-install/lib/cmake/llvm/LLVMConfig.cmake | |
| test -f /tmp/mlir-install/lib/cmake/mlir/MLIRConfig.cmake | |
| /tmp/mlir-install/bin/mlir-opt --version | |
| - name: Test installer script (PowerShell) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $install_dir = Join-Path $env:TEMP "mlir-install" | |
| $installer = "installation/setup-mlir.ps1" | |
| if ('${{ matrix.version }}' -ne '23.1.2') { | |
| $installer = Join-Path $env:TEMP "setup-mlir.ps1" | |
| Copy-Item installation/setup-mlir.ps1 $installer | |
| } | |
| & $installer -llvm_version ${{ matrix.version }} -install_prefix $install_dir -no_assertions:('${{ matrix.assertions }}' -eq 'OFF') | |
| if (-not (Select-String -Path "$install_dir/lib/cmake/llvm/LLVMConfig.cmake" -SimpleMatch "set(LLVM_ENABLE_ASSERTIONS ${{ matrix.assertions }})")) { | |
| throw "Installed LLVM assertion mode does not match" | |
| } | |
| if (-not (Test-Path "$install_dir/lib/cmake/mlir/MLIRConfig.cmake")) { | |
| throw "MLIR CMake configuration not found" | |
| } | |
| & "$install_dir/bin/mlir-opt.exe" --version | |
| integration-tests: | |
| name: Integration tests with coverage on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| id-token: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| [ | |
| ubuntu-26.04, | |
| ubuntu-26.04-arm, | |
| macos-26, | |
| windows-2025, | |
| windows-11-arm, | |
| ] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup Node.js | |
| uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run integration tests with coverage | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| run: npm run test:coverage | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@303a32d7a59b442fa8d48b6a1cc6825c09c847a5 # v7.1.1 | |
| with: | |
| files: ./coverage/lcov.info | |
| flags: integration-${{ matrix.os }} | |
| name: integration-${{ matrix.os }} | |
| use_oidc: true | |
| # This job does nothing and is only used for branch protection | |
| required-checks-pass: | |
| name: 🚦 Check | |
| if: always() | |
| needs: | |
| - test-installer-scripts | |
| - integration-tests | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@b5b5b37504aa4183270bd3d855c52a67f212be35 # v1.3.0 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |