Skip to content

Add tool scripts

Add tool scripts #76

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: '17 3 * * 4'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
preset:
- Clang
- GCC
- MSVC
build_type:
- Debug
- Release
sanitizer:
- ""
- ASan
#- Tsan
- UBSan
include:
- preset: Clang
os: ubuntu-latest
- preset: GCC
os: ubuntu-latest
- preset: MSVC
os: windows-latest
exclude:
- preset: MSVC
sanitizer: ASan
- preset: MSVC
sanitizer: UBSan
steps:
- uses: actions/checkout@v4
- name: Set environment variables
shell: bash
run: |
cat << EOF >> "$GITHUB_ENV"
PRESET=${{ matrix.preset }}
SANITIZER=${{ matrix.sanitizer }}
EOF
- name: Set reusable strings
id: strings
shell: bash
run: |
cat << EOF >> "$GITHUB_OUTPUT"
build-output-dir=${{ github.workspace }}/build
preset=${PRESET,,}
sanitizer=-DCOROFX_ENABLE_${SANITIZER^^}=ON
EOF
- name: Configure CMake
run: >
cmake
-L
-S ${{ github.workspace }}
-B ${{ steps.strings.outputs.build-output-dir }}
--preset=${{ steps.strings.outputs.preset }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
${{ steps.strings.outputs.sanitizer }}
- name: Build
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: ctest --build-config ${{ matrix.build_type }} --output-on-failure
- name: Report
uses: actions/setup-python@v3
with:
python-version: "3.12"
working-directory: ${{ steps.strings.outputs.build-output-dir }}
run: >
python ${{ github.workspace }}/tools/ci_report.py tests "$GITHUB_STEP_SUMMARY"