diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000..1793273f --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,51 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# http://go.microsoft.com/fwlink/?LinkId=248926 + +name: "CodeQL" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: '43 3 * * 3' + +jobs: + analyze: + name: Analyze (C/C++) + runs-on: windows-latest + timeout-minutes: 360 + permissions: + security-events: write + packages: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: 'Install Ninja' + run: choco install ninja + + - uses: ilammy/msvc-dev-cmd@v1 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: c-cpp + build-mode: manual + + - name: 'Configure CMake' + working-directory: ${{env.GITHUB_WORKSPACE}} + run: cmake --preset=x64-Debug + + - name: 'Build' + working-directory: ${{env.GITHUB_WORKSPACE}} + run: cmake --build out\build\x64-Debug + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:c-cpp" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 629de78b..07ccf023 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,7 +3,7 @@ # # http://go.microsoft.com/fwlink/?LinkId=248926 -name: 'CMake (Windows)' +name: 'CMake' on: push: @@ -59,6 +59,12 @@ jobs: - os: windows-2022 build_type: arm64ec-Release arch: amd64_arm64 + - os: ubuntu-latest + build_type: x64-Debug-Linux + arch: none + - os: ubuntu-latest + build_type: x64-Release-Linux + arch: none steps: - uses: actions/checkout@v4 @@ -66,12 +72,13 @@ jobs: - name: 'Install Ninja' run: choco install ninja - - uses: ilammy/msvc-dev-cmd@v1 + - if: matrix.arch != 'none' + uses: ilammy/msvc-dev-cmd@v1 with: arch: ${{ matrix.arch }} - name: 'Configure CMake' - working-directory: ${{env.GITHUB_WORKSPACE}} + working-directory: ${{env.GITHUB_WORKSPACE}} run: cmake --preset=${{ matrix.build_type }} - name: 'Build'