Fix macro error handling (#811) #2746
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: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - run: cargo build --all-features | |
| unit_test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - ubuntu-24.04 | |
| - ubuntu-24.04-arm | |
| - macos-15 | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - run: cargo test --all-features | |
| sanitize: | |
| if: github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| env: | |
| RUSTFLAGS: -Zsanitizer=address | |
| RUSTDOCFLAGS: -Zsanitizer=address | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - run: sed -i s/stable/nightly/ rust-toolchain.toml | |
| # TODO Make sanitized tests succeed. | |
| - run: cargo test -Zbuild-std --target x86_64-unknown-linux-gnu | |
| continue-on-error: true | |
| bench: | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - run: cargo bench | |
| dialect_build: | |
| # TODO Remove this job when refactoring of dialect macros is done. | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: ./.github/actions/setup | |
| - run: cargo install cargo-expand | |
| - run: cd melior && cargo expand --all-features dialect::ods > ~/current.rs | |
| - uses: actions/checkout@v6 | |
| with: | |
| ref: main | |
| - run: cd melior && cargo expand --all-features dialect::ods > ~/main.rs | |
| - run: diff ~/main.rs ~/current.rs | |
| - uses: actions/checkout@v6 | |
| test: | |
| needs: | |
| - build | |
| - unit_test | |
| - bench | |
| - dialect_build | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: for result in ${{ join(needs.*.result, ' ') }}; do [ $result = success ]; done |