IO_Assimp: WIP2 #77
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: Linux | |
on: [push] | |
jobs: | |
build-linux: | |
strategy: | |
matrix: | |
qt_version: [5.15.2, 6.5.2] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: ${{matrix.qt_version}} | |
cache: true | |
cache-key-prefix: QtCache | |
# Actually needed for Qt6 | |
- name: Install dependencies for "xcb" Qt plugin | |
run: | | |
sudo apt-get -y install libxcb-cursor0 | |
- name: Install OpenCascade | |
run: | | |
sudo apt-get -y install libocct-data-exchange-dev libocct-draw-dev | |
GH_CASCADE_INC_DIR=`dpkg -L libocct-foundation-dev | grep -i "Standard_Version.hxx" | sed "s/\/Standard_Version.hxx//i"` | |
GH_CASCADE_LIB_DIR=`dpkg -L libocct-foundation-dev | grep -i "libTKernel.so" | sed "s/\/libTKernel.so//i"` | |
echo "GH_CASCADE_INC_DIR=$GH_CASCADE_INC_DIR" >> $GITHUB_ENV | |
echo "GH_CASCADE_LIB_DIR=$GH_CASCADE_LIB_DIR" >> $GITHUB_ENV | |
- name: Install Assimp | |
run: | | |
sudo apt-get install -y install libassimp-dev | |
GH_ASSIMP_INC_DIR=`dpkg -L libassimp-dev | grep -i "version.h" | sed "s/\/version.h//i"` | |
GH_ASSIMP_LIB_DIR=`dpkg -L libassimp-dev | grep -i "libassimp.so" | sed "s/\/libassimp.so//i"` | |
echo "GH_ASSIMP_INC_DIR=$GH_ASSIMP_INC_DIR" >> $GITHUB_ENV | |
echo "GH_ASSIMP_LIB_DIR=$GH_ASSIMP_LIB_DIR" >> $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 | |
env: | |
DISPLAY: :0 | |
run: | | |
# Install french locale for testing case | |
echo "fr_FR ISO-8859-1" | sudo tee -a /etc/locale.gen | |
sudo locale-gen | |
localectl list-locales | |
# Start X11 display server | |
Xvfb $DISPLAY -screen 0 1280x1024x24 & | |
sleep 5s | |
# Run tests | |
./mayo --runtests |