diff --git a/.github/workflows/ci-ifcopenshell-conda-daily.yml b/.github/workflows/ci-ifcopenshell-conda-daily.yml index c5905afa75..6d43cae605 100644 --- a/.github/workflows/ci-ifcopenshell-conda-daily.yml +++ b/.github/workflows/ci-ifcopenshell-conda-daily.yml @@ -1,6 +1,7 @@ name: ci-ifcopenshell-conda-daily on: + workflow_dispatch: push: paths: - .github/workflows/ci-ifcopenshell-conda-daily.yml @@ -18,13 +19,13 @@ jobs: activate: runs-on: ubuntu-latest if: | - github.repository == 'IfcOpenShell/IfcOpenShell' + github.repository == 'Krande/IfcOpenShell' steps: - name: Set env run: echo ok go test: - name: ${{ matrix.platform.distver }}-${{ matrix.pyver.name }} + name: ${{ matrix.platform.distver }}-${{ matrix.pyver.name }}-${{ matrix.variant }} needs: activate runs-on: ${{ matrix.platform.distver }} defaults: @@ -42,10 +43,15 @@ jobs: { name: Linux, distver: ubuntu-22.04, upload: 'true' }, { name: macOS, distver: macos-12, upload: 'true' } ] + variant: [ + 'novtk', +# 'all' + ] steps: - uses: actions/checkout@v3 with: submodules: recursive + - name: Download MacOSX SDK if: ${{ matrix.platform.name == 'macOS' }} run: | @@ -53,21 +59,21 @@ jobs: tar xf MacOSX10.13.sdk.tar.xz && \ sudo mv -v MacOSX10.13.sdk /opt/ && \ ls /opt/ + - uses: mamba-org/setup-micromamba@v1 # https://github.com/mamba-org/setup-micromamba with: + environment-name: build-env cache-environment: true - environment-file: conda/environment.yml condarc: | + channels: + - conda-forge channel_priority: strict create-args: >- - python=${{ matrix.pyver.distver }} + python=3.11 + boa + - name: build, test and upload ifcopenshell if: ${{ matrix.platform.upload == 'true' }} run: | - conda-build . --python ${{ matrix.pyver.distver }} -c conda-forge --token ${{ secrets.ANACONDA_TOKEN }} --user ifcopenshell - working-directory: ./conda - - name: build & test ifcopenshell - if: ${{ matrix.platform.upload == 'false' }} - run: | - conda-build . --python ${{ matrix.pyver.distver }} -c conda-forge + conda-build . --python ${{ matrix.pyver.distver }} -c conda-forge --variants "{variant: ${{ matrix.variant }}}" --token ${{ secrets.ANACONDA_TOKEN }} --user ifcopenshell working-directory: ./conda diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 6d8fac006e..c44f9ddc77 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -585,23 +585,31 @@ if(HDF5_SUPPORT) if(WIN32) # Windows - set(zlib_post zlib) - set(lib_ext lib) - elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - # macOS - set(zlib_post libz) - set(lib_ext dylib) + set(HDF5_LIBRARIES) + find_package(HDF5 COMPONENTS CXX) + if (HDF5_FOUND) + set(HDF5_LIBRARIES ${HDF5_CXX_LIBRARIES}) + endif() + list(APPEND HDF5_LIBRARIES + "${HDF5_LIBRARY_DIR}/zlib.lib" + ) else() - # linux - set(zlib_post libz) - set(lib_ext so) - endif() + if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + # macOS + set(zlib_post libz) + set(lib_ext dylib) + else() + # linux + set(zlib_post libz) + set(lib_ext so) + endif() - set(HDF5_LIBRARIES - "${HDF5_LIBRARY_DIR}/libhdf5_cpp.${lib_ext}" - "${HDF5_LIBRARY_DIR}/libhdf5.${lib_ext}" - "${HDF5_LIBRARY_DIR}/${zlib_post}.${lib_ext}" - ) + set(HDF5_LIBRARIES + "${HDF5_LIBRARY_DIR}/libhdf5_cpp.${lib_ext}" + "${HDF5_LIBRARY_DIR}/libhdf5.${lib_ext}" + "${HDF5_LIBRARY_DIR}/${zlib_post}.${lib_ext}" + ) + endif() endif() endif() diff --git a/conda/Makefile b/conda/Makefile deleted file mode 100644 index c4cb211f1f..0000000000 --- a/conda/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -compile: - conda activate conda-build && conda-build -c conda-forge . --keep-old-work --python 3.10.5 - -debug: - conda activate conda-build && conda-debug -c conda-forge . --python 3.10.4 - -env: - conda env update --f environment.yml --prune \ No newline at end of file diff --git a/conda/conda_build_config.yaml b/conda/conda_build_config.yaml index 5a72b972fe..00c18acf5e 100644 --- a/conda/conda_build_config.yaml +++ b/conda/conda_build_config.yaml @@ -1,2 +1,6 @@ CONDA_BUILD_SYSROOT: - - /opt/MacOSX10.13.sdk # [osx] \ No newline at end of file + - /opt/MacOSX10.13.sdk # [osx] + +variant: + - novtk + - all \ No newline at end of file diff --git a/conda/environment.yml b/conda/environment.yml deleted file mode 100644 index 863f45f4fb..0000000000 --- a/conda/environment.yml +++ /dev/null @@ -1,13 +0,0 @@ -name: conda-build -channels: - - conda-forge -dependencies: - - conda-build - - conda-verify - - anaconda-client - - ninja - - doxygen - - ripgrep - - pip - - pip: - - lief==0.13 diff --git a/conda/meta.yaml b/conda/meta.yaml index 5afdd5a56c..7b9d6b51b0 100644 --- a/conda/meta.yaml +++ b/conda/meta.yaml @@ -1,6 +1,10 @@ {% set name = "ifcopenshell" %} {% set version = "0.7.0" %} +{% set build = 1 %} +# Higher number -> Always prioritize "novtk" variant over "all" variant +{% set build = build + 200 %} # [variant == "novtk"] +{% set build = build + 100 %} # [variant == "all"] package: name: {{ name }} @@ -10,8 +14,9 @@ source: path: .. build: + string: {{ variant }}_h{{ PKG_HASH }}_{{ build }} binary_relocation: false [osx] - number: 1 + number: {{ build }} requirements: build: @@ -24,7 +29,7 @@ requirements: host: - python - boost-cpp - - occt ==7.7.0 + - occt 7.7.2 *{{ variant }}* - libxml2 - cgal-cpp - hdf5 @@ -36,16 +41,18 @@ requirements: run: - python - - {{ pin_compatible('occt', max_pin='x.x.x') }} + - occt 7.7.2 *{{ variant }}* - {{ pin_compatible('cgal-cpp', max_pin='x.x.x') }} - {{ pin_compatible('boost-cpp', max_pin='x.x.x') }} + - {{ pin_compatible('hdf5', max_pin='x.x.x') }} - libxml2 - - hdf5 - mpfr - gmp # [unix] - mpir # [win] - nlohmann_json - zlib + run_constrained: + - occt 7.7.2 *{{ variant }}* test: imports: