Skip to content

Commit

Permalink
Parallel install tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jfalcou committed Jul 2, 2022
1 parent 72f4e2c commit 98e76f3
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 30 deletions.
7 changes: 6 additions & 1 deletion .github/actions/integration/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ name: 'Checks installation process'
description: 'Checks installation process'
inputs:
branch: # Current branch
description: ' Current branch'
description: 'Current branch'
required: false
default: 'main'
mode: # Mode
description: 'Current test'
required: false
default: 0
runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.branch }}
- ${{ inputs.mode }}
62 changes: 34 additions & 28 deletions .github/actions/integration/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,42 @@
#!/bin/sh -l
set -e

echo "::group::Prepare EVE repository for branch " $1
mkdir build && cd build
cmake .. -G Ninja
ninja install | grep cmake
CURRENT_SHA1=`git rev-parse HEAD`
cd ..
echo "::endgroup::"
if [ $2 -eq 0 ]
then
echo "::group::Prepare EVE repository for branch " $1
mkdir build && cd build
cmake .. -G Ninja
ninja install | grep cmake
CURRENT_SHA1=`git rev-parse HEAD`
cd ..
echo "::endgroup::"

echo "::group::Test EVE via the install target"
mkdir install-test && cd install-test
cmake ../test/integration/install-test -G Ninja
ninja test_eve
./test_eve
cd ..
echo "::endgroup::"
echo "::group::Test EVE via the install target"
mkdir install-test && cd install-test
cmake ../test/integration/install-test -G Ninja
ninja test_eve
./test_eve
echo "::endgroup::"
fi

echo "::group::Test EVE via FetchContent"
mkdir fetch-test && cd fetch-test
cmake ../test/integration/fetch-test -G Ninja -DEVE_SHA1=$1
ninja test_eve
./test_eve
cd ..
echo "::endgroup::"
if [ $2 -eq 1 ]
then
echo "::group::Test EVE via FetchContent"
mkdir fetch-test && cd fetch-test
cmake ../test/integration/fetch-test -G Ninja -DEVE_SHA1=$1
ninja test_eve
./test_eve
echo "::endgroup::"
fi

echo "::group::Test EVE via CPM"
mkdir cpm-test && cd cpm-test
cmake ../test/integration/cpm-test -G Ninja -DEVE_SHA1=$1
ninja test_eve
./test_eve
cd ..
echo "::endgroup::"
if [ $2 -eq 2 ]
then
echo "::group::Test EVE via CPM"
mkdir cpm-test && cd cpm-test
cmake ../test/integration/cpm-test -G Ninja -DEVE_SHA1=$1
ninja test_eve
./test_eve
echo "::endgroup::"
fi

return 0;
8 changes: 7 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,19 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cfg:
- {test: installation , mode: 0 }
- {test: FetchContents, mode: 1 }
- {test: CPM , mode: 2 }
steps:
- name: Fetch current branch
uses: actions/checkout@v2
- name: Configure, install the library and check for proper installation
- name: Check EVE works with ${{ matrix.cfg.test }}
uses: ./.github/actions/integration
with:
branch: '${{ github.head_ref }}'
mode: '${{ matrix.cfg.mode }}'

specials:
needs: install
Expand Down

0 comments on commit 98e76f3

Please sign in to comment.