Skip to content

Add more ci to the project #21

Add more ci to the project

Add more ci to the project #21

Workflow file for this run

name: build-test
on:
pull_request:
branches:
- master
permissions: write-all
jobs:
linux-build-test:
runs-on: ubuntu-latest
container:
image: yanzhaowang/centipede:env
strategy:
fail-fast: false
matrix:
compiler: [gcc, clang, libc++]
name: build-test-${{ matrix.compiler }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
submodules: 'true'
- name: pre-build
uses: './.github/actions/pre_build_config'
- 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
sanitizer-build-test:
runs-on: ubuntu-latest
container:
image: yanzhaowang/centipede:env
strategy:
fail-fast: false
matrix:
sanitizer-type:
- thread
- address
- undefined
include:
- sanitizer-type: thread
check-type: 'ThreadSanitizer'
- sanitizer-type: address
check-type: 'AddressSanitizer'
- sanitizer-type: undefined
check-type: 'UndefinedBehaviorSanitizer'
name: sanitizer-${{ matrix.sanitizer-type }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 1
submodules: 'true'
- name: pre-build
uses: './.github/actions/pre_build_config'
- name: set env variables for cdash
run: |
export PULL_NR=${{ github.event.number }}
echo "TEST_NAME=\"${{ matrix.sanitizer-type }} sanitizer (pr.${PULL_NR})\"" >> $GITHUB_ENV
- name: build-test-submit
run: |
ctest -S cmake/ctest_sanitizer.cmake \
-DCTEST_BUILD_NAME=${{ env.TEST_NAME }}\
-DCTEST_SITE="Github CI/CD"\
-DCTEST_MEMORYCHECK_TYPE=${{ matrix.check-type }}\
-DENABLE_SAN=${{ matrix.sanitizer-type }}\
--output-on-failure