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
21 changes: 15 additions & 6 deletions .github/workflows/ci-main.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
name: libcosimpy CI

# This workflow is triggered on pushes to the repository.
on: [push, workflow_dispatch]
on:
push:
workflow_dispatch:
inputs:
conan_build:
description: 'Conan build params, separated by comma (,)'
required: false
type: string
default: "missing"

jobs:
code_quality:
name: Code Quality
runs-on: 'ubuntu-latest'
timeout-minutes: 35
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
Expand Down Expand Up @@ -35,7 +43,7 @@ jobs:
matrix:
platform: [ 'windows-latest', 'ubuntu-latest' ]
python-version: [ 'cp311', 'cp312', 'cp313', 'cp314' ]
timeout-minutes: 35
timeout-minutes: 45
env:
CONAN_REVISIONS_ENABLED: 1
steps:
Expand All @@ -49,10 +57,11 @@ jobs:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Build wheels
uses: pypa/cibuildwheel@v3.3.0
uses: pypa/cibuildwheel@v3.4.1
env:
CIBW_BUILD: "${{ matrix.python-version }}-win_amd64 ${{ matrix.python-version }}-manylinux_x86_64"
CIBW_BUILD_FRONTEND: build[uv]
CIBW_CONFIG_SETTINGS: "CONAN_BUILD=${{ inputs.conan_build }}"
CIBW_ENVIRONMENT: >
CONAN_UPLOAD_OSP=1
CONAN_LOGIN_USERNAME_OSP=${{ secrets.osp_artifactory_usr }}
Expand All @@ -75,7 +84,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.14
- name: Build source
run: |
pip install build twine
Expand All @@ -89,7 +98,7 @@ jobs:
path: ./dist/*.tar.gz

publish:
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
needs:
- code_quality
- build_wheels_and_test
Expand Down
5 changes: 4 additions & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@

class LibCosimpyConanDependency(ConanFile):
name = "libcosimpy-recipe"
requires = "libcosimc/0.11.0@osp/stable"
default_options = {
"libcosim/*:proxyfmu": True,
}

def requirements(self):
self.requires("libcosimc/0.11.2@osp/stable")
self.requires("cli11/[~2.6.0]", override=True)
Comment thread
kyllingstad marked this conversation as resolved.

def configure(self):
self.options["*"].shared = False
self.options["libcosimc/*"].shared = True
Expand Down
4 changes: 2 additions & 2 deletions hatch_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def initialize(self, version: str, build_data: dict[str, Any]) -> None:
if package_list:
build_packages = " ".join([f"-b {p}/*" for p in package_list.split(",")])
else:
build_packages = "-b missing"
build_packages = ""

install_cmd_str = (
f"conan install . -u {build_packages} -of build --format json -b b2/* -b m4/* --out-file graph.json"
f"conan install . -u -b missing {build_packages} -of build --format json --out-file graph.json"
)

install_args = shlex.split(install_cmd_str)
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ exclude = ["tests", ".github"]
[tool.hatch.build.targets.wheel.hooks.custom]
dependencies = [
"conan>=2.27.0",
"hatchling~=1.13",
"cmake>=3.10,<4.0",
"hatchling>=1.29.0",
"patchelf>=0.17.2; platform_system == 'Linux'"
]

Expand All @@ -61,7 +60,7 @@ test-command = "uv run --with pytest pytest {package}"

[tool.cibuildwheel.linux]
before-all = [
"yum install -y libatomic",
"yum install -y libatomic doxygen",
"yum install -y perl-IPC-Cmd perl-Digest-SHA perl-Time-Piece",
]
manylinux-x86_64-image = "manylinux_2_28"
Expand Down Expand Up @@ -123,7 +122,7 @@ src = [
"src",
]
line-length = 120
target-version = "py310"
target-version = "py312"

[tool.ruff.lint]
[lint]
Expand Down
2 changes: 1 addition & 1 deletion src/libcosimpy/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.0.5"
__version__ = "0.0.6"
Loading
Loading