Fix a null compare against an opaque struct. #287
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: CMake | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-11, macos-14] | |
type: [Debug, RelWithDebInfo, MinSizeRel, Release] | |
compiler: [default, clang, gcc, tcc] | |
exclude: | |
- {os: "macos-11", compiler: "clang"} | |
- {os: "macos-11", compiler: "gcc"} | |
- {os: "macos-11", compiler: "tcc"} | |
- {os: "macos-14", compiler: "clang"} | |
- {os: "macos-14", compiler: "gcc"} | |
- {os: "macos-14", compiler: "tcc"} | |
- {os: "ubuntu-latest", compiler: "default"} | |
- {os: "ubuntu-latest", compiler: "default"} | |
- {os: "windows-latest", compiler: "tcc"} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{github.workspace}}/build | |
- name: Setup dependencies (Ubuntu) | |
if: startsWith(matrix.os, 'ubuntu') | |
run: sudo apt-get install -y gcc-10 g++-10 clang tcc | |
- name: Setup dependencies (MinGW) | |
if: matrix.compiler == 'gcc' && startsWith(matrix.os, 'windows') | |
uses: e-t-l/setup-mingw@patch-1 | |
- name: Configure CMake | |
shell: bash | |
if: matrix.compiler == 'default' | |
working-directory: ${{github.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} | |
- name: Configure CMake with GCC (Ubuntu) | |
shell: bash | |
if: matrix.compiler == 'gcc' && startsWith(matrix.os, 'ubuntu') | |
working-directory: ${{github.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=gcc-10 -DCMAKE_CXX_COMPILER=g++-10 | |
- name: Configure CMake with TCC (Ubuntu) | |
shell: bash | |
if: matrix.compiler == 'tcc' && startsWith(matrix.os, 'ubuntu') | |
working-directory: ${{github.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -DCMAKE_C_COMPILER=tcc -DCMAKE_CXX_COMPILER=g++-10 | |
- name: Configure CMake with Clang (Ubuntu) | |
shell: bash | |
if: (matrix.compiler == 'clang') && 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++ | |
- name: Configure CMake with MinGW | |
shell: bash | |
if: matrix.compiler == 'gcc' && startsWith(matrix.os, 'windows') | |
working-directory: ${{github.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -G "MinGW Makefiles" -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ | |
- name: Configure CMake with Clang (Windows) | |
shell: bash | |
if: (matrix.compiler == 'clang') && startsWith(matrix.os, 'windows') | |
working-directory: ${{github.workspace}}/build | |
run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=${{ matrix.type }} -T ClangCL | |
- 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: if [ "${{ matrix.os }}" == "windows-latest" ] && [ "${{ matrix.compiler }}" != "gcc" ]; then cd ${{ matrix.type }}; fi; ./utest_test | |
- name: Test Whole Program Optimization | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: if [ "${{ matrix.os }}" == "windows-latest" ] && [ "${{ matrix.compiler }}" != "gcc" ]; then cd ${{ matrix.type }}; fi; ./utest_test_wpo | |
- name: Test with Multithreading | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
if: startsWith(matrix.os, 'windows') | |
run: if [ "${{ matrix.os }}" == "windows-latest" ] && [ "${{ matrix.compiler }}" != "gcc" ]; then cd ${{ matrix.type }}; fi; ./utest_test_mt | |
- name: Test with random order | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: if [ "${{ matrix.os }}" == "windows-latest" ] && [ "${{ matrix.compiler }}" != "gcc" ]; then cd ${{ matrix.type }}; fi; ./utest_test --random-order | |
- name: Test with random order and seed | |
working-directory: ${{github.workspace}}/build | |
shell: bash | |
run: if [ "${{ matrix.os }}" == "windows-latest" ] && [ "${{ matrix.compiler }}" != "gcc" ]; then cd ${{ matrix.type }}; fi; ./utest_test --random-order=42 |