Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .github/workflows/before-all-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ git clone https://github.com/stormchecker/storm.git -b ${STORM_VERSION}
cd storm
mkdir build
cd build
cmake .. -DSTORM_BUILD_TESTS=OFF -DSTORM_BUILD_EXECUTABLES=OFF -DSTORM_PORTABLE=ON
cmake .. -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} -DSTORM_BUILD_TESTS=OFF -DSTORM_BUILD_EXECUTABLES=OFF -DSTORM_PORTABLE=ON
make -j ${NR_JOBS}
make install
cd ..
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/before-all-macos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ git clone https://github.com/stormchecker/storm.git -b ${STORM_VERSION}
cd storm
mkdir build
cd build
cmake .. -DSTORM_BUILD_TESTS=OFF -DSTORM_BUILD_EXECUTABLES=OFF -DSTORM_PORTABLE=ON
cmake .. -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:-Release} -DSTORM_BUILD_TESTS=OFF -DSTORM_BUILD_EXECUTABLES=OFF -DSTORM_PORTABLE=ON
make -j ${NR_JOBS}
sudo chown runner:admin /usr/local/ # Permission differ in macOS 14, see https://github.com/actions/runner-images/issues/9272
make install
Expand Down
40 changes: 29 additions & 11 deletions .github/workflows/create_wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,16 @@ on:
required: true
type: string
default: 'x.y.z'
dev_version:
description: 'Whether to build a development version for only selected Python versions'
full_build:
description: 'Build for all Python versions (if false, 3.13 and 3.14 only)'
required: true
type: boolean
default: false
build_type:
description: 'Build configuration (Release/Debug)'
required: false
type: string
default: 'Release'
repo:
description: 'Repository to build from (owner/name)'
required: false
Expand All @@ -43,11 +48,16 @@ on:
required: true
type: string
default: 'x.y.z'
dev_version:
description: 'Whether to build a development version for only selected Python versions'
full_build:
description: 'Build for all Python versions (if false, 3.13 and 3.14 only)'
required: true
type: boolean
default: false
build_type:
description: 'Build configuration (Release/Debug)'
required: false
type: string
default: 'Release'
repo:
description: 'Repository to build from (owner/name)'
required: false
Expand Down Expand Up @@ -104,26 +114,34 @@ jobs:
- name: Prepare version
run: perl -i -pe 's/__version__ = "[^"]+"/__version__ = "'"${{ inputs.version }}"'"/' lib/stormpy/_version.py
- name: Build wheels (development)
if: ${{ inputs.dev_version }}
if: ${{ !inputs.full_build }}
uses: pypa/cibuildwheel@v3.4.1
env:
CIBW_PLATFORM: ${{ matrix.platform }}
CIBW_ARCHS: ${{ matrix.archs }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.deploy_target }}
# Build development version only on latest Python versions
CIBW_BUILD: "cp313-* cp314-*"
CIBW_ENVIRONMENT: STORM_VERSION=${{ inputs.storm_version }} NR_JOBS=4
CIBW_CONFIG_SETTINGS: cmake.build-type=${{ inputs.build_type }}
CIBW_ENVIRONMENT: >-
STORM_VERSION=${{ inputs.storm_version }}
NR_JOBS=4
CMAKE_BUILD_TYPE=${{ inputs.build_type }}
- name: Build wheels (stable)
if: ${{ !inputs.dev_version }}
if: ${{ inputs.full_build }}
uses: pypa/cibuildwheel@v3.4.1
env:
CIBW_PLATFORM: ${{ matrix.platform }}
CIBW_ARCHS: ${{ matrix.archs }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.deploy_target }}
CIBW_ENVIRONMENT: STORM_VERSION=${{ inputs.storm_version }} NR_JOBS=4
CIBW_CONFIG_SETTINGS: cmake.build-type=${{ inputs.build_type }}
CIBW_ENVIRONMENT: >-
STORM_VERSION=${{ inputs.storm_version }}
NR_JOBS=4
CMAKE_BUILD_TYPE=${{ inputs.build_type }}
- uses: actions/upload-artifact@v7
with:
name: stormpy-wheels-${{ matrix.os }}
name: stormpy-wheels-${{ matrix.os }}-${{ inputs.build_type }}
path: ./wheelhouse/*.whl


Expand Down Expand Up @@ -177,7 +195,7 @@ jobs:
steps:
- uses: actions/download-artifact@v8
with:
pattern: stormpy-wheels-${{ matrix.arch.name }}
pattern: stormpy-wheels-${{ matrix.arch.name }}-${{ inputs.build_type }}
path: dist
merge-multiple: true
- name: Checkout test files (default current repo)
Expand Down Expand Up @@ -266,7 +284,7 @@ jobs:
xcode-version: ${{ matrix.distro.xcode }}
- uses: actions/download-artifact@v8
with:
pattern: stormpy-wheels-${{ matrix.distro.os }}
pattern: stormpy-wheels-${{ matrix.distro.os }}-${{ inputs.build_type }}
path: dist
merge-multiple: true
- name: Install from wheel
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ jobs:
with:
storm_version: ${{ needs.env_storm_version.outputs.storm_version }}
version: ${{ github.event.release.tag_name }}
dev_version: false
full_build: true
build_type: Release
secrets: inherit

upload_pypi:
Expand Down
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -225,8 +225,9 @@ endif()
# Set number types from Carl
set_variable_string(STORM_USE_CLN_EA_BOOL ${STORM_USE_CLN_EA})
set_variable_string(STORM_USE_CLN_RF_BOOL ${STORM_USE_CLN_RF})
set_variable_string(STORMPY_PRETEND_FETCH ${STORMPY_INFO_PRETEND_FETCH})
set_variable_string(STORM_DEVELOPER_VERSION ${STORM_VERSION_DEV})
set(STORM_BUILD_TYPE "\"${CMAKE_BUILD_TYPE}\"")
set_variable_string(STORMPY_PRETEND_FETCH ${STORMPY_INFO_PRETEND_FETCH})
if (STORM_FETCHED_FROM_REPO)
set(STORM_ORIGIN_REPO "\"${STORM_FETCHED_FROM_REPO}\"")
else()
Expand Down
1 change: 1 addition & 0 deletions cmake/info_config.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

STORM_VERSION = "@STORM_VERSION@"
STORM_DEVELOPER_VERSION = @STORM_DEVELOPER_VERSION@
STORM_BUILD_TYPE = @STORM_BUILD_TYPE@
STORM_DIRECTORY = @STORM_DIR@
STORM_ORIGIN_REPO = @STORM_ORIGIN_REPO@
STORM_ORIGIN_TAG = @STORM_ORIGIN_TAG@
Expand Down
10 changes: 10 additions & 0 deletions lib/stormpy/info/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@ def storm_development_version() -> bool:
return _config.STORM_DEVELOPER_VERSION


def storm_build_type() -> str:
"""
Get the build type of stormpy (e.g. Release, Debug).

:return: Build type string
:rtype: str
"""
return _config.STORM_BUILD_TYPE


def storm_origin_info() -> [str | None, str | None]:
"""
Information about the source of Storm: the repo path, the repo tag and commit hash.
Expand Down
4 changes: 4 additions & 0 deletions tests/info/test_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ def test_version_equal(self):
assert stormpy.info.storm_version() in stormpy.info.Version.short
assert (stormpy.info.Version.development and stormpy.info.Version.short.endswith(" (dev)")) or not stormpy.info.Version.development

def test_build_type(self):
bt = stormpy.info.storm_build_type()
assert bt in ("Debug", "Release")

def test_origin_info(self):
repo, tag, h = stormpy.info.storm_origin_info()
assert repo is None or isinstance(repo, str)
Expand Down
Loading