Merge branch 'fix/#229' into develop #73
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: 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}} | |
[ ! -d $CASCADE_INC_DIR ] && echo "ERROR: OpenCascade include dir doesn't exist" | |
[ ! -d $CASCADE_LIB_DIR ] && echo "ERROR: OpenCascade lib dir doesn't exist" | |
qmake .. CASCADE_INC_DIR=${{env.GH_CASCADE_INC_DIR}} CASCADE_LIB_DIR=${{env.GH_CASCADE_LIB_DIR}} CONFIG+=withtests | |
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 |