Add tests for the demo

This commit is contained in:
Maxime Gimeno 2021-02-09 09:58:12 +01:00
parent 5380ffd257
commit 0eae59b8cd
2 changed files with 50 additions and 0 deletions

13
.github/test.sh vendored Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
/usr/local/bin/cmake --version
FACTOR=$1
set -ex
cd Polyhedron/demo
LIST_OF_PLUGINS=$(/usr/local/bin/cmake --build . -t help | egrep 'plugin$' |& cut -d\ -f2)
PLUGINS_ARRAY=(${LIST_OF_PLUGINS});
NB_OF_PLUGINS=${#PLUGINS_ARRAY[@]}
DEL=$(($NB_OF_PLUGINS / 4))
mkdir build
cd build
/usr/local/bin/cmake -DCGAL_DIR=$2 ../Polyhedron
make -j2 ${PLUGINS_ARRAY[@]:$(($FACTOR * $DEL)):$((($FACTOR + 1) * $DEL))}

37
.github/workflows/demo.yml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Test Polyhedron Demo
on: [push, pull_request]
jobs:
batch_1:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.0.0
- name: install dependencies
run: .github/install.sh
- name: run1
run: ./.github/test.sh 0 ${{ github.workspace }}
batch_2:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.0.0
- name: install dependencies
run: .github/install.sh
- name: run2
run: ./.github/test.sh 1 ${{ github.workspace }}
batch_3:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.0.0
- name: install dependencies
run: .github/install.sh
- name: run3
run: ./.github/test.sh 2 ${{ github.workspace }}
batch_4:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.0.0
- name: install dependencies
run: .github/install.sh
- name: run4
run: ./.github/test.sh 3 ${{ github.workspace }}