Skip to content

Add more ci to the project #7

Add more ci to the project

Add more ci to the project #7

Workflow file for this run

name: build-test
on:
pull_request:
branches:
- master
permissions: write-all
jobs:
linux-test:
runs-on: ubuntu-latest
container:
image: yanzhaowang/centipede:env
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang, libc++]
name: ${{ matrix.compiler }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
submodules: 'true'
- name: install and env vars
run: |
dnf upgrade -y
dnf install -y conan nodejs hostname
echo "PARENT_DIR=$PWD" >> $GITHUB_ENV
echo "CONAN_HOME=$PWD/.conan2" >> $GITHUB_ENV
echo "GTEST_COLOR=1" >> $GITHUB_ENV
- name: set env variables for cdash
run: |
if [[ $GITHUB_EVENT_NAME == "push" ]]; then
echo "TEST_MODEL=Continuous" >> $GITHUB_ENV
echo "TEST_NAME=\"${{ matrix.compiler }} (master)\"" >> $GITHUB_ENV
elif [[ $GITHUB_EVENT_NAME == "schedule" ]]; then
echo "TEST_MODEL=Nightly" >> $GITHUB_ENV
echo "TEST_NAME=\"${{ matrix.compiler }} (master)\"" >> $GITHUB_ENV
else
echo "TEST_MODEL=Experimental" >> $GITHUB_ENV
export PULL_NR=${{ github.event.number }}
echo "TEST_NAME=\"$${{ matrix.compiler }} (pr.${PULL_NR})\"" >> $GITHUB_ENV
fi
# Be very careful about CTEST_BUILD_NAME. It shouldn't contain additional double quotations
- name: build-test-submit
run: |
ctest -S cmake/ctest_dashboard.cmake -VV\
-DTEST_MODEL=${TEST_MODEL}\
-DCTEST_CONFIGURATION_TYPE=Debug\
-DCTEST_BUILD_NAME=${{ env.TEST_NAME }}\
-DCTEST_SITE="Github CI/CD"\
-DCONFIGURE_PRESET="debug-${{ matrix.compiler }}"\
--output-on-failure