diff --git a/.codeql-prebuild-cpp-macOS.sh b/.codeql-prebuild-cpp-macOS.sh index 9a5f596..0f1aeeb 100644 --- a/.codeql-prebuild-cpp-macOS.sh +++ b/.codeql-prebuild-cpp-macOS.sh @@ -1,21 +1,16 @@ # install dependencies for C++ analysis set -e -gcc_version=11 - # install dependencies brew install \ cmake \ - gcc@${gcc_version} + ninja # build mkdir -p build cd build || exit 1 -cmake \ - -DCMAKE_C_COMPILER="/opt/homebrew/bin/gcc-${gcc_version}" \ - -DCMAKE_CXX_COMPILER="/opt/homebrew/bin/g++-${gcc_version}" \ - -G "Unix Makefiles" .. -make -j"$(sysctl -n hw.logicalcpu)" +cmake -G Ninja .. +ninja # skip autobuild echo "skip_autobuild=true" >> "$GITHUB_OUTPUT" diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ff12034..ec4ed25 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -63,7 +63,9 @@ jobs: if (key.toLowerCase() === 'swift') { osList = ['macos-latest']; } else if (key.toLowerCase() === 'cpp') { - osList = ['macos-latest', 'ubuntu-latest', 'windows-latest']; + // TODO: update macos to latest after the below issue is resolved + // https://github.com/github/codeql-action/issues/2266 + osList = ['macos-13', 'ubuntu-latest', 'windows-latest']; } for (let os of osList) { // set name for matrix @@ -120,10 +122,12 @@ jobs: steps: - name: Maximize build space - if: runner.os == 'Linux' - uses: easimon/maximize-build-space@v8 + if: >- + runner.os == 'Linux' && + matrix.language == 'cpp' + uses: easimon/maximize-build-space@v10 with: - root-reserve-mb: 20480 + root-reserve-mb: 30720 remove-dotnet: ${{ (matrix.language == 'csharp' && 'false') || 'true' }} remove-android: 'true' remove-haskell: 'true'