Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 4 additions & 18 deletions .github/workflows/Dockerfile.stable
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,10 @@ MAINTAINER Matthias Volk <m.volk@utwente.nl>

# CMake build type
ARG build_type=Release
# Additional arguments for compiling pycarl
ARG setup_args_pycarl=""
# Additional arguments for compiling stormpy
ARG setup_args=""
# Optional support to install for stormpy, such as '[test,doc]'
ARG options=""
# Number of threads to use for parallel compilation
ARG no_threads=2

Expand All @@ -35,7 +37,6 @@ RUN apt-get install -y --no-install-recommends \
python3-venv
# Packages maven and uuid-dev are required for carl-parser


# Build carl-parser
###################
WORKDIR /opt/
Expand All @@ -60,21 +61,6 @@ ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"

RUN pip install setuptools

# Build pycarl
##############
WORKDIR /opt/

# Obtain latest version of pycarl from public repository
RUN git clone https://github.com/moves-rwth/pycarl.git

# Switch to pycarl directory
WORKDIR /opt/pycarl

# Build pycarl
RUN python setup.py build_ext $setup_args_pycarl -j $no_threads develop


# Build stormpy
###############
Expand Down
39 changes: 18 additions & 21 deletions .github/workflows/buildtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,20 @@ jobs:
strategy:
matrix:
buildType:
- {name: "Debug", dockerTag: "ci-debug", stormTag: "ci-debug", buildArgs: "BUILD_TYPE=Debug", setupArgs: "--debug"}
- {name: "Release", dockerTag: "ci", stormTag: "ci", buildArgs: "BUILD_TYPE=Release", setupArgs: ""}
- {name: "Debug", dockerTag: "ci-debug", stormTag: "ci-debug", buildArgs: "Debug", setupArgs: "--config-settings=cmake.build-type='Debug'"}
- {name: "Release", dockerTag: "ci", stormTag: "ci", buildArgs: "Release", setupArgs: ""}
configuration:
- {name: "all libraries", disableFlags: "", optionalLibs: "[numpy,plot]", testOpt: ""}
- {name: "no libraries", disableFlags: "--disable-dft --disable-gspn --disable-pars --disable-pomdp", optionalLibs: "", testOpt: "tests"}
- {name: "all libraries", disableFlags: "", optionalLibs: "[numpy,plot,test]", testOpt: ""}
- {name: "no libraries", disableFlags: "--config-settings=cmake.define.USE_STORM_DFT=OFF --config-settings=cmake.define.USE_STORM_GSPN=OFF --config-settings=cmake.define.USE_STORM_PARS=OFF --config-settings=cmake.define.USE_STORM_POMDP=OFF --config-settings=cmake.define.USE_PARSER=OFF", optionalLibs: "[test]", testOpt: "tests"}
steps:
- name: Git clone
uses: actions/checkout@v4
- name: Build stormpy from Dockerfile
run: docker build -t movesrwth/stormpy:${{ matrix.buildType.dockerTag }} . --build-arg STORM_BASE=movesrwth/storm:${{ matrix.buildType.stormTag }} --build-arg build_type=${{ matrix.buildType.buildArgs }} --build-arg setup_args="${{ matrix.buildType.setupArgs }} ${{ matrix.configuration.disableFlags }}" --build-arg setup_args_pycarl=${{ matrix.buildType.setupArgs }} --build-arg no_threads=${NR_JOBS}
run: docker build -t movesrwth/stormpy:${{ matrix.buildType.dockerTag }} . --build-arg STORM_BASE=movesrwth/storm:${{ matrix.buildType.stormTag }} --build-arg build_type=${{ matrix.buildType.buildArgs }} --build-arg setup_args="${{ matrix.buildType.setupArgs }} ${{ matrix.configuration.disableFlags }}" --build-arg options=${{ matrix.configuration.optionalLibs }} --build-arg no_threads=${NR_JOBS}
- name: Run Docker
run: docker run -d -it --name ci movesrwth/stormpy:${{ matrix.buildType.dockerTag }}
- name: Build optional stormpy libraries
run: docker exec ci bash -c "cd /opt/stormpy; pip3 install -e '.${{ matrix.configuration.optionalLibs }}'"
- name: Run tests
run: docker exec ci bash -c "cd /opt/stormpy; pip install -e '.[test]'; pytest ${{ matrix.configuration.testOpt }}"
run: docker exec ci bash -c "cd /opt/stormpy; pytest ${{ matrix.configuration.testOpt }}"


stableTest:
Expand All @@ -48,8 +46,8 @@ jobs:
strategy:
matrix:
buildType:
- {name: "Debug", dockerTag: "ci-debug", stormTag: "stable-debug", buildArgs: "BUILD_TYPE=Debug", setupArgs: "--debug"}
- {name: "Release", dockerTag: "ci", stormTag: "stable", buildArgs: "BUILD_TYPE=Release", setupArgs: ""}
- {name: "Debug", dockerTag: "ci-debug", stormTag: "stable-debug", buildArgs: "Debug", setupArgs: "--config-settings=cmake.build-type='Debug'", optionalLibs: "[test,plot]"}
- {name: "Release", dockerTag: "ci", stormTag: "stable", buildArgs: "Release", setupArgs: "", optionalLibs: "[test,plot]"}

