Update the workflow with the new min macOS image. #29
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: Sanitizers | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest] | |
type: [Debug, RelWithDebInfo, MinSizeRel, Release] | |
sanitizer: [address, memory, undefined] | |
exclude: | |
- {os: "macOS-latest", sanitizer: "memory"} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{github.workspace}}/build | |
- name: Setup dependencies | |
if: startsWith(matrix.os, 'ubuntu') | |
run: sudo apt-get install -y clang | |
- name: Configure CMake (macOS) | |
shell: bash | |
if: startsWith(matrix.os, 'macOS') | |
working-directory: ${{github.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DUTF8_USE_SANITIZER=${{ matrix.sanitizer }} | |
- name: Configure CMake with Clang (Ubuntu) | |
shell: bash | |
if: startsWith(matrix.os, 'ubuntu') | |
working-directory: ${{github.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DUTF8_USE_SANITIZER=${{ matrix.sanitizer }} | |
- name: Build | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: cmake --build . --config ${{ matrix.type }} | |
- name: Test | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: ./utf8_test | |
- name: Test No Malloc | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: ./utf8_no_malloc_test | |
- name: Test c90 | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: ./utf8_test_c90 | |
- name: Test c99 | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: ./utf8_test_c99 | |
- name: Test c11 | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: ./utf8_test_c11 | |
- name: Test c++11 | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: ./utf8_test_cpp11 | |
- name: Test c++14 | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: ./utf8_test_cpp14 | |
- name: Test c++17 | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: ./utf8_test_cpp17 | |
- name: Test c++20 | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: ./utf8_test_cpp20 |