mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
126 lines
4.4 KiB
YAML
126 lines
4.4 KiB
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'src/ifcblender/**'
|
|
- 'src/ifcconvert/**'
|
|
- 'src/ifcgeom/**'
|
|
- 'src/ifcgeom_schema_agnostic/**'
|
|
- 'src/ifcgeomserver/**'
|
|
- 'src/ifcjni/**'
|
|
- 'src/ifcmax/**'
|
|
- 'src/ifcopenshell-python/**'
|
|
- '!src/ifcopenshell-python/docs/**'
|
|
- 'src/ifcparse/**'
|
|
- 'src/ifcwrap/**'
|
|
- 'src/qtviewer/**'
|
|
- 'src/serializers/**'
|
|
- 'conda/**'
|
|
- 'cmake/**'
|
|
- '.github/workflows/ci.yml'
|
|
pull_request:
|
|
|
|
jobs:
|
|
activate:
|
|
runs-on: ubuntu-latest
|
|
if: |
|
|
github.repository == 'IfcOpenShell/IfcOpenShell' &&
|
|
!contains(github.event.head_commit.message, 'skip ci')
|
|
steps:
|
|
- run: echo ok go
|
|
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
needs: activate
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
submodules: recursive
|
|
- name: Install C++ dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt-get install --no-install-recommends \
|
|
git cmake gcc g++ \
|
|
libboost-date-time-dev \
|
|
libboost-filesystem-dev \
|
|
libboost-iostreams-dev \
|
|
libboost-program-options-dev \
|
|
libboost-regex-dev \
|
|
libboost-system-dev \
|
|
libboost-thread-dev \
|
|
python3-all-dev python3-pip \
|
|
swig libpcre3-dev libxml2-dev \
|
|
libtbb-dev nlohmann-json3-dev \
|
|
libocct-foundation-dev libocct-modeling-algorithms-dev libocct-modeling-data-dev libocct-ocaf-dev libocct-visualization-dev libocct-data-exchange-dev \
|
|
libhdf5-dev libcgal-dev libeigen3-dev
|
|
|
|
- name: ccache
|
|
uses: hendrikmuhs/ccache-action@v1
|
|
with:
|
|
key: ${GITHUB_WORKFLOW}
|
|
|
|
- name: Build ifcopenshell
|
|
run: |
|
|
mkdir build && cd build
|
|
cmake \
|
|
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
|
|
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
|
|
-DCMAKE_BUILD_TYPE=Release \
|
|
-DCMAKE_PREFIX_PATH=/usr \
|
|
-DCMAKE_SYSTEM_PREFIX_PATH=/usr \
|
|
-DOCC_INCLUDE_DIR=/usr/include/opencascade \
|
|
-DOCC_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
|
|
-DPYTHON_EXECUTABLE:FILEPATH=/usr/bin/python3 \
|
|
-DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.10 \
|
|
-DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.10.so \
|
|
-DCOLLADA_SUPPORT=Off \
|
|
"-DSCHEMA_VERSIONS=2x3;4;4x3_add1" \
|
|
-DGLTF_SUPPORT=On \
|
|
-DJSON_INCLUDE_DIR=/usr/include \
|
|
-DCGAL_INCLUDE_DIR=/usr/include \
|
|
-DGMP_INCLUDE_DIR=/usr/include \
|
|
-DMPFR_INCLUDE_DIR=/usr/include \
|
|
-DGMP_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
|
|
-DMPFR_LIBRARY_DIR=/usr/lib/x86_64-linux-gnu \
|
|
-DHDF5_INCLUDE_DIR=/usr/include/hdf5/serial \
|
|
-DEIGEN_DIR=/usr/include/eigen3 \
|
|
../cmake
|
|
sudo make -j $(nproc)
|
|
sudo make install
|
|
|
|
- name: Run IfcConvert on Sample files
|
|
run: |
|
|
(find test/input src/blenderbim/test/files -name '*.ifc' | while read i; do \
|
|
echo $i | tee -a log; \
|
|
timeout 1m "$(which IfcConvert)" -yv "$i" "$i.obj" --validate >> log 2>&1; \
|
|
echo $i $? >> statuses; \
|
|
done) || true
|
|
echo Failed
|
|
grep -v 0$ statuses
|
|
grep -v 0$ statuses | wc -l
|
|
echo Succeeded
|
|
grep 0$ statuses
|
|
grep 0$ statuses | wc -l
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
sudo /usr/bin/python -m pip install -U pip
|
|
sudo /usr/bin/python -m pip install xmlschema xsdata numpy lxml
|
|
sudo /usr/bin/python -m pip install src/bcf --no-deps
|
|
sudo /usr/bin/python -m pip install pytest
|
|
sudo /usr/bin/python -m pip install isodate
|
|
sudo /usr/bin/python -m pip install lark
|
|
sudo /usr/bin/python -m pip install networkx
|
|
sudo /usr/bin/python -m pip install https://github.com/Andrej730/aud/archive/refs/heads/master-reduced-size.zip
|
|
sudo /usr/bin/python -m pip install tabulate
|
|
sudo /usr/bin/python -m pip install python-dateutil
|
|
|
|
- name: Test
|
|
run: |
|
|
cd test
|
|
sudo /usr/bin/python tests.py
|
|
cd ../src/ifcopenshell-python
|
|
mv ifcopenshell ifcopenshell-local # Force testing on installed module
|
|
make test
|