⬆️🔒️ Lock file maintenance #75
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: | |
| 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: Test installer script for version ${{ matrix.version }} on ${{ matrix.os }}${{ matrix.debug && ' (debug)' || '' }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| [ | |
| ubuntu-24.04, | |
| ubuntu-24.04-arm, | |
| macos-14, | |
| macos-15-intel, | |
| windows-2022, | |
| windows-11-arm, | |
| ] | |
| version: ["21.1.8", "f8cb798"] | |
| debug: [false] | |
| include: | |
| - os: windows-2022 | |
| version: "21.1.8" | |
| debug: true | |
| - os: windows-11-arm | |
| version: "21.1.8" | |
| debug: true | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Test installer script (Bash) | |
| if: runner.os != 'Windows' | |
| shell: bash | |
| run: | | |
| installation/setup-mlir.sh -v ${{ matrix.version }} -p /tmp/mlir-install -t ${{ github.token }} | |
| # Verify installation | |
| if [ ! -d "/tmp/mlir-install/bin" ]; then | |
| echo "Error: bin directory not found" | |
| exit 1 | |
| fi | |
| if [ ! -d "/tmp/mlir-install/lib/cmake/llvm" ]; then | |
| echo "Error: LLVM cmake directory not found" | |
| exit 1 | |
| fi | |
| if [ ! -d "/tmp/mlir-install/lib/cmake/mlir" ]; then | |
| echo "Error: MLIR cmake directory not found" | |
| exit 1 | |
| fi | |
| # Verify binaries exist | |
| export PATH="/tmp/mlir-install/bin:$PATH" | |
| if ! command -v mlir-opt &> /dev/null; then | |
| echo "Error: mlir-opt not found in PATH" | |
| exit 1 | |
| fi | |
| # Test that mlir-opt runs | |
| mlir-opt --version | |
| echo "Installation test passed!" | |
| - name: Test installer script (PowerShell) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $install_dir = Join-Path $env:TEMP "mlir-install" | |
| & installation/setup-mlir.ps1 -llvm_version ${{ matrix.version }} -install_prefix $install_dir -token ${{ github.token }} ${{ matrix.debug && '-use_debug' || '' }} | |
| # Verify installation | |
| if (-not (Test-Path "$install_dir\bin")) { | |
| Write-Error "bin directory not found" | |
| exit 1 | |
| } | |
| if (-not (Test-Path "$install_dir\lib\cmake\llvm")) { | |
| Write-Error "LLVM cmake directory not found" | |
| exit 1 | |
| } | |
| if (-not (Test-Path "$install_dir\lib\cmake\mlir")) { | |
| Write-Error "MLIR cmake directory not found" | |
| exit 1 | |
| } | |
| # Verify binaries exist | |
| $env:Path = "$install_dir\bin;$env:Path" | |
| if (-not (Get-Command mlir-opt -ErrorAction SilentlyContinue)) { | |
| Write-Error "mlir-opt not found in PATH" | |
| exit 1 | |
| } | |
| # Test that mlir-opt runs | |
| mlir-opt --version | |
| Write-Host "Installation test passed!" | |
| 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-24.04, | |
| ubuntu-24.04-arm, | |
| macos-14, | |
| macos-15-intel, | |
| windows-2022, | |
| windows-11-arm, | |
| ] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version: 24 | |
| cache: npm | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Run integration tests with coverage | |
| run: npm run test:coverage | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2 | |
| 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-latest | |
| steps: | |
| - name: Decide whether the needed jobs succeeded or failed | |
| uses: re-actors/alls-green@05ac9388f0aebcb5727afa17fcccfecd6f8ec5fe # v1.2.2 | |
| with: | |
| jobs: ${{ toJSON(needs) }} |