fix: dynamic link with msvc crt (#428) #18
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: "CodeQL Deep" | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| paths: | |
| - '**.c' | |
| - '**.cpp' | |
| - '**.cmake' | |
| - '**.h' | |
| - '**.hpp' | |
| - '**.y' | |
| - 'CMakeLists.txt' | |
| schedule: | |
| - cron: '35 7 * * 5' | |
| jobs: | |
| analyze: | |
| name: Analyze (c-cpp on ubuntu-latest) | |
| runs-on: ubuntu-latest | |
| permissions: | |
| security-events: write | |
| packages: read | |
| actions: read | |
| contents: read | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Initialize CodeQL | |
| uses: github/codeql-action/init@v4 | |
| with: | |
| languages: c-cpp | |
| build-mode: manual | |
| config: | | |
| paths-ignore: | |
| - out/ | |
| # Cache CMake FetchContent dependencies (source code and build files) | |
| - name: Cache pre-built FetchContent dependencies | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| out/build/linux/_deps | |
| key: ${{ runner.os }}-deps-${{ hashFiles('cmake/*.cmake', 'CMakeLists.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-deps- | |
| # Cache apt package archives (binary libraries) to speed up installation on subsequent runs | |
| # find_package() calls are listed in CMakeLists.txt, so we can use that to determine the cache key | |
| - name: Cache binary package archives | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| /var/cache/apt/archives | |
| /var/lib/apt/lists | |
| key: ${{ runner.os }}-apt-${{ hashFiles('CMakeLists.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-apt- | |
| - name: Install binary dependencies on Ubuntu | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| sudo apt-get update | |
| if apt-cache show libboost-json-dev >/dev/null 2>&1; then | |
| sudo apt-get install -y --no-install-recommends libboost-json-dev | |
| elif apt-cache show libboost-json1.83-dev >/dev/null 2>&1; then | |
| sudo apt-get install -y --no-install-recommends libboost-json1.83-dev | |
| else | |
| sudo apt-get install -y --no-install-recommends libboost-all-dev | |
| fi | |
| sudo apt-get install -y --no-install-recommends libc-ares-dev libcurl4-openssl-dev | |
| # In github-hosted runner 'ubuntu-latest', we expect these packages are already installed: | |
| # - bison | |
| # - cmake | |
| # - curl (libcurl) | |
| # - g++ / gcc | |
| # - jq (libjq1) | |
| # - openssl (libssl, libcrypto) | |
| - name: Run manual build steps | |
| shell: bash | |
| run: | | |
| cmake --preset linux | |
| cmake --preset linux -LA | |
| cmake --build --preset ci-linux --clean-first | |
| - name: Perform CodeQL Analysis | |
| uses: github/codeql-action/analyze@v4 | |
| with: | |
| category: "/language:c-cpp" |