diff --git a/.github/workflows/ci-blenderbim-daily.yml b/.github/workflows/ci-blenderbim-daily.yml index 806ce6651e..83faefbc21 100644 --- a/.github/workflows/ci-blenderbim-daily.yml +++ b/.github/workflows/ci-blenderbim-daily.yml @@ -59,7 +59,6 @@ jobs: with: architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified python-version: '3.11' - - run: echo ${{ env.DATE }} - name: Get current version id: version run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT @@ -77,6 +76,6 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: src/blenderbim_${{ matrix.config.short_name }}_${{ matrix.pyver }}/dist/blenderbim-${{steps.version.outputs.version}}.${{steps.date.outputs.date}}-${{ matrix.pyver }}-${{ matrix.config.short_name }}.zip asset_name: blenderbim-${{steps.version.outputs.version}}.${{steps.date.outputs.date}}-${{ matrix.pyver }}-${{ matrix.config.short_name }}.zip + release_name: "blenderbim-${{steps.version.outputs.version}}.${{steps.date.outputs.date}} (unstable)" tag: "blenderbim-${{steps.version.outputs.version}}.${{steps.date.outputs.date}}" overwrite: true - body: "Daily developer testing build blenderbim-${{steps.version.outputs.version}}.${{steps.date.outputs.date}}" diff --git a/.github/workflows/ci-blenderbim.yml b/.github/workflows/ci-blenderbim.yml new file mode 100644 index 0000000000..fff54a5909 --- /dev/null +++ b/.github/workflows/ci-blenderbim.yml @@ -0,0 +1,62 @@ +name: ci-blenderbim + +on: + workflow_dispatch: + +jobs: + activate: + runs-on: ubuntu-latest + if: | + github.repository == 'IfcOpenShell/IfcOpenShell' + steps: + - name: Set env + run: echo ok go + + build: + needs: activate + name: ${{ matrix.config.name }}-${{ matrix.pyver }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + pyver: [py39, py310, py311, py312] + config: + - { + name: "Windows Build", + short_name: win, + } + - { + name: "Linux Build", + short_name: linux + } + - { + name: "MacOS Build", + short_name: macos + } + - { + name: "MacOS ARM Build", + short_name: macosm1 + } + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 # https://github.com/actions/setup-python + with: + architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified + python-version: '3.11' + - name: Get current version + id: version + run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT + - name: Compile + run: | + cp -r src/blenderbim src/blenderbim_${{ matrix.config.short_name }}_${{ matrix.pyver }} && + cd src/blenderbim_${{ matrix.config.short_name }}_${{ matrix.pyver }} && + make dist PLATFORM=${{ matrix.config.short_name }} PYVERSION=${{ matrix.pyver }} IS_STABLE=TRUE + - name: Upload zip file to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: src/blenderbim_${{ matrix.config.short_name }}_${{ matrix.pyver }}/dist/blenderbim-${{steps.version.outputs.version}}-${{ matrix.pyver }}-${{ matrix.config.short_name }}.zip + asset_name: blenderbim-${{steps.version.outputs.version}}-${{ matrix.pyver }}-${{ matrix.config.short_name }}.zip + release_name: "blenderbim-${{steps.version.outputs.version}}" + tag: "blenderbim-${{steps.version.outputs.version}}" + overwrite: true diff --git a/.github/workflows/ci-ifcopenshell-python.yml b/.github/workflows/ci-ifcopenshell-python.yml index 9e8d5e933c..33e6363b12 100644 --- a/.github/workflows/ci-ifcopenshell-python.yml +++ b/.github/workflows/ci-ifcopenshell-python.yml @@ -58,5 +58,6 @@ jobs: repo_token: ${{ secrets.GITHUB_TOKEN }} file: src/ifcopenshell_${{ matrix.config.short_name }}_${{ matrix.pyver }}/dist/ifcopenshell-python-${{ steps.version.outputs.version }}-${{ matrix.pyver }}-${{ matrix.config.short_name }}.zip asset_name: ifcopenshell-python-${{ steps.version.outputs.version }}-${{ matrix.pyver }}-${{ matrix.config.short_name }}.zip + release_name: "ifcopenshell-python-${{steps.version.outputs.version}}" + tag: "ifcopenshell-python-${{steps.version.outputs.version}}" overwrite: true - body: "IfcOpenShell-Python Build ifcopenshell-python-${{steps.version.outputs.version}}" diff --git a/.github/workflows/ci-ifcsverchok-build.yml b/.github/workflows/ci-ifcsverchok-daily.yml similarity index 58% rename from .github/workflows/ci-ifcsverchok-build.yml rename to .github/workflows/ci-ifcsverchok-daily.yml index 525dea122f..74333e5ed2 100644 --- a/.github/workflows/ci-ifcsverchok-build.yml +++ b/.github/workflows/ci-ifcsverchok-daily.yml @@ -1,6 +1,7 @@ -name: Publish-ifcsverchok +name: ci-ifcsverchok-daily on: + workflow_dispatch: push: paths: - '.github/workflows/ci-ifcsverchok-build.yml' @@ -8,11 +9,6 @@ on: branches: - v0.8.0 -env: - major: 0 - minor: 0 - name: ifcsverchok - jobs: activate: runs-on: ubuntu-latest @@ -34,20 +30,22 @@ jobs: with: architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified python-version: '3.11' - - run: echo ${{ env.DATE }} + - name: Get current version + id: version + run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT - name: Get current date id: date - run: echo "::set-output name=date::$(date +'%y%m%d')" + run: echo "date=$(date +'%y%m%d')" >> $GITHUB_OUTPUT - name: Compile run: | cd src/ifcsverchok make dist - - name: Upload Zip file to release + - name: Upload zip file to release uses: svenstaro/upload-release-action@v2 with: repo_token: ${{ secrets.GITHUB_TOKEN }} - file: src/ifcsverchok/dist/ifcsverchok-${{steps.date.outputs.date}}.zip - asset_name: ifcsverchok-${{steps.date.outputs.date}}.zip - tag: "ifcsverchok-${{steps.date.outputs.date}}" + file: src/ifcsverchok/dist/ifcsverchok-${{steps.version.outputs.version}}.${{steps.date.outputs.date}}.zip + asset_name: ifcsverchok-${{steps.version.outputs.version}}.${{steps.date.outputs.date}}.zip + release_name: "ifcsverchok-${{steps.version.outputs.version}}.${{steps.date.outputs.date}}" + tag: "ifcsverchok-${{steps.version.outputs.version}}.${{steps.date.outputs.date}}" overwrite: true - body: "ifcsverchok build for ${{steps.date.outputs.date}}" diff --git a/.github/workflows/ci-ifcsverchok.yml b/.github/workflows/ci-ifcsverchok.yml new file mode 100644 index 0000000000..9b2ac64d88 --- /dev/null +++ b/.github/workflows/ci-ifcsverchok.yml @@ -0,0 +1,42 @@ +name: ci-ifcsverchok + +on: + workflow_dispatch: + +jobs: + activate: + runs-on: ubuntu-latest + if: | + github.repository == 'IfcOpenShell/IfcOpenShell' + steps: + - name: Set env + run: echo ok go + + build: + needs: activate + name: ifcsverchok + runs-on: ubuntu-latest + strategy: + fail-fast: false + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 # https://github.com/actions/setup-python + with: + architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified + python-version: '3.11' + - name: Get current version + id: version + run: echo "version=$(cat VERSION)" >> $GITHUB_OUTPUT + - name: Compile + run: | + cd src/ifcsverchok + make dist IS_STABLE=TRUE + - name: Upload zip file to release + uses: svenstaro/upload-release-action@v2 + with: + repo_token: ${{ secrets.GITHUB_TOKEN }} + file: src/ifcsverchok/dist/ifcsverchok-${{steps.version.outputs.version}}.zip + asset_name: ifcsverchok-${{steps.version.outputs.version}}.zip + release_name: "ifcsverchok-${{steps.version.outputs.version}}" + tag: "ifcsverchok-${{steps.version.outputs.version}}" + overwrite: true diff --git a/src/blenderbim/Makefile b/src/blenderbim/Makefile index 8dbdd88b42..6a025599b6 100644 --- a/src/blenderbim/Makefile +++ b/src/blenderbim/Makefile @@ -35,7 +35,7 @@ SED:=sed -i '' -e endif endif -IS_DEV_BUILD:=TRUE +IS_STABLE:=FALSE VERSION:=$(shell cat ../../VERSION) VERSION_MAJOR:=$(shell cat '../../VERSION' | cut -d '.' -f 1) VERSION_MINOR:=$(shell cat '../../VERSION' | cut -d '.' -f 2) @@ -111,7 +111,7 @@ endif # Provides dependencies that are part of IfcOpenShell mkdir dist/working - cd dist/working && wget https://github.com/IfcOpenShell/IfcOpenShell/archive/v0.8.0.zip + cd dist/working && wget https://github.com/IfcOpenShell/IfcOpenShell/archive/refs/heads/v0.8.0.zip cd dist/working && unzip v0.8.0.zip # IfcOpenBot sometimes lags behind, so we hotfix the Python utilities rm -rf dist/blenderbim/libs/site/packages/ifcopenshell/util/ @@ -286,15 +286,15 @@ endif rm -rf dist/blenderbim/libs/site/packages/numpy rm -rf dist/blenderbim/libs/site/packages/numpy.libs -ifeq ($(IS_DEV_BUILD), TRUE) +ifeq ($(IS_STABLE), TRUE) + cd dist/blenderbim && $(SED) "s/0, 0, 0/$(VERSION_MAJOR), $(VERSION_MINOR), $(VERSION_PATCH)/" __init__.py + cd dist/blenderbim && $(SED) "s/0.0.0/$(VERSION)/" blender_manifest.toml + cd dist && zip -r blenderbim-$(VERSION)-$(PYVERSION)-$(PLATFORM).zip ./* +else cd dist/blenderbim && $(SED) "s/0, 0, 0/$(VERSION_MAJOR), $(VERSION_MINOR), $(VERSION_PATCH), $(VERSION_DATE)/" __init__.py cd dist/blenderbim && $(SED) "s/0.0.0/$(VERSION).$(VERSION_DATE)/" blender_manifest.toml cd dist/blenderbim/bim && $(SED) "s/8888888/$(LAST_COMMIT_HASH)/" __init__.py cd dist && zip -r blenderbim-$(VERSION).$(VERSION_DATE)-$(PYVERSION)-$(PLATFORM).zip ./* -else - cd dist/blenderbim && $(SED) "s/0, 0, 0/$(VERSION_MAJOR), $(VERSION_MINOR), $(VERSION_PATCH)/" __init__.py - cd dist/blenderbim && $(SED) "s/0.0.0/$(VERSION)/" blender_manifest.toml - cd dist && zip -r blenderbim-$(VERSION)-$(PYVERSION)-$(PLATFORM).zip ./* endif rm -rf dist/blenderbim diff --git a/src/ifcsverchok/Makefile b/src/ifcsverchok/Makefile index 12373eea26..91f9a3c8e9 100644 --- a/src/ifcsverchok/Makefile +++ b/src/ifcsverchok/Makefile @@ -1,4 +1,28 @@ +# IfcSverchok - IFC Sverchok extension +# Copyright (C) 2020-2023 Dion Moult +# +# This file is part of IfcSverchok. +# +# IfcSverchok is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# IfcSverchok is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with IfcSverchok. If not, see . + VERSION:=`date '+%y%m%d'` +IS_STABLE:=FALSE +VERSION:=$(shell cat ../../VERSION) +VERSION_MAJOR:=$(shell cat '../../VERSION' | cut -d '.' -f 1) +VERSION_MINOR:=$(shell cat '../../VERSION' | cut -d '.' -f 2) +VERSION_PATCH:=$(shell cat '../../VERSION' | cut -d '.' -f 3) +VERSION_DATE:=$(shell date '+%y%m%d') .PHONY: dist dist: @@ -6,8 +30,13 @@ dist: mkdir -p dist/ifcsverchok cp -r ./*.py dist/ifcsverchok/ cp -r ./nodes dist/ifcsverchok/ - cd dist/ifcsverchok && sed -i "s/999999/$(VERSION)/" __init__.py +ifeq ($(IS_STABLE), TRUE) + cd dist/ifcsverchok && $(SED) "s/0, 0, 0/$(VERSION_MAJOR), $(VERSION_MINOR), $(VERSION_PATCH)/" __init__.py cd dist && zip -r ifcsverchok-$(VERSION).zip ./* +else + cd dist/ifcsverchok && $(SED) "s/0, 0, 0/$(VERSION_MAJOR), $(VERSION_MINOR), $(VERSION_PATCH), $(VERSION_DATE)/" __init__.py + cd dist && zip -r ifcsverchok-$(VERSION).$(VERSION_DATE).zip ./* +endif rm -rf dist/ifcsverchok .PHONY: clean diff --git a/src/ifcsverchok/__init__.py b/src/ifcsverchok/__init__.py index 8b45c3f712..11fe67d736 100644 --- a/src/ifcsverchok/__init__.py +++ b/src/ifcsverchok/__init__.py @@ -19,8 +19,8 @@ bl_info = { "name": "IFC for Sverchok", "author": "Martina Jakubowska, Dion Moult", - "version": (0, 0, 999999), - "blender": (2, 90, 0), + "version": (0, 0, 0), + "blender": (3, 1, 0), "location": "Node Editor", "category": "Node", "description": "An extension to Sverchok to work with IFC data",