fixed build to use always asan on debug #55
Workflow file for this run
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: "Build Artifact" | |
on: [push, pull_request] | |
env: | |
CMAKE_FLAGS: "-DCFB_BUILD_TOOLS:BOOL=ON -DCFB_BUILD_TESTS:BOOL=ON -DCFB_BUILD_GUI:BOOL=ON" | |
CMAKE_TOOLCHAIN_FILE: "C:\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake" | |
jobs: | |
build: | |
name: "${{ matrix.os }}/${{ matrix.platform }}/${{ matrix.configuration }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ['windows-latest'] | |
platform: ['x64', 'arm64'] | |
configuration: ['Debug', 'RelWithDebInfo'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Sets Windows specific environment variables | |
if: matrix.os == 'windows-latest' | |
shell: powershell | |
run: | | |
echo "NB_CPU=$env:NUMBER_OF_PROCESSORS" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Inject slug/short variables | |
uses: rlespinasse/[email protected] | |
- name: Setup msbuild | |
if: matrix.os == 'windows-latest' | |
shell: pwsh | |
run: | | |
Import-Module .\.github\Invoke-VisualStudio.ps1 | |
Invoke-VisualStudio2022${{ matrix.platform }} | |
- name: Build CFB | |
run: | | |
mkdir ./build | |
cmake -S . -B ./build -A ${{ matrix.platform }} ${{ env.CMAKE_FLAGS }} | |
cmake --build ./build --verbose --parallel ${{ env.NB_CPU }} --config ${{ matrix.configuration }} | |
- name: Run tests | |
if: matrix.configuration == 'RelWithDebInfo' && matrix.platform == 'x64' | |
continue-on-error: true | |
run: | | |
cd build | |
ctest --parallel ${{ env.NB_CPU }} --build-config ${{ matrix.configuration }} -T test | |
cd .. | |
- name: Prepare artifact | |
if: matrix.configuration == 'RelWithDebInfo' | |
run: | | |
mkdir artifact | |
cmake --install ./build --config ${{ matrix.configuration }} --prefix ./artifact --verbose | |
- name: Publish artifact | |
uses: actions/upload-artifact@v3 | |
if: matrix.configuration == 'RelWithDebInfo' | |
with: | |
name: CFB_${{ matrix.platform }}_${{ matrix.configuration }}_${{ env.GITHUB_REF_SLUG }}_${{ env.GITHUB_SHA_SHORT }} | |
path: artifact/ |