-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
## Description This updates the project to the latest best practices within the MQT. ## Checklist: <!--- This checklist serves as a reminder of a couple of things that ensure your pull request will be merged swiftly. --> - [x] The pull request only contains commits that are related to it. - [x] I have added appropriate tests and documentation. - [x] I have made sure that all CI jobs on GitHub pass. - [x] The pull request introduces no new warnings and follows the project's style guidelines.
- Loading branch information
1 parent
670040c
commit bdc503b
Showing
13 changed files
with
174 additions
and
106 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,31 +14,29 @@ concurrency: | |
jobs: | ||
change-detection: | ||
name: 🔍 Change | ||
uses: cda-tum/mqt-core/.github/workflows/reusable-change-detection.yml@v2.2.2 | ||
uses: cda-tum/mqt-workflows/.github/workflows/reusable-change-detection.yml@v1.1.4 | ||
|
||
cpp-tests: | ||
name: 🇨 Test | ||
needs: change-detection | ||
if: fromJSON(needs.change-detection.outputs.run-cpp-tests) | ||
uses: cda-tum/mqt-core/.github/workflows/[email protected] | ||
secrets: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
uses: cda-tum/mqt-workflows/.github/workflows/[email protected] | ||
with: | ||
setup-z3: true | ||
|
||
cpp-linter: | ||
name: 🇨 Lint | ||
needs: change-detection | ||
if: fromJSON(needs.change-detection.outputs.run-cpp-linter) | ||
uses: cda-tum/mqt-core/.github/workflows/reusable-cpp-linter.yml@v2.2.2 | ||
uses: cda-tum/mqt-workflows/.github/workflows/reusable-cpp-linter.yml@v1.1.4 | ||
with: | ||
setup-z3: true | ||
|
||
code-ql: | ||
name: 📝 CodeQL | ||
needs: change-detection | ||
if: fromJSON(needs.change-detection.outputs.run-code-ql) | ||
uses: cda-tum/mqt-core/.github/workflows/reusable-code-ql.yml@main | ||
uses: cda-tum/mqt-workflows/.github/workflows/reusable-code-ql.yml@v1.1.4 | ||
with: | ||
setup-z3: true | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Update MQT Core | ||
on: | ||
schedule: | ||
# run once a month on the first day of the month at 00:00 UTC | ||
- cron: "0 0 1 * *" | ||
workflow_dispatch: | ||
inputs: | ||
update-to-head: | ||
description: "Update to the latest commit on the default branch" | ||
type: boolean | ||
required: false | ||
default: false | ||
pull_request: | ||
paths: | ||
- .github/workflows/update-mqt-core.yml | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
update-mqt-core: | ||
name: ⬆️ Update MQT Core | ||
uses: cda-tum/mqt-workflows/.github/workflows/[email protected] | ||
with: | ||
update-to-head: ${{ fromJSON(github.event.inputs.update-to-head) || false }} |
This file was deleted.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Declare all external dependencies and make sure that they are available. | ||
|
||
include(FetchContent) | ||
set(FETCH_PACKAGES "") | ||
|
||
# search for Z3 | ||
find_package(Z3 REQUIRED) | ||
|
||
if(BUILD_MQT_QUSAT_BINDINGS) | ||
if(NOT SKBUILD) | ||
# Manually detect the installed pybind11 package. | ||
execute_process( | ||
COMMAND "${Python_EXECUTABLE}" -m pybind11 --cmakedir | ||
OUTPUT_STRIP_TRAILING_WHITESPACE | ||
OUTPUT_VARIABLE pybind11_DIR) | ||
|
||
# Add the detected directory to the CMake prefix path. | ||
list(APPEND CMAKE_PREFIX_PATH "${pybind11_DIR}") | ||
endif() | ||
|
||
# add pybind11 library | ||
find_package(pybind11 CONFIG REQUIRED) | ||
endif() | ||
|
||
# cmake-format: off | ||
set(MQT_CORE_VERSION 2.5.1 | ||
CACHE STRING "MQT Core version") | ||
set(MQT_CORE_REV "35e06ca3067ca3cf36bda1f0c38edf5bd7456fb6" | ||
CACHE STRING "MQT Core identifier (tag, branch or commit hash)") | ||
set(MQT_CORE_REPO_OWNER "cda-tum" | ||
CACHE STRING "MQT Core repository owner (change when using a fork)") | ||
# cmake-format: on | ||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24) | ||
FetchContent_Declare( | ||
mqt-core | ||
GIT_REPOSITORY https://github.com/${MQT_CORE_REPO_OWNER}/mqt-core.git | ||
GIT_TAG ${MQT_CORE_REV} | ||
FIND_PACKAGE_ARGS ${MQT_CORE_VERSION}) | ||
list(APPEND FETCH_PACKAGES mqt-core) | ||
else() | ||
find_package(mqt-core ${MQT_CORE_VERSION} QUIET) | ||
if(NOT mqt-core_FOUND) | ||
FetchContent_Declare( | ||
mqt-core | ||
GIT_REPOSITORY https://github.com/${MQT_CORE_REPO_OWNER}/mqt-core.git | ||
GIT_TAG ${MQT_CORE_REV}) | ||
list(APPEND FETCH_PACKAGES mqt-core) | ||
endif() | ||
endif() | ||
|
||
if(BUILD_MQT_QUSAT_TESTS) | ||
set(gtest_force_shared_crt | ||
ON | ||
CACHE BOOL "" FORCE) | ||
set(GTEST_VERSION | ||
1.14.0 | ||
CACHE STRING "Google Test version") | ||
set(GTEST_URL https://github.com/google/googletest/archive/refs/tags/v${GTEST_VERSION}.tar.gz) | ||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24) | ||
FetchContent_Declare(googletest URL ${GTEST_URL} FIND_PACKAGE_ARGS ${GTEST_VERSION} NAMES GTest) | ||
list(APPEND FETCH_PACKAGES googletest) | ||
else() | ||
find_package(googletest ${GTEST_VERSION} QUIET NAMES GTest) | ||
if(NOT googletest_FOUND) | ||
FetchContent_Declare(googletest URL ${GTEST_URL}) | ||
list(APPEND FETCH_PACKAGES googletest) | ||
endif() | ||
endif() | ||
endif() | ||
|
||
if(BUILD_MQT_QUSAT_BINDINGS) | ||
# add pybind11_json library | ||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.24) | ||
FetchContent_Declare( | ||
pybind11_json | ||
GIT_REPOSITORY https://github.com/pybind/pybind11_json | ||
FIND_PACKAGE_ARGS) | ||
list(APPEND FETCH_PACKAGES pybind11_json) | ||
else() | ||
find_package(pybind11_json QUIET) | ||
if(NOT pybind11_json_FOUND) | ||
FetchContent_Declare(pybind11_json GIT_REPOSITORY https://github.com/pybind/pybind11_json) | ||
list(APPEND FETCH_PACKAGES pybind11_json) | ||
endif() | ||
endif() | ||
endif() | ||
|
||
# Make all declared dependencies available. | ||
FetchContent_MakeAvailable(${FETCH_PACKAGES}) |
Submodule mqt-core
deleted from
87f97a
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
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
Oops, something went wrong.