From c5b76b78c9dec95251e9c1840a671e19bf61abe3 Mon Sep 17 00:00:00 2001 From: Arcady Goldmints-Orlov Date: Wed, 18 Sep 2024 18:38:07 -0400 Subject: [PATCH] Add CI testing for shared library builds Testing is disabled on Windows for now due to DLL search path issues. --- .github/workflows/continuous_integration.yml | 77 ++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index b8b6b288..9cfd998b 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -44,6 +44,39 @@ jobs: - name: Check known validation failure list run: grep -l 'Validation failed' Test/baseResults/* | sort -fd | diff -u Test/baseResults/validation_fails.txt - + linux-shared: + runs-on: ubuntu-22.04 + strategy: + fail-fast: false + matrix: + compiler: [{cc: clang, cxx: clang++}, {cc: gcc, cxx: g++}] + cmake_build_type: [Release] + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: lukka/get-cmake@070a0507a7abe157ef918deec391da1be197d2d1 # v3.30.3 + - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + with: + python-version: '3.7' + - name: Setup ccache + uses: hendrikmuhs/ccache-action@ed74d11c0b343532753ecead8a951bb09bb34bc9 # v1.2.14 + with: + key: ubuntu-22-${{ matrix.cmake_build_type }}-${{ matrix.compiler.cc }}-${{matrix.compiler.cxx}} + - run: ./update_glslang_sources.py + - name: Configure + run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }} -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON -DBUILD_SHARED_LIBS=ON + env: + CC: ${{matrix.compiler.cc}} + CXX: ${{matrix.compiler.cxx}} + CMAKE_GENERATOR: Ninja + CMAKE_C_COMPILER_LAUNCHER: ccache + CMAKE_CXX_COMPILER_LAUNCHER: ccache + - name: Build + run: cmake --build build + - name: Install + run: cmake --install build --prefix build/install + - name: Test + run: ctest --output-on-failure --test-dir build + linux-asan: runs-on: ubuntu-22.04 strategy: @@ -135,6 +168,26 @@ jobs: - run: cmake --install build --prefix build/install - run: ctest --output-on-failure --test-dir build + macos-shared: + runs-on: ${{matrix.os}} + strategy: + fail-fast: false + matrix: + os: [macos-14] + compiler: [{cc: clang, cxx: clang++}] + cmake_build_type: [Release] + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: lukka/get-cmake@070a0507a7abe157ef918deec391da1be197d2d1 # v3.30.3 + - run: ./update_glslang_sources.py + - run: cmake -S . -B build -D CMAKE_BUILD_TYPE=${{matrix.cmake_build_type}} -G Ninja -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON -DBUILD_SHARED_LIBS=ON + env: + CC: ${{matrix.compiler.cc}} + CXX: ${{matrix.compiler.cxx}} + - run: cmake --build build + - run: cmake --install build --prefix build/install + - run: ctest --output-on-failure --test-dir build + windows: runs-on: ${{matrix.os.genus}} permissions: @@ -158,6 +211,30 @@ jobs: - name: Test run: ctest -C ${{matrix.cmake_build_type}} --output-on-failure --test-dir build + windows-shared: + runs-on: ${{matrix.os.genus}} + permissions: + contents: write + strategy: + fail-fast: false + matrix: + os: [{genus: windows-2019, family: windows}] + cmake_build_type: [Debug, Release] + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: lukka/get-cmake@070a0507a7abe157ef918deec391da1be197d2d1 # v3.30.3 + - uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0 + with: + python-version: '3.7' + - run: python update_glslang_sources.py + - name: Build + run: | + cmake -S. -Bbuild -G "Visual Studio 16 2019" -A x64 -DCMAKE_INSTALL_PREFIX="$PWD/build/install" -DBUILD_WERROR=ON -D GLSLANG_TESTS=ON -DBUILD_SHARED_LIBS=ON + cmake --build build --config ${{matrix.cmake_build_type}} --target install + # disabled until we figure out DLL issues. + # - name: Test + # run: ctest -C ${{matrix.cmake_build_type}} --output-on-failure --test-dir build + iOS: runs-on: macos-13 steps: