clang Wno-error=c2y-extensions #411
This file contains hidden or 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-debian | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| SDK_VERSION_STANDALONE: 1.4.321.1 | |
| SDK_VERSION_REPO: 1.4.309 | |
| jobs: | |
| Linux: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: | |
| - name: debian-oldstable | |
| version: bookworm | |
| container: debian:bookworm | |
| - name: debian-stable | |
| version: trixie | |
| container: debian:trixie | |
| sdk_type: [repo, standalone] | |
| docs: [true, false] | |
| exclude: | |
| - sdk_type: standalone | |
| docs: true | |
| - os: | |
| name: debian-stable | |
| sdk_type: standalone | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ${{ matrix.os.container }} | |
| env: | |
| SDK_VERSION_STANDALONE: 1.4.325.0 | |
| SDK_VERSION_REPO: 1.4.309 | |
| defaults: | |
| run: | |
| shell: bash | |
| steps: | |
| - name: show env | |
| run: env | |
| - name: Install General Dependencies | |
| run: | | |
| apt-get update | |
| apt-get upgrade -y | |
| apt-get install -y \ | |
| git \ | |
| ccache \ | |
| build-essential \ | |
| cmake \ | |
| pkgconf \ | |
| libgtk-3-dev \ | |
| libsigc++-2.0-dev \ | |
| libyaml-cpp-dev \ | |
| catch2 \ | |
| libglfw3-dev \ | |
| curl \ | |
| xzip \ | |
| libhidapi-dev \ | |
| ninja-build \ | |
| glslang-dev \ | |
| glslang-tools \ | |
| spirv-tools \ | |
| glslc \ | |
| lsb-release \ | |
| libfftw3-dev \ | |
| dpkg-dev \ | |
| file | |
| - name: Install Docs Dependencies | |
| if: ${{ matrix.docs }} | |
| run: | | |
| apt-get install -y \ | |
| texlive \ | |
| texlive-fonts-extra \ | |
| texlive-extra-utils | |
| - name: Install Vulkan Repo Dependencies | |
| if: ${{ (matrix.sdk_type == 'repo') }} | |
| run: | | |
| apt-get install -y \ | |
| libvulkan-dev | |
| - name: Check Out Code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Use CCache | |
| if: ${{ ! matrix.docs }} | |
| uses: hendrikmuhs/ccache-action@v1.2 | |
| with: | |
| key: ${{ github.job }}-${{ matrix.os.container }}-${{ matrix.sdk_type}} | |
| max-size: "1500M" | |
| - name: Cache Vulkan SDK Standalone | |
| if: ${{ matrix.sdk_type == 'standalone' }} | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/VulkanSDK | |
| key: ${{ matrix.os.container }}-vulkansdk-${{ env.SDK_VERSION_STANDALONE }} | |
| - name: Install Vulkan SDK (Standalone) | |
| if: ${{ matrix.sdk_type == 'standalone' }} | |
| run: | | |
| [[ -d ~/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }} ]] && exit 0 | |
| cd | |
| mkdir VulkanSDK | |
| cd VulkanSDK | |
| curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz | |
| tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz | |
| - name: Configure | |
| run: | | |
| [[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh | |
| [[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| git config --global --add safe.directory `pwd` | |
| mkdir build | |
| cd build | |
| cmake \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DDISABLE_PCH=ON \ | |
| -GNinja \ | |
| -DCPACK_GENERATOR=DEB \ | |
| -DBUILD_TESTING=ON \ | |
| -DCMAKE_INSTALL_PREFIX=/usr \ | |
| .. | |
| - name: Build | |
| if: ${{ ! matrix.docs }} | |
| run: | | |
| cd build | |
| ninja | |
| - name: Build Package | |
| if: ${{ ! matrix.docs }} | |
| run: | | |
| cd build | |
| ninja package | |
| - name: Build Docs | |
| if: ${{ matrix.docs }} | |
| run: | | |
| cd build | |
| ninja doc | |
| - name: Run Tests | |
| if: ${{ (matrix.os == 'debian-oldstable') && (! matrix.docs) }} | |
| run: | | |
| export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.x86_64.json | |
| cd build | |
| ctest --output-on-failure | |
| # vulkan ICD path changed from bookworm to trixie so need to consider both | |
| - name: Run Tests | |
| if: ${{ (matrix.os == 'debian-stable') && (! matrix.docs) }} | |
| run: | | |
| export VK_ICD_FILENAMES=/usr/share/vulkan/icd.d/lvp_icd.json | |
| cd build | |
| ctest --output-on-failure | |
| - name: Upload Artifacts | |
| if: ${{ ! matrix.docs }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ngscopeclient-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ github.job }}-${{ matrix.sdk_type }} | |
| path: | | |
| build/src/ngscopeclient/ngscopeclient | |
| build/src/ngscopeclient/icons/* | |
| build/src/ngscopeclient/shaders/* | |
| build/lib/scopehal/libscopehal.so | |
| build/lib/scopeprotocols/libscopeprotocols.so | |
| build/Testing/Temporary/LastTest.log | |
| - name: Upload Package | |
| if: ${{ ! matrix.docs }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ngscopeclient-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ github.job }}-${{ matrix.sdk_type }}-package | |
| path: build/*.deb | |
| - name: Upload Documentation | |
| if: ${{ matrix.docs }} | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ngscopeclient-${{ matrix.os.name }}-${{ matrix.os.version }}-${{ github.job }}-docs | |
| path: build/doc/ngscopeclient-manual.pdf |