CI: support assimp for Windows builds #84
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: macOS | |
on: [push] | |
jobs: | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
cache: true | |
cache-key-prefix: QtCache | |
- name: Install OpenCascade | |
run: | | |
brew install opencascade | |
GH_CASCADE_BASE_DIR=`brew info opencascade | grep -E -i --only-matching --max-count=1 "^(/[a-z\.\-_0-9]+)+"` | |
echo "GH_CASCADE_INC_DIR=$GH_CASCADE_BASE_DIR/include/opencascade" >> $GITHUB_ENV | |
echo "GH_CASCADE_LIB_DIR=$GH_CASCADE_BASE_DIR/lib" >> $GITHUB_ENV | |
- name: Install Assimp | |
run: | | |
brew install assimp | |
GH_ASSIMP_BASE_DIR=`brew info assimp | grep -E -i --only-matching --max-count=1 "^(/[a-z\.\-_0-9]+)+"` | |
echo "GH_ASSIMP_INC_DIR=$GH_ASSIMP_BASE_DIR/include/assimp" >> $GITHUB_ENV | |
echo "GH_ASSIMP_LIB_DIR=$GH_ASSIMP_BASE_DIR/lib" >> $GITHUB_ENV | |
- name: Get count of CPU cores | |
uses: SimenB/github-actions-cpu-cores@v1 | |
id: cpu-cores | |
- name: Build | |
run: | | |
mkdir ${{github.workspace}}/build | |
cd ${{github.workspace}}/build | |
echo CASCADE_INC_DIR=${{env.GH_CASCADE_INC_DIR}} | |
echo CASCADE_LIB_DIR=${{env.GH_CASCADE_LIB_DIR}} | |
echo ASSIMP_INC_DIR=${{env.GH_ASSIMP_INC_DIR}} | |
echo ASSIMP_LIB_DIR=${{env.GH_ASSIMP_LIB_DIR}} | |
[ ! -d $CASCADE_INC_DIR ] && echo "ERROR: OpenCascade include dir doesn't exist" | |
[ ! -d $CASCADE_LIB_DIR ] && echo "ERROR: OpenCascade lib dir doesn't exist" | |
[ ! -d $ASSIMP_INC_DIR ] && echo "ERROR: assimp include dir doesn't exist" | |
[ ! -d $ASSIMP_LIB_DIR ] && echo "ERROR: assimp lib dir doesn't exist" | |
qmake .. CONFIG+=withtests \ | |
CASCADE_INC_DIR=${{env.GH_CASCADE_INC_DIR}} \ | |
CASCADE_LIB_DIR=${{env.GH_CASCADE_LIB_DIR}} \ | |
ASSIMP_INC_DIR=${{env.GH_ASSIMP_INC_DIR}} \ | |
ASSIMP_LIB_DIR=${{env.GH_ASSIMP_LIB_DIR}} | |
make -j${{steps.cpu-cores.outputs.count}} | |
- name: Execute Unit Tests | |
working-directory: ${{github.workspace}}/build | |
run: | | |
./mayo.app/Contents/MacOS/mayo --runtests |