From 0eae59b8cd650fa995b8c9905abb30e4a2c89625 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Tue, 9 Feb 2021 09:58:12 +0100 Subject: [PATCH] Add tests for the demo --- .github/test.sh | 13 +++++++++++++ .github/workflows/demo.yml | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100755 .github/test.sh create mode 100644 .github/workflows/demo.yml diff --git a/.github/test.sh b/.github/test.sh new file mode 100755 index 00000000000..a744f6d5b08 --- /dev/null +++ b/.github/test.sh @@ -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))} diff --git a/.github/workflows/demo.yml b/.github/workflows/demo.yml new file mode 100644 index 00000000000..7d3a31bfd49 --- /dev/null +++ b/.github/workflows/demo.yml @@ -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 }}