# Allow failures of stable versions as new features might have been added
steps:
Expand All @@ -58,7 +56,7 @@ jobs:
- name: Replace Dockerfile
run: cp .github/workflows/Dockerfile.stable Dockerfile
- name: Build dependencies
run: docker build -t movesrwth/stormpy:${{ matrix.buildType.dockerTag }} . --build-arg STORM_BASE=movesrwth/storm:${{ matrix.buildType.stormTag }} --build-arg build_type=${{ matrix.buildType.buildArgs }} --build-arg setup_args_pycarl=${{ matrix.buildType.setupArgs }} --build-arg no_threads=${NR_JOBS}
run: docker build -t movesrwth/stormpy:${{ matrix.buildType.dockerTag }} . --build-arg STORM_BASE=movesrwth/storm:${{ matrix.buildType.stormTag }} --build-arg build_type=${{ matrix.buildType.buildArgs }} --build-arg no_threads=${NR_JOBS}

- name: Run Docker
run: docker run -d -it --name ci movesrwth/stormpy:${{ matrix.buildType.dockerTag }}
Expand All @@ -67,11 +65,11 @@ jobs:
id: build_stormpy
shell: bash {0} // Deactivate fast-fail to handle exit code for incompatibility
run: |
docker exec ci bash -c "cd /opt/stormpy; python setup.py build_ext ${{ matrix.buildType.setupArgs }} -j ${NR_JOBS} develop"
docker exec ci bash -c "cd /opt/stormpy; pip install -v --config-settings=cmake.define.CMAKE_BUILD_PARALLEL_LEVEL=${NR_JOBS} --config-settings=cmake.define.CARLPARSER_DIR_HINT=/opt/carl-parser/build/ ${{ matrix.buildType.setupArgs }} .${{ matrix.buildType.optionalLibs }}"
status=$?
if [ $status -eq 42 ]; then
# Warn about incompatibility but do not handle as failure
echo "::warning file=setup.py,line=82::Stormpy is incompatible with stable version of Storm"
if [ $status -eq 1 ]; then
# Warn about possible incompatibility but do not handle as failure
echo "::warning file=CMakeLists.txt,line=52::Stormpy might be incompatible with stable version of Storm"
# Deactivate tests
echo "run_tests=false" >> $GITHUB_OUTPUT
else
Expand All @@ -80,7 +78,7 @@ jobs:
fi
- name: Run tests
if: steps.build_stormpy.outputs.run_tests == 'true'
run: docker exec ci bash -c "cd /opt/stormpy; pip install -e '.[test]'; pytest"
run: docker exec ci bash -c "cd /opt/stormpy; pytest"


deploy:
Expand All @@ -89,17 +87,17 @@ jobs:
strategy:
matrix:
buildType:
- {name: "Debug", dockerTag: "ci-debug", stormTag: "ci-debug", buildArgs: "BUILD_TYPE=Debug", setupArgs: "--debug"}
- {name: "Release", dockerTag: "ci", stormTag: "ci", buildArgs: "BUILD_TYPE=Release", setupArgs: ""}
- {name: "Debug", dockerTag: "ci-debug", stormTag: "ci-debug", buildArgs: "Debug", setupArgs: "--config-settings=cmake.build-type='Debug'", optionalLibs: "[test,plot]"}
- {name: "Release", dockerTag: "ci", stormTag: "ci", buildArgs: "Release", setupArgs: "", optionalLibs: "[test,plot,doc]"}
steps:
- name: Git clone
uses: actions/checkout@v4
- name: Build stormpy from Dockerfile
run: docker build -t movesrwth/stormpy:${{ matrix.buildType.dockerTag }} . --build-arg STORM_BASE=movesrwth/storm:${{ matrix.buildType.stormTag }} --build-arg build_type=${{ matrix.buildType.buildArgs }} --build-arg setup_args=${{ matrix.buildType.setupArgs }} --build-arg setup_args_pycarl=${{ matrix.buildType.setupArgs }} --build-arg no_threads=${NR_JOBS}
run: docker build -t movesrwth/stormpy:${{ matrix.buildType.dockerTag }} . --build-arg STORM_BASE=movesrwth/storm:${{ matrix.buildType.stormTag }} --build-arg build_type=${{ matrix.buildType.buildArgs }} --build-arg setup_args=${{ matrix.buildType.setupArgs }} --build-arg options=${{ matrix.buildType.optionalLibs }} --build-arg no_threads=${NR_JOBS}
- name: Run Docker
run: docker run -d -it --name ci movesrwth/stormpy:${{ matrix.buildType.dockerTag }}
- name: Run tests
run: docker exec ci bash -c "cd /opt/stormpy; pip install -e '.[test]'; pytest"
run: docker exec ci bash -c "cd /opt/stormpy; pytest"

- name: Login into docker
# Only login if using master on original repo (and not for pull requests or forks)
Expand All @@ -116,7 +114,6 @@ jobs:
if: matrix.buildType.name == 'Release'
run: |
docker exec ci apt-get install -qq -y pandoc
docker exec ci bash -c "cd /opt/stormpy; pip install -e '.[doc,numpy]'"
- name: Build documentation
if: matrix.buildType.name == 'Release'
run: |
Expand Down
Loading