Merge pull request #37 from open-cradle/for-dose-rate #510
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: GCC | |
on: [push, pull_request] | |
env: | |
CTEST_OUTPUT_ON_FAILURE: 1 | |
CRADLE_THINKNODE_API_TOKEN: ${{ secrets.CRADLE_THINKNODE_API_TOKEN }} | |
CRADLE_THINKNODE_DOCKER_AUTH: ${{ secrets.CRADLE_THINKNODE_DOCKER_AUTH }} | |
jobs: | |
gcc: | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
config: [Debug, Release] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: friendlyanon/setup-vcpkg@v1 | |
with: | |
committish: 7ba0ba7334c3346e7eee1e049ba85da193a8d821 | |
- name: Install | |
run: | | |
sudo apt install lcov ocaml-nox | |
sudo pip3 install virtualenv | |
- name: Configure | |
run: | | |
export CC=`which gcc-10` | |
export CXX=`which g++-10` | |
${CXX} --version | |
scripts/set-up-python.sh --python=python3 | |
cmake -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.config}} \ | |
-D"CMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" \ | |
. | |
- name: Build | |
run: | | |
cmake --build build --config ${{matrix.config}} -j4 | |
- name: Test | |
run: | | |
python python/generate_config.py $CRADLE_THINKNODE_API_TOKEN | |
cmake --build build --config ${{matrix.config}} --target all_unit_tests -j4 | |
source .venv/bin/activate | |
pip3 install -e python | |
cmake --build build --config ${{matrix.config}} --target integration_tests | |
- name: Benchmarks | |
if: ${{ matrix.config == 'Release' }} | |
run: | | |
cmake --build build --config Release --target benchmark_tests | |
timeout-minutes: 20 |