diff --git a/.github/workflows/Dockerfile.alpine b/.github/workflows/Dockerfile.alpine index 852dba7c75..44af99958f 100644 --- a/.github/workflows/Dockerfile.alpine +++ b/.github/workflows/Dockerfile.alpine @@ -47,6 +47,7 @@ ARG packages="" RUN apk add --no-cache \ bash \ + ccache \ cmake \ make \ gcc \ @@ -69,12 +70,17 @@ RUN apk add --no-cache \ # Build Storm ############# +ENV CCACHE_DIR=/root/.ccache RUN mkdir /opt/storm WORKDIR /opt/storm # Copy the content of the current local Storm repository into the Docker image COPY . . +# Seed ccache from the workflow cache directory if available. +RUN mkdir -p "$CCACHE_DIR" && \ + if [ -d "/opt/storm/.ci-ccache" ]; then cp -a /opt/storm/.ci-ccache/. "$CCACHE_DIR"/; fi + # Switch to build directory RUN mkdir -p /opt/storm/build WORKDIR /opt/storm/build @@ -102,6 +108,6 @@ RUN cmake -DCMAKE_BUILD_TYPE=$build_type \ # Build Storm # (This can be adapted to only build 'storm' or 'binaries' depending on custom needs) -RUN make -j $no_threads +RUN ccache --max-size=3G && ccache --zero-stats && make -j $no_threads && ccache --show-stats --verbose WORKDIR /opt/storm diff --git a/.github/workflows/Dockerfile.archlinux b/.github/workflows/Dockerfile.archlinux index d35f1a7e82..e3e5228a86 100644 --- a/.github/workflows/Dockerfile.archlinux +++ b/.github/workflows/Dockerfile.archlinux @@ -51,6 +51,7 @@ ARG packages="" RUN pacman -Syu --noconfirm # Updates needed as Archlinux is rolling release RUN pacman -S --noconfirm \ base-devel \ + ccache \ cmake \ git \ boost \ @@ -67,39 +68,44 @@ RUN pacman -S --noconfirm \ # Build Storm ############# +ENV CCACHE_DIR=/root/.ccache RUN mkdir /opt/storm WORKDIR /opt/storm # Copy the content of the current local Storm repository into the Docker image COPY . . +# Seed ccache from the workflow cache directory if available. +RUN mkdir -p "$CCACHE_DIR" && \ + if [ -d "/opt/storm/.ci-ccache" ]; then cp -a /opt/storm/.ci-ccache/. "$CCACHE_DIR"/; fi + # Switch to build directory RUN mkdir -p /opt/storm/build WORKDIR /opt/storm/build # Configure Storm RUN cmake -DCMAKE_BUILD_TYPE=$build_type \ - -DSTORM_PORTABLE=ON \ - -DSTORM_CARL_GIT_TAG=$carl_tag \ - -DSTORM_DISABLE_CUDD=$disable_cudd \ - -DSTORM_DISABLE_GLPK=$disable_glpk \ - -DSTORM_DISABLE_GMM=$disable_gmm \ - -DSTORM_DISABLE_GUROBI=$disable_gurobi \ - -DSTORM_DISABLE_LIBARCHIVE=$disable_libarchive \ - -DSTORM_DISABLE_MATHSAT=$disable_mathsat \ - -DSTORM_DISABLE_SOPLEX=$disable_soplex \ - -DSTORM_DISABLE_SPOT=$disable_spot \ - -DSTORM_DISABLE_SYLVAN=$disable_sylvan \ - -DSTORM_DISABLE_XERCES=$disable_xerces \ - -DSTORM_DISABLE_Z3=$disable_z3 \ - -DSTORM_DEVELOPER=$developer \ - -DSTORM_USE_CLN_EA=$cln_exact \ - -DSTORM_USE_CLN_RF=$cln_ratfunc \ - -DSTORM_COMPILE_WITH_ALL_SANITIZERS=$all_sanitizers \ - $cmake_args .. + -DSTORM_PORTABLE=ON \ + -DSTORM_CARL_GIT_TAG=$carl_tag \ + -DSTORM_DISABLE_CUDD=$disable_cudd \ + -DSTORM_DISABLE_GLPK=$disable_glpk \ + -DSTORM_DISABLE_GMM=$disable_gmm \ + -DSTORM_DISABLE_GUROBI=$disable_gurobi \ + -DSTORM_DISABLE_LIBARCHIVE=$disable_libarchive \ + -DSTORM_DISABLE_MATHSAT=$disable_mathsat \ + -DSTORM_DISABLE_SOPLEX=$disable_soplex \ + -DSTORM_DISABLE_SPOT=$disable_spot \ + -DSTORM_DISABLE_SYLVAN=$disable_sylvan \ + -DSTORM_DISABLE_XERCES=$disable_xerces \ + -DSTORM_DISABLE_Z3=$disable_z3 \ + -DSTORM_DEVELOPER=$developer \ + -DSTORM_USE_CLN_EA=$cln_exact \ + -DSTORM_USE_CLN_RF=$cln_ratfunc \ + -DSTORM_COMPILE_WITH_ALL_SANITIZERS=$all_sanitizers \ + $cmake_args .. # Build Storm # (This can be adapted to only build 'storm' or 'binaries' depending on custom needs) -RUN make -j $no_threads +RUN ccache --max-size=3G && ccache --zero-stats && make -j $no_threads && ccache --show-stats --verbose WORKDIR /opt/storm diff --git a/.github/workflows/buildtest.yml b/.github/workflows/buildtest.yml index 1d9df9a0f2..3f1a5ce838 100644 --- a/.github/workflows/buildtest.yml +++ b/.github/workflows/buildtest.yml @@ -10,15 +10,8 @@ on: workflow_dispatch: pull_request: -env: - # GitHub runners currently have 4 cores - NR_JOBS: "4" - jobs: - # Perform in-depth tests with different configurations indepthTests: - name: Indepth Tests (${{ matrix.config.name }}, ${{ matrix.config.buildType }}) - runs-on: ubuntu-latest strategy: matrix: config: @@ -122,199 +115,81 @@ jobs: AllSanitizers: "OFF", cmakeArgs: "-DSTORM_WARNING_AS_ERROR=ON" } - steps: - - name: Git clone - uses: actions/checkout@v6 - - name: Build storm from Dockerfile - run: | - docker build -t movesrwth/storm:ci . \ - --build-arg BASE_IMAGE=movesrwth/${{ matrix.config.baseImg }} \ - --build-arg build_type="${{ matrix.config.buildType }}" \ - --build-arg carl_tag="master" \ - --build-arg disable_cudd="${{ matrix.config.disable_cudd }}" \ - --build-arg disable_glpk="${{ matrix.config.disable_glpk }}" \ - --build-arg disable_gmm="${{ matrix.config.disable_gmm }}" \ - --build-arg disable_gurobi="${{ matrix.config.disable_gurobi }}" \ - --build-arg disable_libarchive="${{ matrix.config.disable_libarchive }}" \ - --build-arg disable_mathsat="${{ matrix.config.disable_mathsat }}" \ - --build-arg disable_soplex="${{ matrix.config.disable_soplex }}" \ - --build-arg disable_spot="${{ matrix.config.disable_spot }}" \ - --build-arg disable_sylvan="${{ matrix.config.disable_sylvan }}" \ - --build-arg disable_xerces="${{ matrix.config.disable_xerces }}" \ - --build-arg disable_z3="${{ matrix.config.disable_z3 }}" \ - --build-arg developer="${{ matrix.config.Developer }}" \ - --build-arg cln_exact="${{ matrix.config.ClnExact }}" \ - --build-arg cln_ratfunc="${{ matrix.config.ClnRatfunc }}" \ - --build-arg all_sanitizers="${{ matrix.config.AllSanitizers }}" \ - --build-arg cmake_args="${{ matrix.config.cmakeArgs }}" \ - --build-arg no_threads=${NR_JOBS} - - name: Run Docker - run: docker run -d -it --name ci movesrwth/storm:ci - - name: Run storm - run: docker exec ci bash -c "/opt/storm/build/bin/storm --version" - - name: Check compile flags - uses: ./.github/actions/check-compile-flags-action - with: - buildType: ${{ matrix.config.buildType }} - docker: true - - name: Run tests - # Disabled sanitizer checks for now - #run: docker exec ci bash -c "cd /opt/storm/build; ASAN_OPTIONS=detect_leaks=0,detect_odr_violation=0 ctest test --output-on-failure" - run: docker exec ci bash -c "cd /opt/storm/build; ctest test --output-on-failure" - - name: Build starter-project - uses: ./.github/actions/starter-project-action - with: - docker: true - stormDir: "/opt/storm/build" - command: "--help" # TODO using --help as running the starter-project requires Z3. - - name: Install storm - run: docker exec ci bash -c "cd /opt/storm/build; make install" - - name: Remove build dir - run: | - docker exec ci bash -c "rm -rf /opt/storm/build" - - name: Run installed storm - run: | - docker exec ci bash -c "/usr/local/bin/storm --version" - - name: Build starter-project on installed Storm - uses: ./.github/actions/starter-project-action - with: - docker: true - stormDir: "" - command: "--help" # TODO using --help as running the starter-project requires Z3. + uses: ./.github/workflows/test-indepth.yml + with: + NR_JOBS: "4" + name: ${{ matrix.config.name }} + baseImg: ${{ matrix.config.baseImg }} + buildType: ${{ matrix.config.buildType }} + disable_cudd: ${{ matrix.config.disable_cudd }} + disable_glpk: ${{ matrix.config.disable_glpk }} + disable_gmm: ${{ matrix.config.disable_gmm }} + disable_gurobi: ${{ matrix.config.disable_gurobi }} + disable_libarchive: ${{ matrix.config.disable_libarchive }} + disable_mathsat: ${{ matrix.config.disable_mathsat }} + disable_soplex: ${{ matrix.config.disable_soplex }} + disable_spot: ${{ matrix.config.disable_spot }} + disable_sylvan: ${{ matrix.config.disable_sylvan }} + disable_xerces: ${{ matrix.config.disable_xerces }} + disable_z3: ${{ matrix.config.disable_z3 }} + Developer: ${{ matrix.config.Developer }} + ClnExact: ${{ matrix.config.ClnExact }} + ClnRatfunc: ${{ matrix.config.ClnRatfunc }} + AllSanitizers: ${{ matrix.config.AllSanitizers }} + cmakeArgs: ${{ matrix.config.cmakeArgs }} compilerTests: - # Build and run with different compilers (GCC, Clang) - # Run on latest Archlinux version to get most recent compiler versions - name: Compiler Tests (${{ matrix.config.name }} on ${{ matrix.config.distro }}, ${{ matrix.config.buildType }}) - runs-on: ubuntu-latest strategy: matrix: config: - - {name: "GCC", - buildType: "Debug", - Developer: "ON", - cmakeArgs: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DSTORM_WARNING_AS_ERROR=ON", - packages: "", - distro: "archlinux" + - { name: "GCC", + buildType: "Debug", + Developer: "ON", + cmakeArgs: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DSTORM_WARNING_AS_ERROR=ON", + packages: "", + distro: "archlinux" } - - {name: "Clang", - buildType: "Debug", - Developer: "ON", - cmakeArgs: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSTORM_WARNING_AS_ERROR=ON", - packages: "clang", - distro: "archlinux" + - { name: "Clang", + buildType: "Debug", + Developer: "ON", + cmakeArgs: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSTORM_WARNING_AS_ERROR=ON", + packages: "clang", + distro: "archlinux" } - - {name: "musl", - buildType: "Debug", - Developer: "ON", - cmakeArgs: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DSTORM_WARNING_AS_ERROR=ON", - packages: "", - distro: "alpine" + - { name: "musl", + buildType: "Debug", + Developer: "ON", + cmakeArgs: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DSTORM_WARNING_AS_ERROR=ON", + packages: "", + distro: "alpine" } - steps: - - name: Git clone - uses: actions/checkout@v6 - - name: Replace Dockerfile - run: cp .github/workflows/Dockerfile.${{ matrix.config.distro }} Dockerfile - - name: Build storm from Dockerfile - run: | - docker build -t movesrwth/storm:ci . \ - --build-arg build_type="${{ matrix.config.buildType }}" \ - --build-arg carl_tag="master" \ - --build-arg developer="${{ matrix.config.Developer }}" \ - --build-arg cmake_args="${{ matrix.config.cmakeArgs }}" \ - --build-arg packages="${{ matrix.config.packages }}" \ - --build-arg no_threads=${NR_JOBS} - # Omitting arguments disable_*, cln_exact, cln_ratfunc, all_sanitizers - - name: Run Docker - run: docker run -d -it --name ci movesrwth/storm:ci - - name: Run storm - run: docker exec ci bash -c "/opt/storm/build/bin/storm --version" - - name: Check compile flags - uses: ./.github/actions/check-compile-flags-action - with: - buildType: ${{ matrix.config.buildType }} - docker: true - - name: Run tests - run: docker exec ci bash -c "cd /opt/storm/build; ctest test --output-on-failure" - - name: Build starter-project - uses: ./.github/actions/starter-project-action - with: - docker: true - stormDir: "/opt/storm/build" - command: "/opt/storm/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" - - name: Install storm - run: docker exec ci bash -c "cd /opt/storm/build; make install" - - name: Remove build dir - run: | - docker exec ci bash -c "rm -rf /opt/storm/build" - - name: Run installed storm - run: | - docker exec ci bash -c "/usr/local/bin/storm --version" - - name: Build starter-project on installed Storm - uses: ./.github/actions/starter-project-action - with: - docker: true - stormDir: "" - command: "/opt/storm/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" + uses: ./.github/workflows/test-compiler.yml + with: + NR_JOBS: "4" + name: ${{ matrix.config.name }} + buildType: ${{ matrix.config.buildType }} + Developer: ${{ matrix.config.Developer }} + cmakeArgs: ${{ matrix.config.cmakeArgs }} + packages: ${{ matrix.config.packages }} + distro: ${{ matrix.config.distro }} linuxTests: - name: Linux Tests (${{ matrix.distro }}, ${{ matrix.buildType }}) on ${{ matrix.runner }} - runs-on: ${{ matrix.runner }} + uses: ./.github/workflows/test-linux.yml strategy: matrix: distro: ["debian-12", "ubuntu-24.04", "debian-13"] buildType: ["Release"] runner: [ubuntu-latest, ubuntu-24.04-arm] - steps: - - name: Git clone - uses: actions/checkout@v6 - - name: Build storm from Dockerfile - run: | - docker build -t movesrwth/storm:ci . \ - --build-arg BASE_IMAGE=movesrwth/storm-basesystem:${{ matrix.distro }} \ - --build-arg build_type="${{ matrix.buildType }}" \ - --build-arg carl_tag="master" \ - --build-arg no_threads=${NR_JOBS} \ - --build-arg cmake_args="-DSTORM_WARNING_AS_ERROR=ON" - # Omitting arguments developer, disable_*, cln_exact, cln_ratfunc, all_sanitizers - - name: Run Docker - run: docker run -d -it --name ci movesrwth/storm:ci - - name: Run storm - run: docker exec ci bash -c "/opt/storm/build/bin/storm --version" - - name: Check compile flags - uses: ./.github/actions/check-compile-flags-action - with: - buildType: ${{ matrix.buildType }} - docker: true - - name: Run tests - run: docker exec ci bash -c "cd /opt/storm/build; ctest test --output-on-failure" - - name: Build starter-project - uses: ./.github/actions/starter-project-action - with: - docker: true - stormDir: "/opt/storm/build" - command: "/opt/storm/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" - - name: Install storm - run: docker exec ci bash -c "cd /opt/storm/build; make install" - - name: Remove build dir - run: | - docker exec ci bash -c "rm -rf /opt/storm/build" - - name: Run installed storm - run: | - docker exec ci bash -c "/usr/local/bin/storm --version" - - name: Build starter-project on installed Storm - uses: ./.github/actions/starter-project-action - with: - docker: true - stormDir: "" - command: "/opt/storm/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" + with: + NR_JOBS: "4" + distro: ${{ matrix.distro }} + buildType: ${{ matrix.buildType }} + runner: ${{ matrix.runner }} macTests: - name: macOS Tests (${{ matrix.config.name }}, ${{ matrix.config.buildType }}) strategy: matrix: - config: + config: - {name: "MacOS 14, ARM", distro: "macos-14", xcode: "15.4", @@ -335,140 +210,41 @@ jobs: xcode: "latest-stable", buildType: "Debug" } - runs-on: ${{ matrix.config.distro }} - steps: - - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: ${{ matrix.config.xcode }} - - name: Git clone - uses: actions/checkout@v6 - - name: Install dependencies - # cmake and gmp are already installed - run: | - brew update - brew install automake boost cln ginac glpk hwloc libarchive xerces-c z3 - - name: Configure storm - run: | - mkdir build - cd build - cmake .. -DCMAKE_BUILD_TYPE="${{ matrix.config.buildType }}" -DSTORM_CARL_GIT_TAG="master" -DSTORM_WARNING_AS_ERROR=ON - - name: Build storm - working-directory: ./build - run: make -j ${NR_JOBS} - - name: Run storm (build tree) - working-directory: ./build - run: ./bin/storm - - name: Check compile flags - uses: ./.github/actions/check-compile-flags-action - with: - buildType: ${{ matrix.config.buildType }} - docker: false - - name: Run tests - working-directory: ./build - run: ctest test --output-on-failure - - name: Build starter-project - uses: ./.github/actions/starter-project-action - with: - docker: false - stormDir: "${GITHUB_WORKSPACE}/build" - command: "${GITHUB_WORKSPACE}/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" - - name: Install storm - working-directory: ./build - run: sudo make install - - name: Remove build dir - run: | - rm -rf ${GITHUB_WORKSPACE}/build - - name: Run installed storm - run: | - /usr/local/bin/storm --version - - name: Build starter-project on installed Storm - uses: ./.github/actions/starter-project-action - with: - docker: false - stormDir: "" - command: "${GITHUB_WORKSPACE}/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" + uses: ./.github/workflows/test-mac.yml + with: + NR_JOBS: "4" + name: ${{ matrix.config.name }} + distro: ${{ matrix.config.distro }} + xcode: ${{ matrix.config.xcode }} + buildType: ${{ matrix.config.buildType }} deploy: - name: Test and Deploy (${{ matrix.buildType.name }}) - runs-on: ubuntu-latest strategy: matrix: - buildType: - - {name: "Debug", - dockerTag: "ci-debug", - baseImg: "storm-dependencies:latest", - Developer: "ON", - cmakeArgs: "-DSTORM_WARNING_AS_ERROR=ON" + config: + - { buildType: "Debug", + dockerTag: "ci-debug", + baseImg: "storm-dependencies:latest", + Developer: "ON", + cmakeArgs: "-DSTORM_WARNING_AS_ERROR=ON" } - - {name: "Release", - dockerTag: "ci", - baseImg: "storm-dependencies:latest", - Developer: "OFF", - cmakeArgs: "-DSTORM_WARNING_AS_ERROR=ON" + - { buildType: "Release", + dockerTag: "ci", + baseImg: "storm-dependencies:latest", + Developer: "OFF", + cmakeArgs: "-DSTORM_WARNING_AS_ERROR=ON" } - steps: - - name: Git clone - uses: actions/checkout@v6 - - name: Git describe - id: ghd - uses: proudust/gh-describe@v3 - - name: Set static Storm version - run: echo "set(STORM_VERSION_COMMITS_AHEAD ${{ steps.ghd.outputs.distance }})" >> version.cmake - - name: Build storm from Dockerfile - run: | - docker build -t movesrwth/storm:${{ matrix.buildType.dockerTag }} . \ - --build-arg BASE_IMAGE=movesrwth/${{ matrix.buildType.baseImg }} \ - --build-arg build_type="${{ matrix.buildType.name }}" \ - --build-arg carl_tag="master" \ - --build-arg developer="${{ matrix.buildType.Developer }}" \ - --build-arg cmake_args="${{ matrix.buildType.cmakeArgs }}" \ - --build-arg no_threads=${NR_JOBS} - # Omitting arguments disable_*, cln_exact, cln_ratfunc, all_sanitizers - - name: Run Docker - run: docker run -d -it --name ci movesrwth/storm:${{ matrix.buildType.dockerTag }} - - name: Check compile flags - uses: ./.github/actions/check-compile-flags-action - with: - buildType: ${{ matrix.buildType.name }} - docker: true - - name: Run tests - run: docker exec ci bash -c "cd /opt/storm/build; ctest test --output-on-failure" - - name: Build starter-project - uses: ./.github/actions/starter-project-action - with: - docker: true - stormDir: "/opt/storm/build" - command: "/opt/storm/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" - - name: Install storm - run: docker exec ci bash -c "cd /opt/storm/build; make install" - - name: Temporarily move build dir - run: | - docker exec ci bash -c "mv /opt/storm/build /opt/storm/build-backup" - - name: Run installed storm - run: | - docker exec ci bash -c "/usr/local/bin/storm --version" - - name: Build starter-project on installed Storm - uses: ./.github/actions/starter-project-action - with: - docker: true - stormDir: "" - command: "/opt/storm/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" - - name: Restore build dir - run: | - docker exec ci bash -c "mv /opt/storm/build-backup /opt/storm/build" - - name: Login into docker - # Only login if using master on original repo (and not for pull requests or forks) - if: github.repository_owner == 'stormchecker' && github.ref == 'refs/heads/master' - uses: docker/login-action@v4 - with: - username: ${{ secrets.STORM_CI_DOCKER_USERNAME }} - password: ${{ secrets.STORM_CI_DOCKER_TOKEN }} - - name: Deploy storm - # Only deploy if using master on original repo (and not for pull requests or forks) - if: github.repository_owner == 'stormchecker' && github.ref == 'refs/heads/master' - run: | - docker commit ci movesrwth/storm:${{ matrix.buildType.dockerTag }} - docker push movesrwth/storm:${{ matrix.buildType.dockerTag }} + uses: ./.github/workflows/test-deploy.yml + with: + NR_JOBS: "4" + buildType: ${{ matrix.config.buildType }} + dockerTag: ${{ matrix.config.dockerTag }} + baseImg: ${{ matrix.config.baseImg }} + Developer: ${{ matrix.config.Developer }} + cmakeArgs: ${{ matrix.config.cmakeArgs }} + secrets: + STORM_CI_DOCKER_USERNAME: ${{ secrets.STORM_CI_DOCKER_USERNAME }} + STORM_CI_DOCKER_TOKEN: ${{ secrets.STORM_CI_DOCKER_TOKEN }} notify: name: Email notification diff --git a/.github/workflows/selfrun.yml b/.github/workflows/selfrun.yml new file mode 100644 index 0000000000..9aaac21c2a --- /dev/null +++ b/.github/workflows/selfrun.yml @@ -0,0 +1,184 @@ +name: PR Label Test Dispatcher + +on: + pull_request: + types: [labeled] + +# Labels: +# run-all-tests — run all test suites +# run-indepth-tests — run indepth tests only +# run-compiler-tests — run compiler tests only +# run-linux-tests — run linux tests only +# run-mac-tests — run mac tests only + +permissions: + pull-requests: write + +jobs: + indepthTests: + if: | + github.event.label.name == 'run-all-tests' || + github.event.label.name == 'run-indepth-tests' + strategy: + matrix: + config: + - {name: "GMP exact; GMP rational functions; All dependencies", + baseImg: "storm-dependencies:latest", + buildType: "Debug", + disable_cudd: "OFF", disable_glpk: "OFF", disable_gmm: "OFF", + disable_gurobi: "OFF", disable_libarchive: "OFF", disable_mathsat: "OFF", + disable_soplex: "OFF", disable_spot: "OFF", disable_sylvan: "OFF", + disable_xerces: "OFF", disable_z3: "OFF", + Developer: "ON", ClnExact: "OFF", ClnRatfunc: "OFF", AllSanitizers: "OFF", + cmakeArgs: "-DSTORM_WARNING_AS_ERROR=ON" + } + - {name: "CLN exact; GMP rational functions; All dependencies", + baseImg: "storm-dependencies:latest", + buildType: "Debug", + disable_cudd: "OFF", disable_glpk: "OFF", disable_gmm: "OFF", + disable_gurobi: "OFF", disable_libarchive: "OFF", disable_mathsat: "OFF", + disable_soplex: "OFF", disable_spot: "OFF", disable_sylvan: "OFF", + disable_xerces: "OFF", disable_z3: "OFF", + Developer: "ON", ClnExact: "ON", ClnRatfunc: "OFF", AllSanitizers: "OFF", + cmakeArgs: "-DSTORM_WARNING_AS_ERROR=ON" + } + - {name: "CLN exact; CLN rational functions; All dependencies", + baseImg: "storm-dependencies:latest", + buildType: "Debug", + disable_cudd: "OFF", disable_glpk: "OFF", disable_gmm: "OFF", + disable_gurobi: "OFF", disable_libarchive: "OFF", disable_mathsat: "OFF", + disable_soplex: "OFF", disable_spot: "OFF", disable_sylvan: "OFF", + disable_xerces: "OFF", disable_z3: "OFF", + Developer: "ON", ClnExact: "ON", ClnRatfunc: "ON", AllSanitizers: "OFF", + cmakeArgs: "-DSTORM_WARNING_AS_ERROR=ON" + } + - {name: "GMP exact; CLN rational functions; No dependencies", + baseImg: "storm-dependencies:latest", + buildType: "Debug", + disable_cudd: "ON", disable_glpk: "ON", disable_gmm: "ON", + disable_gurobi: "ON", disable_libarchive: "ON", disable_mathsat: "ON", + disable_soplex: "ON", disable_spot: "ON", disable_sylvan: "ON", + disable_xerces: "ON", disable_z3: "ON", + Developer: "ON", ClnExact: "OFF", ClnRatfunc: "ON", AllSanitizers: "OFF", + cmakeArgs: "-DSTORM_WARNING_AS_ERROR=ON" + } + - {name: "Minimal dependencies (without CLN)", + baseImg: "storm-basesystem:minimal_dependencies", + buildType: "Debug", + disable_cudd: "ON", disable_glpk: "ON", disable_gmm: "ON", + disable_gurobi: "ON", disable_libarchive: "ON", disable_mathsat: "ON", + disable_soplex: "ON", disable_spot: "ON", disable_sylvan: "ON", + disable_xerces: "ON", disable_z3: "ON", + Developer: "ON", ClnExact: "OFF", ClnRatfunc: "OFF", AllSanitizers: "OFF", + cmakeArgs: "-DSTORM_WARNING_AS_ERROR=ON" + } + uses: ./.github/workflows/test-indepth.yml + with: + NR_JOBS: "4" + name: ${{ matrix.config.name }} + baseImg: ${{ matrix.config.baseImg }} + buildType: ${{ matrix.config.buildType }} + disable_cudd: ${{ matrix.config.disable_cudd }} + disable_glpk: ${{ matrix.config.disable_glpk }} + disable_gmm: ${{ matrix.config.disable_gmm }} + disable_gurobi: ${{ matrix.config.disable_gurobi }} + disable_libarchive: ${{ matrix.config.disable_libarchive }} + disable_mathsat: ${{ matrix.config.disable_mathsat }} + disable_soplex: ${{ matrix.config.disable_soplex }} + disable_spot: ${{ matrix.config.disable_spot }} + disable_sylvan: ${{ matrix.config.disable_sylvan }} + disable_xerces: ${{ matrix.config.disable_xerces }} + disable_z3: ${{ matrix.config.disable_z3 }} + Developer: ${{ matrix.config.Developer }} + ClnExact: ${{ matrix.config.ClnExact }} + ClnRatfunc: ${{ matrix.config.ClnRatfunc }} + AllSanitizers: ${{ matrix.config.AllSanitizers }} + cmakeArgs: ${{ matrix.config.cmakeArgs }} + + compilerTests: + if: | + github.event.label.name == 'run-all-tests' || + github.event.label.name == 'run-compiler-tests' + strategy: + matrix: + config: + - { name: "GCC", + buildType: "Debug", + Developer: "ON", + cmakeArgs: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DSTORM_WARNING_AS_ERROR=ON", + packages: "", + distro: "archlinux" + } + - { name: "Clang", + buildType: "Debug", + Developer: "ON", + cmakeArgs: "-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSTORM_WARNING_AS_ERROR=ON", + packages: "clang", + distro: "archlinux" + } + - { name: "musl", + buildType: "Debug", + Developer: "ON", + cmakeArgs: "-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DSTORM_WARNING_AS_ERROR=ON", + packages: "", + distro: "alpine" + } + uses: ./.github/workflows/test-compiler.yml + with: + NR_JOBS: "4" + name: ${{ matrix.config.name }} + buildType: ${{ matrix.config.buildType }} + Developer: ${{ matrix.config.Developer }} + cmakeArgs: ${{ matrix.config.cmakeArgs }} + packages: ${{ matrix.config.packages }} + distro: ${{ matrix.config.distro }} + + linuxTests: + if: | + github.event.label.name == 'run-all-tests' || + github.event.label.name == 'run-linux-tests' + uses: ./.github/workflows/test-linux.yml + strategy: + matrix: + distro: ["debian-12", "ubuntu-24.04", "debian-13"] + buildType: ["Release"] + runner: [ubuntu-latest, ubuntu-24.04-arm] + with: + NR_JOBS: "4" + distro: ${{ matrix.distro }} + buildType: ${{ matrix.buildType }} + runner: ${{ matrix.runner }} + + macTests: + if: | + github.event.label.name == 'run-all-tests' || + github.event.label.name == 'run-mac-tests' + strategy: + matrix: + config: + - { name: "Xcode 15.4, ARM", distro: "macos-14", xcode: "15.4", buildType: "Debug" } + - { name: "Xcode Latest, ARM", distro: "macos-15", xcode: "latest-stable", buildType: "Debug" } + - { name: "Xcode Latest, Intel", distro: "macos-15-intel", xcode: "latest-stable", buildType: "Debug" } + uses: ./.github/workflows/test-mac.yml + with: + NR_JOBS: "4" + name: ${{ matrix.config.name }} + distro: ${{ matrix.config.distro }} + xcode: ${{ matrix.config.xcode }} + buildType: ${{ matrix.config.buildType }} + + cleanup: + name: Remove trigger label + runs-on: ubuntu-latest + needs: [indepthTests, compilerTests, linuxTests, macTests] + if: always() + steps: + - uses: actions/github-script@v7 + with: + script: | + await github.rest.issues.removeLabel({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + name: context.payload.label.name + }); diff --git a/.github/workflows/test-compiler.yml b/.github/workflows/test-compiler.yml new file mode 100644 index 0000000000..c9b49b6df0 --- /dev/null +++ b/.github/workflows/test-compiler.yml @@ -0,0 +1,117 @@ +name: Compiler Tests + +on: + workflow_call: + inputs: + carl_tag: + description: "Carl git tag to use" + type: string + default: "master" + NR_JOBS: + description: "Number of parallel build jobs" + type: string + default: "4" + name: + description: "Compiler name (e.g. GCC, Clang, musl)" + type: string + required: true + buildType: + description: "CMake build type (Debug or Release)" + type: string + required: true + Developer: + description: "Enable developer mode (ON/OFF)" + type: string + default: "ON" + cmakeArgs: + description: "Extra CMake arguments" + type: string + default: "" + packages: + description: "Extra packages to install (e.g. clang)" + type: string + default: "" + distro: + description: "Distro for Dockerfile selection (archlinux or alpine)" + type: string + required: true + +jobs: + compilerTests: + # Build and run with different compilers (GCC, Clang) + # Run on latest Archlinux version to get most recent compiler versions + name: Compiler Tests (${{ inputs.name }} on ${{ inputs.distro }}, ${{ inputs.buildType }}) + runs-on: ubuntu-latest + env: + NR_JOBS: ${{ inputs.NR_JOBS }} + steps: + - name: Git clone + uses: actions/checkout@v6 + - name: Replace Dockerfile + run: cp .github/workflows/Dockerfile.${{ inputs.distro }} Dockerfile + - name: Restore ccache (Docker) + id: ccache-restore + if: github.ref != 'refs/heads/master' + uses: actions/cache/restore@v4 + with: + path: .ci-ccache + key: buildtest-ccache-compiler-${{ inputs.distro }}-${{ inputs.cmakeArgs }}-${{ inputs.buildType }}-${{ github.run_id }} + restore-keys: | + buildtest-ccache-compiler-${{ inputs.distro }}-${{ inputs.cmakeArgs }}-${{ inputs.buildType }}- + buildtest-ccache-compiler-${{ inputs.distro }}- + buildtest-ccache-compiler- + - name: Build storm from Dockerfile + run: | + mkdir -p .ci-ccache + docker build -t movesrwth/storm:ci . \ + --build-arg build_type="${{ inputs.buildType }}" \ + --build-arg carl_tag="${{ inputs.carl_tag }}" \ + --build-arg developer="${{ inputs.Developer }}" \ + --build-arg cmake_args="${{ inputs.cmakeArgs }}" \ + --build-arg packages="${{ inputs.packages }}" \ + --build-arg no_threads=${NR_JOBS} + # Omitting arguments disable_*, cln_exact, cln_ratfunc, all_sanitizers + - name: Export ccache from Docker image + run: | + rm -rf .ci-ccache + mkdir -p .ci-ccache + docker create --name ccache-extract movesrwth/storm:ci + docker cp ccache-extract:/root/.ccache/. .ci-ccache/ || true + docker rm ccache-extract + - name: Save ccache (Docker) + if: github.ref != 'refs/heads/master' && always() && steps.ccache-restore.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: .ci-ccache + key: buildtest-ccache-compiler-${{ inputs.distro }}-${{ inputs.cmakeArgs }}-${{ inputs.buildType }}-${{ github.run_id }} + - name: Run Docker + run: docker run -d -it --name ci movesrwth/storm:ci + - name: Run storm + run: docker exec ci bash -c "/opt/storm/build/bin/storm --version" + - name: Check compile flags + uses: ./.github/actions/check-compile-flags-action + with: + buildType: ${{ inputs.buildType }} + docker: true + - name: Run tests + run: docker exec ci bash -c "cd /opt/storm/build; ctest test --output-on-failure" + - name: Build starter-project + uses: ./.github/actions/starter-project-action + with: + docker: true + stormDir: "/opt/storm/build" + command: "/opt/storm/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" + - name: Install storm + run: docker exec ci bash -c "cd /opt/storm/build; make install" + - name: Remove build dir + run: | + docker exec ci bash -c "rm -rf /opt/storm/build" + - name: Run installed storm + run: | + docker exec ci bash -c "/usr/local/bin/storm --version" + - name: Build starter-project on installed Storm + uses: ./.github/actions/starter-project-action + with: + docker: true + stormDir: "" + command: "/opt/storm/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" diff --git a/.github/workflows/test-deploy.yml b/.github/workflows/test-deploy.yml new file mode 100644 index 0000000000..fef389f61c --- /dev/null +++ b/.github/workflows/test-deploy.yml @@ -0,0 +1,108 @@ +name: Deploy + +on: + workflow_call: + inputs: + carl_tag: + description: "Carl git tag to use" + type: string + default: "master" + NR_JOBS: + description: "Number of parallel build jobs" + type: string + default: "4" + buildType: + description: "Build type name (Debug or Release)" + type: string + required: true + dockerTag: + description: "Docker image tag to use (e.g. ci-debug, ci)" + type: string + required: true + baseImg: + description: "Base image name (e.g. storm-dependencies:latest)" + type: string + default: "storm-dependencies:latest" + Developer: + description: "Enable developer mode (ON/OFF)" + type: string + default: "OFF" + cmakeArgs: + description: "Extra CMake arguments" + type: string + default: "" + secrets: + STORM_CI_DOCKER_USERNAME: + required: false + STORM_CI_DOCKER_TOKEN: + required: false + +jobs: + deploy: + name: Test and Deploy (${{ inputs.buildType }}) + runs-on: ubuntu-latest + env: + NR_JOBS: ${{ inputs.NR_JOBS }} + steps: + - name: Git clone + uses: actions/checkout@v6 + - name: Git describe + id: ghd + uses: proudust/gh-describe@v3 + - name: Set static Storm version + run: echo "set(STORM_VERSION_COMMITS_AHEAD ${{ steps.ghd.outputs.distance }})" >> version.cmake + - name: Build storm from Dockerfile + run: | + docker build -t movesrwth/storm:${{ inputs.dockerTag }} . \ + --build-arg BASE_IMAGE=movesrwth/${{ inputs.baseImg }} \ + --build-arg build_type="${{ inputs.buildType }}" \ + --build-arg carl_tag="${{ inputs.carl_tag }}" \ + --build-arg developer="${{ inputs.Developer }}" \ + --build-arg cmake_args="${{ inputs.cmakeArgs }}" \ + --build-arg no_threads=${NR_JOBS} + # Omitting arguments disable_*, cln_exact, cln_ratfunc, all_sanitizers + - name: Run Docker + run: docker run -d -it --name ci movesrwth/storm:${{ inputs.dockerTag }} + - name: Check compile flags + uses: ./.github/actions/check-compile-flags-action + with: + buildType: ${{ inputs.buildType }} + docker: true + - name: Run tests + run: docker exec ci bash -c "cd /opt/storm/build; ctest test --output-on-failure" + - name: Build starter-project + uses: ./.github/actions/starter-project-action + with: + docker: true + stormDir: "/opt/storm/build" + command: "/opt/storm/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" + - name: Install storm + run: docker exec ci bash -c "cd /opt/storm/build; make install" + - name: Temporarily move build dir + run: | + docker exec ci bash -c "mv /opt/storm/build /opt/storm/build-backup" + - name: Run installed storm + run: | + docker exec ci bash -c "/usr/local/bin/storm --version" + - name: Build starter-project on installed Storm + uses: ./.github/actions/starter-project-action + with: + docker: true + stormDir: "" + command: "/opt/storm/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" + - name: Restore build dir + run: | + docker exec ci bash -c "mv /opt/storm/build-backup /opt/storm/build" + - name: Login into docker + # Only login if using master on original repo (and not for pull requests or forks) + if: github.repository_owner == 'stormchecker' && github.ref == 'refs/heads/master' + uses: docker/login-action@v4 + with: + username: ${{ secrets.STORM_CI_DOCKER_USERNAME }} + password: ${{ secrets.STORM_CI_DOCKER_TOKEN }} + - name: Deploy storm + # Only deploy if using master on original repo (and not for pull requests or forks) + if: github.repository_owner == 'stormchecker' && github.ref == 'refs/heads/master' + run: | + docker commit ci movesrwth/storm:${{ inputs.dockerTag }} + docker push movesrwth/storm:${{ inputs.dockerTag }} diff --git a/.github/workflows/test-indepth.yml b/.github/workflows/test-indepth.yml new file mode 100644 index 0000000000..836248f237 --- /dev/null +++ b/.github/workflows/test-indepth.yml @@ -0,0 +1,169 @@ +name: Indepth Tests + +on: + workflow_call: + inputs: + carl_tag: + description: "Carl git tag to use" + type: string + default: "master" + NR_JOBS: + description: "Number of parallel build jobs" + type: string + default: "4" + name: + description: "Display name for the test configuration" + type: string + required: true + baseImg: + description: "Base image name (e.g. storm-dependencies:latest)" + type: string + default: "storm-dependencies:latest" + buildType: + description: "CMake build type (Debug or Release)" + type: string + default: "Debug" + disable_cudd: + type: string + default: "OFF" + disable_glpk: + type: string + default: "OFF" + disable_gmm: + type: string + default: "OFF" + disable_gurobi: + type: string + default: "OFF" + disable_libarchive: + type: string + default: "OFF" + disable_mathsat: + type: string + default: "OFF" + disable_soplex: + type: string + default: "OFF" + disable_spot: + type: string + default: "OFF" + disable_sylvan: + type: string + default: "OFF" + disable_xerces: + type: string + default: "OFF" + disable_z3: + type: string + default: "OFF" + Developer: + description: "Enable developer mode (ON/OFF)" + type: string + default: "ON" + ClnExact: + description: "Use CLN for exact arithmetic (ON/OFF)" + type: string + default: "OFF" + ClnRatfunc: + description: "Use CLN for rational functions (ON/OFF)" + type: string + default: "OFF" + AllSanitizers: + description: "Enable all sanitizers (ON/OFF)" + type: string + default: "OFF" + cmakeArgs: + description: "Extra CMake arguments" + type: string + default: "-DSTORM_WARNING_AS_ERROR=ON" + +jobs: + indepthTests: + name: Indepth Tests (${{ inputs.name }}, ${{ inputs.buildType }}) + runs-on: ubuntu-latest + env: + NR_JOBS: ${{ inputs.NR_JOBS }} + steps: + - name: Git clone + uses: actions/checkout@v6 + - name: Restore ccache (Docker) + id: ccache-restore + if: github.ref != 'refs/heads/master' + uses: actions/cache/restore@v4 + with: + path: .ci-ccache + key: buildtest-ccache-indepth-${{ inputs.buildType }}-${{ inputs.ClnExact }}-${{ inputs.ClnRatfunc }}-${{ inputs.disable_cudd }}-${{ inputs.baseImg }}-${{ hashFiles('Dockerfile', 'CMakeLists.txt') }}-${{ github.run_id }} + restore-keys: | + buildtest-ccache-indepth-${{ inputs.buildType }}-${{ inputs.ClnExact }}-${{ inputs.ClnRatfunc }}-${{ inputs.disable_cudd }}-${{ inputs.baseImg }}- + buildtest-ccache-indepth-${{ inputs.buildType }}-${{ inputs.ClnExact }}-${{ inputs.ClnRatfunc }}-${{ inputs.disable_cudd }}- + buildtest-ccache-indepth- + - name: Build storm from Dockerfile + run: | + mkdir -p .ci-ccache + docker build -t movesrwth/storm:ci . \ + --build-arg BASE_IMAGE=movesrwth/${{ inputs.baseImg }} \ + --build-arg build_type="${{ inputs.buildType }}" \ + --build-arg carl_tag="${{ inputs.carl_tag }}" \ + --build-arg disable_cudd="${{ inputs.disable_cudd }}" \ + --build-arg disable_glpk="${{ inputs.disable_glpk }}" \ + --build-arg disable_gmm="${{ inputs.disable_gmm }}" \ + --build-arg disable_gurobi="${{ inputs.disable_gurobi }}" \ + --build-arg disable_libarchive="${{ inputs.disable_libarchive }}" \ + --build-arg disable_mathsat="${{ inputs.disable_mathsat }}" \ + --build-arg disable_soplex="${{ inputs.disable_soplex }}" \ + --build-arg disable_spot="${{ inputs.disable_spot }}" \ + --build-arg disable_sylvan="${{ inputs.disable_sylvan }}" \ + --build-arg disable_xerces="${{ inputs.disable_xerces }}" \ + --build-arg disable_z3="${{ inputs.disable_z3 }}" \ + --build-arg developer="${{ inputs.Developer }}" \ + --build-arg cln_exact="${{ inputs.ClnExact }}" \ + --build-arg cln_ratfunc="${{ inputs.ClnRatfunc }}" \ + --build-arg all_sanitizers="${{ inputs.AllSanitizers }}" \ + --build-arg cmake_args="${{ inputs.cmakeArgs }}" \ + --build-arg no_threads=${NR_JOBS} + - name: Export ccache from Docker image + run: | + rm -rf .ci-ccache + mkdir -p .ci-ccache + docker create --name ccache-extract movesrwth/storm:ci + docker cp ccache-extract:/root/.ccache/. .ci-ccache/ || true + docker rm ccache-extract + - name: Save ccache (Docker) + if: github.ref != 'refs/heads/master' && always() && steps.ccache-restore.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: .ci-ccache + key: buildtest-ccache-indepth-${{ inputs.buildType }}-${{ inputs.ClnExact }}-${{ inputs.ClnRatfunc }}-${{ inputs.disable_cudd }}-${{ inputs.baseImg }}-${{ hashFiles('Dockerfile', 'CMakeLists.txt') }}-${{ github.run_id }} + - name: Run Docker + run: docker run -d -it --name ci movesrwth/storm:ci + - name: Run storm + run: docker exec ci bash -c "/opt/storm/build/bin/storm --version" + - name: Check compile flags + uses: ./.github/actions/check-compile-flags-action + with: + buildType: ${{ inputs.buildType }} + docker: true + - name: Run tests + # Disabled sanitizer checks for now + #run: docker exec ci bash -c "cd /opt/storm/build; ASAN_OPTIONS=detect_leaks=0,detect_odr_violation=0 ctest test --output-on-failure" + run: docker exec ci bash -c "cd /opt/storm/build; ctest test --output-on-failure" + - name: Build starter-project + uses: ./.github/actions/starter-project-action + with: + docker: true + stormDir: "/opt/storm/build" + command: "--help" # TODO using --help as running the starter-project requires Z3. + - name: Install storm + run: docker exec ci bash -c "cd /opt/storm/build; make install" + - name: Remove build dir + run: | + docker exec ci bash -c "rm -rf /opt/storm/build" + - name: Run installed storm + run: | + docker exec ci bash -c "/usr/local/bin/storm --version" + - name: Build starter-project on installed Storm + uses: ./.github/actions/starter-project-action + with: + docker: true + stormDir: "" + command: "--help" # TODO using --help as running the starter-project requires Z3. diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml new file mode 100644 index 0000000000..bbf00b8a00 --- /dev/null +++ b/.github/workflows/test-linux.yml @@ -0,0 +1,99 @@ +name: Linux Tests + +on: + workflow_call: + inputs: + carl_tag: + description: "Carl git tag to use" + type: string + default: "master" + NR_JOBS: + description: "Number of parallel build jobs" + type: string + default: "4" + distro: + description: "distro to use as base image for the docker image" + type: string + required: true + buildType: + description: "build type to use for the docker image" + type: string + required: true + runner: + description: "runner to use for the job" + type: string + required: true + +jobs: + linuxTests: + name: Linux Tests (${{ inputs.distro }}, ${{ inputs.buildType }}) on ${{ inputs.runner }} + runs-on: ${{ inputs.runner }} + env: + NR_JOBS: ${{ inputs.NR_JOBS }} + steps: + - name: Git clone + uses: actions/checkout@v6 + - name: Restore ccache (Docker) + id: ccache-restore + if: github.ref != 'refs/heads/master' + uses: actions/cache/restore@v4 + with: + path: .ci-ccache + key: buildtest-ccache-linux-${{ inputs.distro }}-${{ inputs.buildType }}-${{ inputs.runner }}-${{ github.run_id }} + restore-keys: | + buildtest-ccache-linux-${{ inputs.distro }}-${{ inputs.buildType }}-${{ inputs.runner }}- + buildtest-ccache-linux- + - name: Build storm from Dockerfile + run: | + mkdir -p .ci-ccache + docker build -t movesrwth/storm:ci . \ + --build-arg BASE_IMAGE=movesrwth/storm-basesystem:${{ inputs.distro }} \ + --build-arg build_type="${{ inputs.buildType }}" \ + --build-arg carl_tag="${{ inputs.carl_tag }}" \ + --build-arg no_threads=${NR_JOBS} \ + --build-arg cmake_args="-DSTORM_WARNING_AS_ERROR=ON -DSTORM_COMPILE_WITH_PCH=OFF" + # Omitting arguments developer, disable_*, cln_exact, cln_ratfunc, all_sanitizers + - name: Export ccache from Docker image + run: | + rm -rf .ci-ccache + mkdir -p .ci-ccache + docker create --name ccache-extract movesrwth/storm:ci + docker cp ccache-extract:/root/.ccache/. .ci-ccache/ || true + docker rm ccache-extract + - name: Save ccache (Docker) + if: github.ref != 'refs/heads/master' && always() && steps.ccache-restore.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: .ci-ccache + key: buildtest-ccache-linux-${{ inputs.distro }}-${{ inputs.buildType }}-${{ inputs.runner }}-${{ github.run_id }} + - name: Run Docker + run: docker run -d -it --name ci movesrwth/storm:ci + - name: Run storm + run: docker exec ci bash -c "/opt/storm/build/bin/storm --version" + - name: Check compile flags + uses: ./.github/actions/check-compile-flags-action + with: + buildType: ${{ inputs.buildType }} + docker: true + - name: Run tests + run: docker exec ci bash -c "cd /opt/storm/build; ctest test --output-on-failure" + - name: Build starter-project + uses: ./.github/actions/starter-project-action + with: + docker: true + stormDir: "/opt/storm/build" + command: "/opt/storm/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" + - name: Install storm + run: docker exec ci bash -c "cd /opt/storm/build; make install" + - name: Remove build dir + run: | + docker exec ci bash -c "rm -rf /opt/storm/build" + - name: Run installed storm + run: | + docker exec ci bash -c "/usr/local/bin/storm --version" + - name: Build starter-project on installed Storm + uses: ./.github/actions/starter-project-action + with: + docker: true + stormDir: "" + command: "/opt/storm/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" diff --git a/.github/workflows/test-mac.yml b/.github/workflows/test-mac.yml new file mode 100644 index 0000000000..73f9ec8442 --- /dev/null +++ b/.github/workflows/test-mac.yml @@ -0,0 +1,118 @@ +name: macOS Tests + +on: + workflow_call: + inputs: + NR_JOBS: + description: "Number of parallel build jobs" + type: string + default: "4" + name: + description: "Display name (e.g. Xcode 15.4, ARM)" + type: string + required: true + distro: + description: "macOS runner image (e.g. macos-14, macos-15)" + type: string + required: true + xcode: + description: "Xcode version (e.g. 15.4, latest-stable)" + type: string + required: true + buildType: + description: "CMake build type (Debug or Release)" + type: string + required: true + +jobs: + macTests: + name: macOS Tests (${{ inputs.name }}, ${{ inputs.buildType }}) + runs-on: ${{ inputs.distro }} + env: + CCACHE_DIR: /Users/runner/.ccache + NR_JOBS: ${{ inputs.NR_JOBS }} + steps: + - uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: ${{ inputs.xcode }} + - name: Git clone + uses: actions/checkout@v6 + - name: Cache Homebrew downloads + if: github.ref != 'refs/heads/master' + uses: actions/cache@v4 + with: + path: ~/Library/Caches/Homebrew + key: buildtest-brew-${{ inputs.distro }}-${{ hashFiles('.github/workflows/buildtest.yml') }} + restore-keys: | + buildtest-brew-${{ inputs.distro }}- + - name: Ensure ccache directory exists (macOS) + run: mkdir -p /Users/runner/.ccache + - name: Restore ccache (macOS) + id: ccache-restore-macos + if: github.ref != 'refs/heads/master' + uses: actions/cache/restore@v4 + with: + path: /Users/runner/.ccache + key: buildtest-ccache-macos-${{ inputs.distro }}-${{ inputs.buildType }}-${{ github.run_id }} + restore-keys: | + buildtest-ccache-macos-${{ inputs.distro }}-${{ inputs.buildType }}- + buildtest-ccache-macos-${{ inputs.distro }}- + - name: Install dependencies + # cmake and gmp are already installed + run: | + brew update + brew install automake boost ccache cln ginac glpk hwloc libarchive xerces-c z3 + - name: Prepare ccache + run: | + ccache --max-size=2G + ccache --zero-stats + ccache --show-stats --verbose + - name: Configure storm + run: | + mkdir build + cd build + cmake .. -DCMAKE_BUILD_TYPE="${{ inputs.buildType }}" -DSTORM_CARL_GIT_TAG="master" -DSTORM_WARNING_AS_ERROR=ON -DSTORM_COMPILE_WITH_PCH=OFF + - name: Build storm + working-directory: ./build + run: | + make -j ${NR_JOBS} + - name: Print ccache stats + run: ccache --show-stats --verbose + - name: Save ccache (macOS) + if: github.ref != 'refs/heads/master' && always() && steps.ccache-restore-macos.outputs.cache-hit != 'true' + uses: actions/cache/save@v4 + with: + path: /Users/runner/.ccache + key: buildtest-ccache-macos-${{ inputs.distro }}-${{ inputs.buildType }}-${{ github.run_id }} + - name: Run storm (build tree) + working-directory: ./build + run: ./bin/storm + - name: Check compile flags + uses: ./.github/actions/check-compile-flags-action + with: + buildType: ${{ inputs.buildType }} + docker: false + - name: Run tests + working-directory: ./build + run: ctest test --output-on-failure + - name: Build starter-project + uses: ./.github/actions/starter-project-action + with: + docker: false + stormDir: "${GITHUB_WORKSPACE}/build" + command: "${GITHUB_WORKSPACE}/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" + - name: Install storm + working-directory: ./build + run: sudo make install + - name: Remove build dir + run: | + rm -rf ${GITHUB_WORKSPACE}/build + - name: Run installed storm + run: | + /usr/local/bin/storm --version + - name: Build starter-project on installed Storm + uses: ./.github/actions/starter-project-action + with: + docker: false + stormDir: "" + command: "${GITHUB_WORKSPACE}/resources/examples/testfiles/dtmc/brp-16-2.pm 'P=? [F s=5]'" diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a602ac4f5..4977a7c55d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,8 @@ option(STORM_FORCE_POPCNT "Sets whether the popcnt instruction is forced to be u MARK_AS_ADVANCED(STORM_FORCE_POPCNT) option(STORM_COMPILE_WITH_CCACHE "Compile using CCache [if found]" ON) mark_as_advanced(STORM_COMPILE_WITH_CCACHE) +option(STORM_COMPILE_WITH_PCH "Enable pre-compiled headers" ON) +mark_as_advanced(STORM_COMPILE_WITH_PCH) option(STORM_LOG_DISABLE_DEBUG "Disable log and trace message support" OFF) option(STORM_COMPILE_WITH_ADDRESS_SANITIZER "Sets whether to compile with AddressSanitizer enabled" OFF) option(STORM_COMPILE_WITH_ALL_SANITIZERS "Sets whether to compile with all sanitizers enabled" OFF) @@ -153,6 +155,8 @@ if (STORM_DEVELOPER) set(STORM_DEBUG_SPOT ON) set(STORM_DEBUG_SYLVAN ON) set(STORM_WARNING_AS_ERROR ON) + # Turn off PCH for faster ccache usage on warm caches. + set(STORM_COMPILE_WITH_PCH OFF) else() set(STORM_LOG_DISABLE_DEBUG ON) if (NOT CMAKE_BUILD_TYPE) @@ -163,13 +167,23 @@ set(CMAKE_COMPILE_WARNING_AS_ERROR ${STORM_WARNING_AS_ERROR}) message(STATUS "Storm - Building ${CMAKE_BUILD_TYPE} version.") +# PCH compiled files cannot be properly cached currently. Thus disabling it is recommended when doing many warm ccache builds. +if(NOT STORM_COMPILE_WITH_PCH) + set(CMAKE_DISABLE_PRECOMPILE_HEADERS ON) + message(STATUS "Storm - Disabling precompiled headers because of ccache compatibility.") +endif() + if(STORM_COMPILE_WITH_CCACHE) find_program(CCACHE_FOUND ccache) mark_as_advanced(CCACHE_FOUND) if(CCACHE_FOUND) message(STATUS "Storm - Using ccache") + set(ENV{CCACHE_SLOPPINESS} "pch_defines,time_macros,include_file_mtime,include_file_ctime") set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) + + if(STORM_COMPILE_WITH_PCH) + message(STATUS "STORM - PCH is enabled which will lead to significantly lower ccache hit rates. Consider disabling PCH if you plan to rebuild storm multiple times.") + endif() else() message(STATUS "Storm - Could not find ccache.") endif() @@ -313,6 +327,12 @@ SET(STORM_PRECOMPILED_HEADERS "" "" "" "" "" "" "" "" "" "" "" "" "" "" "" "") +function(storm_target_precompile_headers target) + if(NOT CMAKE_DISABLE_PRECOMPILE_HEADERS) + target_precompile_headers(${target} ${ARGN}) + endif() +endfunction() + ############################################################# ## ## Compiler tests during config diff --git a/Dockerfile b/Dockerfile index a361f0c8df..bbb4727122 100644 --- a/Dockerfile +++ b/Dockerfile @@ -45,12 +45,29 @@ ARG cmake_args="" # Build Storm ############# +RUN if ! command -v ccache >/dev/null 2>&1; then \ + if command -v apt-get >/dev/null 2>&1; then \ + apt-get update && apt-get install -y --no-install-recommends ccache && rm -rf /var/lib/apt/lists/*; \ + elif command -v apk >/dev/null 2>&1; then \ + apk add --no-cache ccache; \ + elif command -v pacman >/dev/null 2>&1; then \ + pacman -S --noconfirm ccache; \ + else \ + echo "No supported package manager found for ccache installation"; \ + fi; \ + fi + +ENV CCACHE_DIR=/root/.ccache RUN mkdir /opt/storm WORKDIR /opt/storm # Copy the content of the current local Storm repository into the Docker image COPY . . +# Seed ccache from the workflow cache directory if available. +RUN mkdir -p "$CCACHE_DIR" && \ + if [ -d "/opt/storm/.ci-ccache" ]; then cp -a /opt/storm/.ci-ccache/. "$CCACHE_DIR"/; fi + # Switch to build directory RUN mkdir -p /opt/storm/build WORKDIR /opt/storm/build @@ -78,6 +95,6 @@ RUN cmake -DCMAKE_BUILD_TYPE=$build_type \ # Build Storm # (This can be adapted to only build 'storm' or 'binaries' depending on custom needs) -RUN make -j $no_threads +RUN ccache --max-size=3G && ccache --zero-stats && make -j $no_threads && ccache --show-stats --verbose WORKDIR /opt/storm diff --git a/resources/3rdparty/include_spot.cmake b/resources/3rdparty/include_spot.cmake index 9c556ae818..c236c95b83 100644 --- a/resources/3rdparty/include_spot.cmake +++ b/resources/3rdparty/include_spot.cmake @@ -60,10 +60,13 @@ if(NOT STORM_DISABLE_SPOT) set(SPOT_SHIPPED_VERSION 2.14.3) set(STORM_SPOT_FLAGS "--disable-python;--enable-shared;--disable-static") if (NOT STORM_DEBUG_SPOT) - set(STORM_SPOT_FLAGS "${STORM_SPOT_FLAGS};--disable-devel;--disable-debug;--enable-optimizations") + set(STORM_SPOT_FLAGS "${STORM_SPOT_FLAGS};--disable-devel;--disable-debug;--enable-optimizations") else() - message(WARNING "Storm - Building Spot in DEBUG mode.") - set(STORM_SPOT_FLAGS "${STORM_SPOT_FLAGS};--enable-devel;--enable-debug;--disable-optimizations") + message(WARNING "Storm - Building Spot in DEBUG mode.") + set(STORM_SPOT_FLAGS "${STORM_SPOT_FLAGS};--disable-devel;--enable-debug;--disable-optimizations") + endif() + if (CCACHE_FOUND) + set(STORM_SPOT_FLAGS "${STORM_SPOT_FLAGS};CC=ccache\\ ${CMAKE_C_COMPILER};CXX=ccache\\ ${CMAKE_CXX_COMPILER}") endif() ExternalProject_Add(Spot URL https://www.lre.epita.fr/dload/spot/spot-${SPOT_SHIPPED_VERSION}.tar.gz https://www.lrde.epita.fr/dload/spot/spot-${SPOT_SHIPPED_VERSION}.tar.gz diff --git a/resources/scripts/benchmark-pch-ccache.sh b/resources/scripts/benchmark-pch-ccache.sh new file mode 100755 index 0000000000..cbc25676ae --- /dev/null +++ b/resources/scripts/benchmark-pch-ccache.sh @@ -0,0 +1,295 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Benchmark Storm compile time across: +# - PCH enabled/disabled +# - ccache cold/warm +# +# The script uses ccache through CMake compiler launchers and controls PCH via +# CMAKE_DISABLE_PRECOMPILE_HEADERS, so all four combinations are measurable. + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +SOURCE_DIR="$(cd "${SCRIPT_DIR}/../.." && pwd)" +BUILD_ROOT="${SOURCE_DIR}/build-bench-pch-ccache" +CCACHE_ROOT="" +BUILD_TYPE="Release" +TARGET="storm" +JOBS="$(command -v nproc >/dev/null 2>&1 && nproc || echo 4)" +GENERATOR="" +EXTRA_CMAKE_ARGS=() +ENABLE_TRACE=0 +NINJATRACING_BIN="" +NINJATRACING_URL="https://raw.githubusercontent.com/nico/ninjatracing/master/ninjatracing" + +usage() { + cat <<'EOF' +Usage: benchmark-pch-ccache.sh [options] + +Options: + --source-dir Storm source directory (default: repo root) + --build-root Directory for benchmark build trees/results + --ccache-root Directory for benchmark ccache data (default: /ccache) + --build-type CMake build type (default: Release) + --target Build target (default: storm) + --jobs Parallel build jobs (default: nproc or 4) + --generator CMake generator (e.g. Ninja) + --cmake-arg Extra CMake argument (can be repeated) + --trace Generate Chrome trace files via ninjatracing + --ninjatracing Path to local ninjatracing script/binary + --help Show this help + +Output: + - Summary table in stdout + - CSV at /results.csv + - Per-run ccache stats in /results/ + - Optional traces at /results/trace--.json +EOF +} + +require_cmd() { + if ! command -v "$1" >/dev/null 2>&1; then + echo "Error: required command '$1' not found" >&2 + exit 1 + fi +} + +extract_stat() { + local label="$1" + local file="$2" + awk -F: -v key="$label" ' + $1 ~ key { + gsub(/^[[:space:]]+|[[:space:]]+$/, "", $2) + gsub(/[[:space:]]/, "", $2) + print $2 + found=1 + exit + } + END { if (!found) print 0 } + ' "$file" +} + +run_case() { + local pch_mode="$1" # on|off + local cache_state="$2" # cold|warm + local namespace="storm-bench-pch-${pch_mode}" + local ccache_dir="${CCACHE_ROOT}/${namespace}" + local enable_pch="ON" + + if [[ "$pch_mode" == "off" ]]; then + enable_pch="OFF" + fi + + local build_dir="${BUILD_ROOT}/build-${pch_mode}" + local result_dir="${BUILD_ROOT}/results" + mkdir -p "$result_dir" + + export CCACHE_DIR="$ccache_dir" + export CCACHE_NAMESPACE="$namespace" + export CCACHE_BASEDIR="$SOURCE_DIR" + export CCACHE_NOHASHDIR="1" + + if [[ "$cache_state" == "cold" ]]; then + rm -rf "$ccache_dir" + rm -rf "$build_dir" + fi + mkdir -p "$ccache_dir" + ccache --zero-stats >/dev/null + + local cmake_cmd=(cmake -S "$SOURCE_DIR" -B "$build_dir" + -DSTORM_COMPILE_WITH_PCH="$enable_pch" + -DCMAKE_BUILD_TYPE="$BUILD_TYPE") + + if [[ -n "$GENERATOR" ]]; then + cmake_cmd+=(-G "$GENERATOR") + fi + + if [[ ${#EXTRA_CMAKE_ARGS[@]} -gt 0 ]]; then + cmake_cmd+=("${EXTRA_CMAKE_ARGS[@]}") + fi + + if [[ "$cache_state" == "cold" || ! -d "$build_dir" ]]; then + echo "[benchmark] Configure: pch=${pch_mode}, cache=${cache_state}" + "${cmake_cmd[@]}" >/dev/null + fi + + if [[ "$cache_state" == "warm" ]]; then + # Rebuild in the same build directory to keep paths stable for ccache. + cmake --build "$build_dir" --target clean -j "$JOBS" >/dev/null || true + fi + + local time_file="${result_dir}/time-${pch_mode}-${cache_state}.txt" + echo "[benchmark] Build: pch=${pch_mode}, cache=${cache_state}" + /usr/bin/time -f "%e" -o "$time_file" \ + cmake --build "$build_dir" --target "$TARGET" -j "$JOBS" >/dev/null + + local stats_file="${result_dir}/ccache-${pch_mode}-${cache_state}.txt" + ccache --show-stats --verbose >"$stats_file" + + if [[ "$ENABLE_TRACE" == "1" ]]; then + local ninja_log="${build_dir}/.ninja_log" + local trace_file="${result_dir}/trace-${pch_mode}-${cache_state}.json" + if [[ ! -f "$ninja_log" ]]; then + echo "Error: ninja log not found at $ninja_log" >&2 + exit 1 + fi + python3 "$NINJATRACING_BIN" "$ninja_log" >"$trace_file" + fi + + local elapsed + elapsed="$(cat "$time_file")" + + local cacheable hits misses uncacheable + cacheable="$(extract_stat "Cacheable calls" "$stats_file")" + hits="$(extract_stat "Hits" "$stats_file")" + misses="$(extract_stat "Misses" "$stats_file")" + uncacheable="$(extract_stat "Uncacheable calls" "$stats_file")" + + local hit_rate="0.00" + if [[ "$cacheable" != "0" ]]; then + hit_rate="$(awk -v h="$hits" -v c="$cacheable" 'BEGIN { printf "%.2f", (100.0*h)/c }')" + fi + + printf "%s,%s,%s,%s,%s,%s,%s\n" \ + "$pch_mode" "$cache_state" "$elapsed" "$cacheable" "$hits" "$misses" "$uncacheable" \ + >>"${BUILD_ROOT}/results.csv" + + printf "%-8s %-6s %10s %12s %10s %10s %12s %9s\n" \ + "$pch_mode" "$cache_state" "$elapsed" "$cacheable" "$hits" "$misses" "$uncacheable" "${hit_rate}%" +} + +while [[ $# -gt 0 ]]; do + case "$1" in + --source-dir) + SOURCE_DIR="$2" + shift 2 + ;; + --build-root) + BUILD_ROOT="$2" + shift 2 + ;; + --ccache-root) + CCACHE_ROOT="$2" + shift 2 + ;; + --build-type) + BUILD_TYPE="$2" + shift 2 + ;; + --target) + TARGET="$2" + shift 2 + ;; + --jobs) + JOBS="$2" + shift 2 + ;; + --generator) + GENERATOR="$2" + shift 2 + ;; + --cmake-arg) + EXTRA_CMAKE_ARGS+=("$2") + shift 2 + ;; + --trace) + ENABLE_TRACE=1 + shift + ;; + --ninjatracing) + NINJATRACING_BIN="$2" + shift 2 + ;; + --help) + usage + exit 0 + ;; + *) + echo "Unknown argument: $1" >&2 + usage + exit 1 + ;; + esac +done + +require_cmd cmake +require_cmd ccache +require_cmd /usr/bin/time + +if [[ "$ENABLE_TRACE" == "1" ]]; then + require_cmd python3 + if [[ -z "$GENERATOR" ]]; then + GENERATOR="Ninja" + fi + if [[ "$GENERATOR" != "Ninja" ]]; then + echo "Error: --trace requires --generator Ninja (or no generator, which defaults to Ninja)." >&2 + exit 1 + fi + require_cmd ninja +fi + +if [[ -z "$CCACHE_ROOT" ]]; then + CCACHE_ROOT="${BUILD_ROOT}/ccache" +fi + +mkdir -p "$BUILD_ROOT" +mkdir -p "$CCACHE_ROOT" +: >"${BUILD_ROOT}/results.csv" +echo "pch,cache_state,build_seconds,cacheable_calls,hits,misses,uncacheable_calls" >>"${BUILD_ROOT}/results.csv" + +if [[ "$ENABLE_TRACE" == "1" ]]; then + if [[ -z "$NINJATRACING_BIN" ]]; then + NINJATRACING_BIN="${BUILD_ROOT}/tools/ninjatracing" + mkdir -p "${BUILD_ROOT}/tools" + if [[ ! -f "$NINJATRACING_BIN" ]]; then + if command -v curl >/dev/null 2>&1; then + curl -fsSL "$NINJATRACING_URL" -o "$NINJATRACING_BIN" + elif command -v wget >/dev/null 2>&1; then + wget -qO "$NINJATRACING_BIN" "$NINJATRACING_URL" + else + echo "Error: neither curl nor wget found; provide --ninjatracing ." >&2 + exit 1 + fi + chmod +x "$NINJATRACING_BIN" + fi + fi +fi + +echo +echo "Benchmark settings" +echo " source-dir: $SOURCE_DIR" +echo " build-root: $BUILD_ROOT" +echo " ccache-root: $CCACHE_ROOT" +echo " build-type: $BUILD_TYPE" +echo " target: $TARGET" +echo " jobs: $JOBS" +if [[ -n "$GENERATOR" ]]; then + echo " generator: $GENERATOR" +fi +if [[ "$ENABLE_TRACE" == "1" ]]; then + echo " trace: enabled" + echo " ninjatrace: $NINJATRACING_BIN" +else + echo " trace: disabled" +fi +if [[ ${#EXTRA_CMAKE_ARGS[@]} -gt 0 ]]; then + echo " extra args: ${EXTRA_CMAKE_ARGS[*]}" +fi + +echo +echo "Results" +printf "%-8s %-6s %10s %12s %10s %10s %12s %9s\n" \ + "pch" "cache" "seconds" "cacheable" "hits" "misses" "uncacheable" "hit-rate" +printf "%-8s %-6s %10s %12s %10s %10s %12s %9s\n" \ + "--------" "------" "----------" "------------" "----------" "----------" "------------" "---------" + +run_case off cold +run_case off warm +run_case on cold +run_case on warm + +echo +echo "CSV written to: ${BUILD_ROOT}/results.csv" +echo "Raw stats in: ${BUILD_ROOT}/results" +if [[ "$ENABLE_TRACE" == "1" ]]; then + echo "Traces in: ${BUILD_ROOT}/results" +fi diff --git a/src/storm-cli-utilities/CMakeLists.txt b/src/storm-cli-utilities/CMakeLists.txt index eba3308270..1af0660f31 100644 --- a/src/storm-cli-utilities/CMakeLists.txt +++ b/src/storm-cli-utilities/CMakeLists.txt @@ -9,7 +9,7 @@ target_sources(storm-cli-utilities ${STORM_CLI_UTIL_SOURCES} PUBLIC FILE_SET fs_storm_cli_utilities_headers TYPE HEADERS BASE_DIRS "${PROJECT_SOURCE_DIR}/src" FILES ${STORM_CLI_UTIL_HEADERS}) -target_precompile_headers(storm-cli-utilities REUSE_FROM storm) +storm_target_precompile_headers(storm-cli-utilities REUSE_FROM storm) set_target_properties(storm-cli-utilities PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) target_link_libraries(storm-cli-utilities PUBLIC storm storm-counterexamples storm-gamebased-ar storm-parsers storm-version-info) set_target_properties(storm-cli-utilities PROPERTIES DEFINE_SYMBOL "") # to avoid problems with pch on linux. diff --git a/src/storm-cli/CMakeLists.txt b/src/storm-cli/CMakeLists.txt index 21a828f383..ca0565e585 100644 --- a/src/storm-cli/CMakeLists.txt +++ b/src/storm-cli/CMakeLists.txt @@ -3,7 +3,7 @@ add_executable(storm-cli ${PROJECT_SOURCE_DIR}/src/storm-cli/storm-cli.cpp) target_link_libraries(storm-cli storm storm-cli-utilities) set_target_properties(storm-cli PROPERTIES OUTPUT_NAME "storm") set_target_properties(storm-cli PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) -target_precompile_headers(storm-cli PRIVATE ${STORM_PRECOMPILED_HEADERS}) +storm_target_precompile_headers(storm-cli PRIVATE ${STORM_PRECOMPILED_HEADERS}) add_dependencies(binaries storm-cli) diff --git a/src/storm-conv-cli/CMakeLists.txt b/src/storm-conv-cli/CMakeLists.txt index 4ae4b508da..4836769e35 100644 --- a/src/storm-conv-cli/CMakeLists.txt +++ b/src/storm-conv-cli/CMakeLists.txt @@ -3,7 +3,7 @@ add_executable(storm-conv-cli ${PROJECT_SOURCE_DIR}/src/storm-conv-cli/storm-con target_link_libraries(storm-conv-cli storm-conv storm-cli-utilities) set_target_properties(storm-conv-cli PROPERTIES OUTPUT_NAME "storm-conv") set_target_properties(storm-conv-cli PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) -target_precompile_headers(storm-conv-cli REUSE_FROM storm-cli) +storm_target_precompile_headers(storm-conv-cli REUSE_FROM storm-cli) add_dependencies(binaries storm-conv-cli) diff --git a/src/storm-conv/CMakeLists.txt b/src/storm-conv/CMakeLists.txt index 05d5a98901..89d7e234f3 100644 --- a/src/storm-conv/CMakeLists.txt +++ b/src/storm-conv/CMakeLists.txt @@ -8,7 +8,7 @@ target_sources(storm-conv ${STORM_CONV_SOURCES} PUBLIC FILE_SET fs_storm_conv_headers TYPE HEADERS BASE_DIRS "${PROJECT_SOURCE_DIR}/src" FILES ${STORM_CONV_HEADERS}) -target_precompile_headers(storm-conv REUSE_FROM storm) +storm_target_precompile_headers(storm-conv REUSE_FROM storm) set_target_properties(storm-conv PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) target_link_libraries(storm-conv PUBLIC storm) set_target_properties(storm-conv PROPERTIES DEFINE_SYMBOL "") # to avoid problems with pch on linux. diff --git a/src/storm-counterexamples/CMakeLists.txt b/src/storm-counterexamples/CMakeLists.txt index 4b787e33ca..7448579d0f 100644 --- a/src/storm-counterexamples/CMakeLists.txt +++ b/src/storm-counterexamples/CMakeLists.txt @@ -7,7 +7,7 @@ target_sources(storm-counterexamples ${STORM_CEX_SOURCES} PUBLIC FILE_SET fs_storm_cex_headers TYPE HEADERS BASE_DIRS "${PROJECT_SOURCE_DIR}/src" FILES ${STORM_CEX_HEADERS}) -target_precompile_headers(storm-counterexamples REUSE_FROM storm) +storm_target_precompile_headers(storm-counterexamples REUSE_FROM storm) set_target_properties(storm-counterexamples PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) target_link_libraries(storm-counterexamples PUBLIC storm) set_target_properties(storm-counterexamples PROPERTIES DEFINE_SYMBOL "") # to avoid problems with pch on linux. diff --git a/src/storm-dft-cli/CMakeLists.txt b/src/storm-dft-cli/CMakeLists.txt index 9f2e7f6164..ae6ba0ac9e 100644 --- a/src/storm-dft-cli/CMakeLists.txt +++ b/src/storm-dft-cli/CMakeLists.txt @@ -3,7 +3,7 @@ add_executable(storm-dft-cli ${PROJECT_SOURCE_DIR}/src/storm-dft-cli/storm-dft.c target_link_libraries(storm-dft-cli storm-dft storm-cli-utilities) set_target_properties(storm-dft-cli PROPERTIES OUTPUT_NAME "storm-dft") set_target_properties(storm-dft-cli PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) -target_precompile_headers(storm-dft-cli REUSE_FROM storm-cli) +storm_target_precompile_headers(storm-dft-cli REUSE_FROM storm-cli) add_dependencies(binaries storm-dft-cli) diff --git a/src/storm-dft/CMakeLists.txt b/src/storm-dft/CMakeLists.txt index b3e6ce4b3c..1391f7d509 100644 --- a/src/storm-dft/CMakeLists.txt +++ b/src/storm-dft/CMakeLists.txt @@ -8,7 +8,7 @@ target_sources(storm-dft ${STORM_DFT_SOURCES} PUBLIC FILE_SET fs_storm_dft_headers TYPE HEADERS BASE_DIRS "${PROJECT_SOURCE_DIR}/src" FILES ${STORM_DFT_HEADERS}) -target_precompile_headers(storm-dft REUSE_FROM storm) +storm_target_precompile_headers(storm-dft REUSE_FROM storm) set_target_properties(storm-dft PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) target_link_libraries(storm-dft PUBLIC storm storm-gspn storm-conv storm-parsers storm-pars ${STORM_DFT_LINK_LIBRARIES}) set_target_properties(storm-dft PROPERTIES DEFINE_SYMBOL "") # to avoid problems with pch on linux. diff --git a/src/storm-gamebased-ar/CMakeLists.txt b/src/storm-gamebased-ar/CMakeLists.txt index 190a22d89f..d9f1b92113 100644 --- a/src/storm-gamebased-ar/CMakeLists.txt +++ b/src/storm-gamebased-ar/CMakeLists.txt @@ -7,7 +7,7 @@ target_sources(storm-gamebased-ar ${STORM_GBAR_SOURCES} PUBLIC FILE_SET fs_storm_gbar_headers TYPE HEADERS BASE_DIRS "${PROJECT_SOURCE_DIR}/src" FILES ${STORM_GBAR_HEADERS}) -target_precompile_headers(storm-gamebased-ar REUSE_FROM storm) +storm_target_precompile_headers(storm-gamebased-ar REUSE_FROM storm) set_target_properties(storm-gamebased-ar PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) target_link_libraries(storm-gamebased-ar PUBLIC storm) set_target_properties(storm-gamebased-ar PROPERTIES DEFINE_SYMBOL "") # to avoid problems with pch on linux. diff --git a/src/storm-gspn-cli/CMakeLists.txt b/src/storm-gspn-cli/CMakeLists.txt index 7bbc8e8ea6..7635d727e3 100644 --- a/src/storm-gspn-cli/CMakeLists.txt +++ b/src/storm-gspn-cli/CMakeLists.txt @@ -3,7 +3,7 @@ add_executable(storm-gspn-cli ${PROJECT_SOURCE_DIR}/src/storm-gspn-cli/storm-gsp target_link_libraries(storm-gspn-cli storm-gspn storm-cli-utilities) set_target_properties(storm-gspn-cli PROPERTIES OUTPUT_NAME "storm-gspn") set_target_properties(storm-gspn-cli PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) -target_precompile_headers(storm-gspn-cli REUSE_FROM storm-cli) +storm_target_precompile_headers(storm-gspn-cli REUSE_FROM storm-cli) add_dependencies(binaries storm-gspn-cli) diff --git a/src/storm-gspn/CMakeLists.txt b/src/storm-gspn/CMakeLists.txt index b8e5caeef0..c4d72c7d57 100644 --- a/src/storm-gspn/CMakeLists.txt +++ b/src/storm-gspn/CMakeLists.txt @@ -7,7 +7,7 @@ target_sources(storm-gspn ${STORM_GSPN_SOURCES} PUBLIC FILE_SET fs_storm_gspn_headers TYPE HEADERS BASE_DIRS "${PROJECT_SOURCE_DIR}/src" FILES ${STORM_GSPN_HEADERS}) -target_precompile_headers(storm-gspn REUSE_FROM storm) +storm_target_precompile_headers(storm-gspn REUSE_FROM storm) set_target_properties(storm-gspn PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) target_link_libraries(storm-gspn PUBLIC storm storm-conv storm-parsers ${STORM_GSPN_LINK_LIBRARIES}) set_target_properties(storm-gspn PROPERTIES DEFINE_SYMBOL "") # to avoid problems with pch on linux. diff --git a/src/storm-pars-cli/CMakeLists.txt b/src/storm-pars-cli/CMakeLists.txt index d7e8d0d2f7..c6255dc2e5 100644 --- a/src/storm-pars-cli/CMakeLists.txt +++ b/src/storm-pars-cli/CMakeLists.txt @@ -8,7 +8,7 @@ target_link_libraries(storm-pars-cli storm-pars storm-cli-utilities) target_include_directories(storm-pars-cli PRIVATE "${PROJECT_SOURCE_DIR}/src") set_target_properties(storm-pars-cli PROPERTIES OUTPUT_NAME "storm-pars") set_target_properties(storm-pars-cli PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) -target_precompile_headers(storm-pars-cli REUSE_FROM storm-cli) +storm_target_precompile_headers(storm-pars-cli REUSE_FROM storm-cli) add_dependencies(binaries storm-pars-cli) diff --git a/src/storm-pars/CMakeLists.txt b/src/storm-pars/CMakeLists.txt index 5ceba61162..cdff27042b 100644 --- a/src/storm-pars/CMakeLists.txt +++ b/src/storm-pars/CMakeLists.txt @@ -8,7 +8,7 @@ target_sources(storm-pars ${STORM_PARS_SOURCES} PUBLIC FILE_SET fs_storm_pars_headers TYPE HEADERS BASE_DIRS "${PROJECT_SOURCE_DIR}/src" FILES ${STORM_PARS_HEADERS}) -target_precompile_headers(storm-pars REUSE_FROM storm) +storm_target_precompile_headers(storm-pars REUSE_FROM storm) set_target_properties(storm-pars PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) set_target_properties(storm-pars PROPERTIES DEFINE_SYMBOL "") # to avoid problems with pch on linux. target_link_libraries(storm-pars PUBLIC storm) diff --git a/src/storm-pars/modelchecker/region/RegionSplittingStrategy.h b/src/storm-pars/modelchecker/region/RegionSplittingStrategy.h index df7698ad57..17db3bc944 100644 --- a/src/storm-pars/modelchecker/region/RegionSplittingStrategy.h +++ b/src/storm-pars/modelchecker/region/RegionSplittingStrategy.h @@ -1,5 +1,8 @@ #pragma once +#include +#include +#include #include #include "RegionSplitEstimateKind.h" diff --git a/src/storm-parsers/CMakeLists.txt b/src/storm-parsers/CMakeLists.txt index 8564131b35..e758deb683 100644 --- a/src/storm-parsers/CMakeLists.txt +++ b/src/storm-parsers/CMakeLists.txt @@ -11,7 +11,7 @@ target_sources(storm-parsers ${STORM_PARSER_SOURCES} PUBLIC FILE_SET fs_storm_parsers_headers TYPE HEADERS BASE_DIRS "${PROJECT_SOURCE_DIR}/src" FILES ${STORM_PARSER_HEADERS}) -target_precompile_headers(storm-parsers REUSE_FROM storm) +storm_target_precompile_headers(storm-parsers REUSE_FROM storm) set_target_properties(storm-parsers PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) set_target_properties(storm-parsers PROPERTIES DEFINE_SYMBOL "") # to avoid problems with pch on linux. target_link_libraries(storm-parsers PUBLIC storm) diff --git a/src/storm-permissive/CMakeLists.txt b/src/storm-permissive/CMakeLists.txt index 1b5138ce8b..323ac622a0 100644 --- a/src/storm-permissive/CMakeLists.txt +++ b/src/storm-permissive/CMakeLists.txt @@ -8,7 +8,7 @@ target_sources(storm-permissive ${STORM_PERMISSIVE_SOURCES} PUBLIC FILE_SET fs_storm_permissive_headers TYPE HEADERS BASE_DIRS "${PROJECT_SOURCE_DIR}/src" FILES ${STORM_PERMISSIVE_HEADERS}) -target_precompile_headers(storm-permissive REUSE_FROM storm) +storm_target_precompile_headers(storm-permissive REUSE_FROM storm) set_target_properties(storm-permissive PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) set_target_properties(storm-permissive PROPERTIES DEFINE_SYMBOL "") # to avoid problems with pch on linux. target_link_libraries(storm-permissive PUBLIC storm) diff --git a/src/storm-pomdp-cli/CMakeLists.txt b/src/storm-pomdp-cli/CMakeLists.txt index e68c6cc5d4..316d62cf78 100644 --- a/src/storm-pomdp-cli/CMakeLists.txt +++ b/src/storm-pomdp-cli/CMakeLists.txt @@ -5,7 +5,7 @@ add_executable(storm-pomdp-cli ${PROJECT_SOURCE_DIR}/src/storm-pomdp-cli/storm-p target_link_libraries(storm-pomdp-cli storm-pomdp storm-cli-utilities) set_target_properties(storm-pomdp-cli PROPERTIES OUTPUT_NAME "storm-pomdp") target_include_directories(storm-pomdp-cli PRIVATE "${PROJECT_SOURCE_DIR}/src") -target_precompile_headers(storm-pomdp-cli REUSE_FROM storm-cli) +storm_target_precompile_headers(storm-pomdp-cli REUSE_FROM storm-cli) set_target_properties(storm-pomdp-cli PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) add_dependencies(binaries storm-pomdp-cli) diff --git a/src/storm-pomdp/CMakeLists.txt b/src/storm-pomdp/CMakeLists.txt index 019585a307..9701f93bf7 100644 --- a/src/storm-pomdp/CMakeLists.txt +++ b/src/storm-pomdp/CMakeLists.txt @@ -8,7 +8,7 @@ target_sources(storm-pomdp ${STORM_POMDP_SOURCES} PUBLIC FILE_SET fs_storm_pomdp_headers TYPE HEADERS BASE_DIRS "${PROJECT_SOURCE_DIR}/src" FILES ${STORM_POMDP_HEADERS}) -target_precompile_headers(storm-pomdp REUSE_FROM storm) +storm_target_precompile_headers(storm-pomdp REUSE_FROM storm) set_target_properties(storm-pomdp PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) set_target_properties(storm-pomdp PROPERTIES DEFINE_SYMBOL "") # to avoid problems with pch on linux. target_link_libraries(storm-pomdp PUBLIC storm storm-parsers storm-pars) diff --git a/src/storm/CMakeLists.txt b/src/storm/CMakeLists.txt index 24d978ca82..742197c28d 100644 --- a/src/storm/CMakeLists.txt +++ b/src/storm/CMakeLists.txt @@ -19,7 +19,7 @@ add_library(storm SHARED) target_sources(storm PRIVATE ${STORM_SOURCES}) target_sources(storm PUBLIC FILE_SET fs_storm_headers TYPE HEADERS BASE_DIRS "${PROJECT_SOURCE_DIR}/src" FILES ${STORM_HEADERS}) target_sources(storm PUBLIC FILE_SET fs_storm_configured_headers TYPE HEADERS BASE_DIRS "${PROJECT_BINARY_DIR}/include" FILES ${STORM_BUILD_HEADERS}) -target_precompile_headers(storm PRIVATE ${STORM_PRECOMPILED_HEADERS}) +storm_target_precompile_headers(storm PRIVATE ${STORM_PRECOMPILED_HEADERS}) set_target_properties(storm PROPERTIES VERSION ${STORM_VERSION} SOVERSION ${STORM_VERSION}) set_target_properties(storm PROPERTIES DEFINE_SYMBOL "") # to avoid problems with pch on linux. set_target_properties(storm PROPERTIES BUILD_RPATH ${STORM_3RDPARTY_BINARY_DIR}/spot/lib/) diff --git a/src/storm/logic/Formula.h b/src/storm/logic/Formula.h index 57863e1235..ee307b3d45 100644 --- a/src/storm/logic/Formula.h +++ b/src/storm/logic/Formula.h @@ -1,7 +1,9 @@ #ifndef STORM_LOGIC_FORMULA_H_ #define STORM_LOGIC_FORMULA_H_ +#include #include +#include #include #include #include diff --git a/src/storm/solver/helper/SchedulerTrackingHelper.h b/src/storm/solver/helper/SchedulerTrackingHelper.h index 7a3ad04c37..95245dbd91 100644 --- a/src/storm/solver/helper/SchedulerTrackingHelper.h +++ b/src/storm/solver/helper/SchedulerTrackingHelper.h @@ -2,6 +2,8 @@ #include #include +#include + #include "storm/solver/OptimizationDirection.h" #include "storm/solver/UncertaintyResolutionMode.h" #include "storm/solver/helper/ValueIterationOperatorForward.h" diff --git a/src/storm/storage/bisimulation/Block.h b/src/storm/storage/bisimulation/Block.h index db412e739b..d7bc864991 100644 --- a/src/storm/storage/bisimulation/Block.h +++ b/src/storm/storage/bisimulation/Block.h @@ -1,5 +1,7 @@ #pragma once +#include + #include "storm/storage/sparse/StateType.h" namespace storm { diff --git a/src/storm/storage/bisimulation/DeterministicBlockData.h b/src/storm/storage/bisimulation/DeterministicBlockData.h index e0f345813b..84f274436c 100644 --- a/src/storm/storage/bisimulation/DeterministicBlockData.h +++ b/src/storm/storage/bisimulation/DeterministicBlockData.h @@ -1,5 +1,9 @@ #pragma once +#include +#include +#include + #include "storm/storage/bisimulation/Block.h" namespace storm { diff --git a/src/storm/utility/SignalHandler.h b/src/storm/utility/SignalHandler.h index 59cba034b2..f7602d99d7 100644 --- a/src/storm/utility/SignalHandler.h +++ b/src/storm/utility/SignalHandler.h @@ -3,6 +3,8 @@ #include #include +#include + #include "storm-config.h" #include "storm/utility/OsDetection.h" diff --git a/src/storm/utility/numerical.h b/src/storm/utility/numerical.h index 25e15308d6..b8e904c582 100644 --- a/src/storm/utility/numerical.h +++ b/src/storm/utility/numerical.h @@ -1,5 +1,6 @@ #pragma once +#include #include namespace storm { diff --git a/src/storm/utility/shortestPaths.h b/src/storm/utility/shortestPaths.h index 63acb9fd89..8e3696c49e 100644 --- a/src/storm/utility/shortestPaths.h +++ b/src/storm/utility/shortestPaths.h @@ -1,7 +1,13 @@ #ifndef STORM_UTIL_SHORTESTPATHS_H_ #define STORM_UTIL_SHORTESTPATHS_H_ +#include #include +#include +#include +#include +#include +#include #include #include diff --git a/src/storm/utility/threads.cpp b/src/storm/utility/threads.cpp index eee44c2e9e..0731c75edd 100644 --- a/src/storm/utility/threads.cpp +++ b/src/storm/utility/threads.cpp @@ -1,5 +1,7 @@ #include "storm/utility/threads.h" +#include +#include #include #include diff --git a/src/storm/utility/threads.h b/src/storm/utility/threads.h index a5851a0d68..2fe6e9b7b5 100644 --- a/src/storm/utility/threads.h +++ b/src/storm/utility/threads.h @@ -1,5 +1,7 @@ #pragma once +#include + namespace storm { namespace utility { uint64_t getNumberOfThreads(); diff --git a/src/test/storm-dft/CMakeLists.txt b/src/test/storm-dft/CMakeLists.txt index d8e12cc84d..bb54502a4f 100644 --- a/src/test/storm-dft/CMakeLists.txt +++ b/src/test/storm-dft/CMakeLists.txt @@ -12,7 +12,7 @@ foreach (testsuite api bdd simulator storage transformations) target_link_libraries(test-dft-${testsuite} storm-dft storm-parsers) target_link_libraries(test-dft-${testsuite} ${STORM_TEST_LINK_LIBRARIES}) target_include_directories(test-dft-${testsuite} PRIVATE "${PROJECT_SOURCE_DIR}/src") - target_precompile_headers(test-dft-${testsuite} REUSE_FROM test-builder) + storm_target_precompile_headers(test-dft-${testsuite} REUSE_FROM test-builder) add_dependencies(test-dft-${testsuite} test-resources) add_test(NAME run-test-dft-${testsuite} COMMAND $) diff --git a/src/test/storm-gamebased-ar/CMakeLists.txt b/src/test/storm-gamebased-ar/CMakeLists.txt index 7436c99b5f..5547645675 100644 --- a/src/test/storm-gamebased-ar/CMakeLists.txt +++ b/src/test/storm-gamebased-ar/CMakeLists.txt @@ -11,7 +11,7 @@ foreach (testsuite abstraction modelchecker) target_link_libraries(test-gamebased-ar-${testsuite} storm-gamebased-ar storm-parsers) target_link_libraries(test-gamebased-ar-${testsuite} ${STORM_TEST_LINK_LIBRARIES}) target_include_directories(test-gamebased-ar-${testsuite} PRIVATE "${PROJECT_SOURCE_DIR}/src") - target_precompile_headers(test-gamebased-ar-${testsuite} REUSE_FROM test-builder) + storm_target_precompile_headers(test-gamebased-ar-${testsuite} REUSE_FROM test-builder) add_dependencies(test-gamebased-ar-${testsuite} test-resources) add_test(NAME run-test-gamebased-ar-${testsuite} COMMAND $) diff --git a/src/test/storm-pars/CMakeLists.txt b/src/test/storm-pars/CMakeLists.txt index 6b66b6d6ee..32753f211d 100644 --- a/src/test/storm-pars/CMakeLists.txt +++ b/src/test/storm-pars/CMakeLists.txt @@ -11,7 +11,7 @@ foreach (testsuite derivative modelchecker transformer utility) target_link_libraries(test-pars-${testsuite} storm-pars storm-parsers) target_link_libraries(test-pars-${testsuite} ${STORM_TEST_LINK_LIBRARIES}) target_include_directories(test-pars-${testsuite} PRIVATE "${PROJECT_SOURCE_DIR}/src") - target_precompile_headers(test-pars-${testsuite} REUSE_FROM test-builder) + storm_target_precompile_headers(test-pars-${testsuite} REUSE_FROM test-builder) add_dependencies(test-pars-${testsuite} test-resources) add_test(NAME run-test-pars-${testsuite} COMMAND $) diff --git a/src/test/storm-permissive/CMakeLists.txt b/src/test/storm-permissive/CMakeLists.txt index e382cf98e0..49406045c5 100644 --- a/src/test/storm-permissive/CMakeLists.txt +++ b/src/test/storm-permissive/CMakeLists.txt @@ -11,7 +11,7 @@ foreach (testsuite analysis) target_link_libraries(test-permissive-${testsuite} storm-permissive storm-parsers) target_link_libraries(test-permissive-${testsuite} ${STORM_TEST_LINK_LIBRARIES}) target_include_directories(test-permissive-${testsuite} PRIVATE "${PROJECT_SOURCE_DIR}/src") - target_precompile_headers(test-permissive-${testsuite} REUSE_FROM test-builder) + storm_target_precompile_headers(test-permissive-${testsuite} REUSE_FROM test-builder) add_dependencies(test-permissive-${testsuite} test-resources) add_test(NAME run-test-permissive-${testsuite} COMMAND $) diff --git a/src/test/storm-pomdp/CMakeLists.txt b/src/test/storm-pomdp/CMakeLists.txt index 3d31c7a49f..86665b07a1 100644 --- a/src/test/storm-pomdp/CMakeLists.txt +++ b/src/test/storm-pomdp/CMakeLists.txt @@ -11,7 +11,7 @@ foreach (testsuite analysis api modelchecker tracking transformation) target_link_libraries(test-pomdp-${testsuite} storm-pomdp storm-parsers) target_link_libraries(test-pomdp-${testsuite} ${STORM_TEST_LINK_LIBRARIES}) target_include_directories(test-pomdp-${testsuite} PRIVATE "${PROJECT_SOURCE_DIR}/src") - target_precompile_headers(test-pomdp-${testsuite} REUSE_FROM test-builder) + storm_target_precompile_headers(test-pomdp-${testsuite} REUSE_FROM test-builder) add_dependencies(test-pomdp-${testsuite} test-resources) add_test(NAME run-test-pomdp-${testsuite} COMMAND $) diff --git a/src/test/storm/CMakeLists.txt b/src/test/storm/CMakeLists.txt index b1e6831b91..ebe43a4343 100755 --- a/src/test/storm/CMakeLists.txt +++ b/src/test/storm/CMakeLists.txt @@ -26,10 +26,10 @@ foreach(testsuite ${NON_SPLIT_TESTS}) add_executable(test-${testsuite} ${TEST_${testsuite}_FILES} ${STORM_TESTS_BASE_PATH}/storm-test.cpp) if (REUSE_PCH_FROM STREQUAL "") # note that reusing from storm main leads to errors on arch linux (late 2023). - target_precompile_headers(test-${testsuite} PRIVATE ${STORM_PRECOMPILED_HEADERS}) + storm_target_precompile_headers(test-${testsuite} PRIVATE ${STORM_PRECOMPILED_HEADERS}) set(REUSE_PCH_FROM "test-${testsuite}") else () - target_precompile_headers(test-${testsuite} REUSE_FROM ${REUSE_PCH_FROM}) + storm_target_precompile_headers(test-${testsuite} REUSE_FROM ${REUSE_PCH_FROM}) endif() configure_testsuite_target(${testsuite}) endforeach() @@ -39,7 +39,7 @@ foreach(modelchecker_split ${MODELCHECKER_TEST_SPLITS}) file(GLOB_RECURSE TEST_MODELCHECKER_${modelchecker_split}_FILES ${STORM_TESTS_BASE_PATH}/modelchecker/${modelchecker_split}/*.h ${STORM_TESTS_BASE_PATH}/modelchecker/${modelchecker_split}/*.cpp ${STORM_TESTS_BASE_PATH}/../storm_gtest.cpp) add_executable(test-modelchecker-${modelchecker_split} ${TEST_MODELCHECKER_${modelchecker_split}_FILES} ${STORM_TESTS_BASE_PATH}/storm-test.cpp) configure_testsuite_target(modelchecker-${modelchecker_split}) - target_precompile_headers(test-modelchecker-${modelchecker_split} REUSE_FROM ${REUSE_PCH_FROM}) + storm_target_precompile_headers(test-modelchecker-${modelchecker_split} REUSE_FROM ${REUSE_PCH_FROM}) endforeach() # Modelchecker-Prctl testsuite split @@ -47,5 +47,5 @@ foreach(prctl_split ${MODELCHECKER_PRCTL_TEST_SPLITS}) file(GLOB_RECURSE TEST_MODELCHECKER_PRCTL_${prctl_split}_FILES ${STORM_TESTS_BASE_PATH}/modelchecker/prctl/${prctl_split}/*.h ${STORM_TESTS_BASE_PATH}/modelchecker/prctl/${prctl_split}/*.cpp ${STORM_TESTS_BASE_PATH}/../storm_gtest.cpp) add_executable(test-modelchecker-prctl-${prctl_split} ${TEST_MODELCHECKER_PRCTL_${prctl_split}_FILES} ${STORM_TESTS_BASE_PATH}/storm-test.cpp) configure_testsuite_target(modelchecker-prctl-${prctl_split}) - target_precompile_headers(test-modelchecker-prctl-${prctl_split} REUSE_FROM ${REUSE_PCH_FROM}) + storm_target_precompile_headers(test-modelchecker-prctl-${prctl_split} REUSE_FROM ${REUSE_PCH_FROM}) endforeach()