mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 09:32:37 +00:00
Automated Blenderbim releases using github actions ci (#1354)
* Initial commit for suggested blenderbim github actions setup * Changed the github repo address from fork to main repo for clarity * Include python version info to appear on asset name. Consider using additional matrix loop on python versions 37 and 39. Currently hardcoded py37 for testing * Cleanup of "python_fcl" files in dist/working before compiling BIMTester * Loop over python 3.7 and 3.9 for all platforms and build 6 releases * Set the correct repository name in the trigger. Also make the trigger only run when "[release]" is added in the commit message.
This commit is contained in:
@@ -0,0 +1,67 @@
|
|||||||
|
name: Publish-blenderbim-multiplatform
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- 'src/ifcblenderexport/*'
|
||||||
|
- '.github/workflows/ci-blenderbim-matrix.yml'
|
||||||
|
|
||||||
|
env:
|
||||||
|
major: 0
|
||||||
|
minor: 0
|
||||||
|
name: blenderbim
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
activate:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
if: |
|
||||||
|
github.repository == 'IfcOpenShell/IfcOpenShell' &&
|
||||||
|
contains(github.event.head_commit.message, '[Release]')
|
||||||
|
steps:
|
||||||
|
- name: Set env
|
||||||
|
run: echo ok go
|
||||||
|
|
||||||
|
build:
|
||||||
|
name: ${{ matrix.config.name }}-${{ matrix.pyver }}
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
pyver: [py37, py39]
|
||||||
|
config:
|
||||||
|
- {
|
||||||
|
name: "Windows Build",
|
||||||
|
short_name: win,
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
name: "Linux Build",
|
||||||
|
short_name: linux
|
||||||
|
}
|
||||||
|
- {
|
||||||
|
name: "MacOS Build",
|
||||||
|
short_name: macos
|
||||||
|
}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v2 # https://github.com/actions/setup-python
|
||||||
|
with:
|
||||||
|
python-version: '3.7.7' # Version range or exact version of a Python version to use, using SemVer's version range syntax
|
||||||
|
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified
|
||||||
|
- run: echo ${{ env.DATE }}
|
||||||
|
- name: Get current date
|
||||||
|
id: date
|
||||||
|
run: echo "::set-output name=date::$(date +'%y%m%d')"
|
||||||
|
- name: Compile
|
||||||
|
run: |
|
||||||
|
cp -r src/ifcblenderexport src/ifcblenderexport_${{ matrix.config.short_name }}_${{ matrix.pyver }} &&
|
||||||
|
cd src/ifcblenderexport_${{ matrix.config.short_name }}_${{ matrix.pyver }} &&
|
||||||
|
make dist PLATFORM=${{ matrix.config.short_name }} PYVERSION=${{ matrix.pyver }}
|
||||||
|
- name: Upload Zip file to release
|
||||||
|
uses: svenstaro/upload-release-action@v2
|
||||||
|
with:
|
||||||
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
file: src/ifcblenderexport_${{ matrix.config.short_name }}_${{ matrix.pyver }}/dist/blender28-bim-${{steps.date.outputs.date}}-${{ matrix.pyver }}-${{ matrix.config.short_name }}.zip
|
||||||
|
asset_name: blender28-bim-${{steps.date.outputs.date}}-${{ matrix.pyver }}-${{ matrix.config.short_name }}.zip
|
||||||
|
tag: "blenderbim-${{steps.date.outputs.date}}"
|
||||||
|
overwrite: true
|
||||||
|
body: "Package release blenderbim-${{steps.date.outputs.date}}"
|
||||||
@@ -239,6 +239,9 @@ endif
|
|||||||
cd dist/working && unzip python_fcl*
|
cd dist/working && unzip python_fcl*
|
||||||
cp -r dist/working/fcl dist/blenderbim/libs/site/packages/
|
cp -r dist/working/fcl dist/blenderbim/libs/site/packages/
|
||||||
|
|
||||||
|
# Cleanup after python_fcl
|
||||||
|
rm -rf dist/working
|
||||||
|
|
||||||
# Required by BIMTester
|
# Required by BIMTester
|
||||||
mkdir dist/working
|
mkdir dist/working
|
||||||
cd dist/working && wget https://files.pythonhosted.org/packages/c8/4b/d0a8c23b6c8985e5544ea96d27105a273ea22051317f850c2cdbf2029fe4/behave-1.2.6.tar.gz
|
cd dist/working && wget https://files.pythonhosted.org/packages/c8/4b/d0a8c23b6c8985e5544ea96d27105a273ea22051317f850c2cdbf2029fe4/behave-1.2.6.tar.gz
|
||||||
|
|||||||
Reference in New Issue
Block a user