✨ Migration of MLIR project to the MQT Core project #1
This file contains 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: MLIR Workflow | |
on: | |
push: | |
paths: | |
- 'mlir/**' | |
pull_request: | |
paths: | |
- 'mlir/**' | |
jobs: | |
change-detection: | |
name: 🔍 Change | |
uses: cda-tum/mqt-workflows/.github/workflows/reusable-change-detection.yml@v1.7 | |
cpp-tests: | |
name: 🇨 Test | |
needs: change-detection | |
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) | |
uses: cda-tum/mqt-workflows/.github/workflows/reusable-cpp-ci.yml@v1.7 | |
with: | |
# Runs to enable | |
enable-ubuntu2404-gcc-release: true | |
enable-ubuntu2404-arm-gcc-release: true | |
# Runs to disable | |
enable-ubuntu2404-gcc-debug: false | |
enable-ubuntu2404-clang-release: false | |
enable-ubuntu2404-clang-debug: false | |
enable-ubuntu2404-arm-gcc-debug: false | |
enable-ubuntu2404-arm-clang-release: false | |
enable-ubuntu2404-arm-clang-debug: false | |
# General settings | |
cmake-args-macos: -DMQT_CORE_WITH_GMP=ON | |
# run extensive C++ tests whenever this is on a PR and the PR has the `extensive-cpp-ci` label | |
cpp-tests-extensive: | |
name: 🇨 Test (Extensive) | |
needs: change-detection | |
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci') | |
uses: cda-tum/mqt-workflows/.github/workflows/reusable-cpp-ci.yml@v1.7 | |
with: | |
# Runs to enable | |
enable-ubuntu2404-gcc-debug: true | |
enable-ubuntu2404-clang-release: true | |
enable-ubuntu2404-clang-debug: true | |
enable-ubuntu2404-arm-gcc-debug: true | |
enable-ubuntu2404-arm-clang-release: true | |
enable-ubuntu2404-arm-clang-debug: true | |
# Runs to disable (these are already enabled in the non-extensive run) | |
enable-ubuntu2404-gcc-release: false | |
enable-ubuntu2404-arm-gcc-release: false | |
# General settings | |
cmake-args-macos: -DMQT_CORE_WITH_GMP=ON | |
cpp-test-mlir: | |
name: 🇨 Test MLIR | |
needs: change-detection | |
# Question: should the parameter in the parentheses be something like *.run-mlir-tests? | |
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) | |
uses: cda-tum/mqt-workflows/.github/workflows/reusable-cpp-ci.yml@v1.7 | |
with: | |
# Runs to enable | |
enable-ubuntu2404-gcc-debug: true | |
enable-ubuntu2404-gcc-release: true | |
enable-ubuntu2404-clang-debug: true | |
enable-ubuntu2404-clang-release: true | |
enable-ubuntu2404-arm-gcc-debug: true | |
enable-ubuntu2404-arm-gcc-release: true | |
enable-ubuntu2404-arm-clang-debug: true | |
enable-ubuntu2404-arm-clang-release: true | |
# General settings | |
cmake-args: -DBUILD_MQT_CORE_MLIR=ON | |
cpp-coverage: | |
name: 🇨 Coverage | |
needs: change-detection | |
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) | |
uses: cda-tum/mqt-workflows/.github/workflows/reusable-cpp-coverage.yml@v1.7 | |
cpp-linter: | |
name: 🇨 Lint | |
needs: change-detection | |
if: fromJSON(needs.change-detection.outputs.run-cpp-linter) | |
uses: cda-tum/mqt-workflows/.github/workflows/reusable-cpp-linter.yml@v1.7 | |
with: | |
cmake-args: -DBUILD_MQT_CORE_BENCHMARKS=ON | |
python-tests: | |
name: 🐍 Test | |
needs: change-detection | |
if: fromJSON(needs.change-detection.outputs.run-python-tests) | |
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-ci.yml@v1.7 | |
with: | |
# Runs to enable | |
enable-ubuntu2404: true | |
enable-ubuntu2404-arm: true | |
python-linter: | |
name: 🐍 Lint | |
needs: change-detection | |
if: fromJSON(needs.change-detection.outputs.run-python-tests) | |
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-linter.yml@v1.7 | |
code-ql: | |
name: 📝 CodeQL | |
needs: change-detection | |
if: fromJSON(needs.change-detection.outputs.run-code-ql) | |
uses: cda-tum/mqt-workflows/.github/workflows/reusable-code-ql.yml@v1.7 | |
cd: | |
name: 🚀 CD | |
needs: change-detection | |
if: fromJSON(needs.change-detection.outputs.run-cd) | |
uses: cda-tum/mqt-workflows/.github/workflows/reusable-python-packaging.yml@v1.7 | |
required-checks-pass: # This job does nothing and is only used for branch protection | |
name: 🚦 Check | |
if: always() | |
needs: | |
- change-detection | |
- cpp-tests | |
- cpp-tests-extensive | |
- cpp-coverage | |
- cpp-linter | |
- python-tests | |
- python-linter | |
- code-ql | |
- cd | |
runs-on: ubuntu-latest | |
steps: | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
allowed-skips: >- | |
${{ | |
fromJSON(needs.change-detection.outputs.run-cpp-tests) | |
&& '' || 'cpp-tests,' | |
}} | |
${{ | |
fromJSON(needs.change-detection.outputs.run-cpp-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-cpp-ci') | |
&& '' || 'cpp-tests-extensive,' | |
}} | |
${{ | |
fromJSON(needs.change-detection.outputs.run-cpp-tests) | |
&& '' || 'cpp-coverage,' | |
}} | |
${{ | |
fromJSON(needs.change-detection.outputs.run-cpp-linter) | |
&& '' || 'cpp-linter,' | |
}} | |
${{ | |
fromJSON(needs.change-detection.outputs.run-python-tests) | |
&& '' || 'python-tests,' | |
}} | |
${{ | |
fromJSON(needs.change-detection.outputs.run-python-tests) && github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'extensive-python-ci') | |
&& '' || 'python-tests-extensive,' | |
}} | |
${{ | |
fromJSON(needs.change-detection.outputs.run-python-tests) | |
&& '' || 'python-linter,' | |
}} | |
${{ | |
fromJSON(needs.change-detection.outputs.run-code-ql) | |
&& '' || 'code-ql,' | |
}} | |
${{ | |
fromJSON(needs.change-detection.outputs.run-cd) | |
&& '' || 'cd,' | |
}} | |
jobs: ${{ toJSON(needs) }} |