Skip to content

Commit

Permalink
ci(codeql): migrate builds to ninja
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Oct 2, 2024
1 parent 9cc8bc8 commit cfd8bdf
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 54 deletions.
42 changes: 20 additions & 22 deletions .codeql-prebuild-cpp-Windows.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,31 @@ set -e
pacman --noconfirm -Syu

# install dependencies
pacman -S --noconfirm \
base-devel \
diffutils \
gcc \
git \
make \
mingw-w64-ucrt-x86_64-cmake \
mingw-w64-ucrt-x86_64-cppwinrt \
mingw-w64-ucrt-x86_64-curl-winssl \
mingw-w64-ucrt-x86_64-graphviz \
mingw-w64-ucrt-x86_64-miniupnpc \
mingw-w64-ucrt-x86_64-nlohmann-json \
mingw-w64-ucrt-x86_64-nodejs \
mingw-w64-ucrt-x86_64-nsis \
mingw-w64-ucrt-x86_64-onevpl \
mingw-w64-ucrt-x86_64-openssl \
mingw-w64-ucrt-x86_64-opus \
mingw-w64-ucrt-x86_64-rust \
mingw-w64-ucrt-x86_64-toolchain
dependencies=(
"git"
"mingw-w64-ucrt-x86_64-cmake"
"mingw-w64-ucrt-x86_64-cppwinrt"
"mingw-w64-ucrt-x86_64-curl-winssl"
"mingw-w64-ucrt-x86_64-miniupnpc"
"mingw-w64-ucrt-x86_64-nlohmann-json"
"mingw-w64-ucrt-x86_64-nodejs"
"mingw-w64-ucrt-x86_64-nsis"
"mingw-w64-ucrt-x86_64-onevpl"
"mingw-w64-ucrt-x86_64-openssl"
"mingw-w64-ucrt-x86_64-opus"
"mingw-w64-ucrt-x86_64-toolchain"
)
pacman -S --noconfirm "${dependencies[@]}"

# build
mkdir -p build
cd build || exit 1
cmake \
-B build \
-G Ninja \
-S . \
-DBUILD_DOCS=OFF \
-G "MinGW Makefiles" ..
mingw32-make -j"$(nproc)"
-DBUILD_WERROR=ON
ninja -C build

# skip autobuild
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"
25 changes: 15 additions & 10 deletions .codeql-prebuild-cpp-macOS.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,27 @@
set -e

# install dependencies
brew install \
boost \
cmake \
miniupnpc \
node \
opus \
pkg-config
dependencies=(
"boost"
"cmake"
"miniupnpc"
"node"
"openssl@3"
"opus"
"pkg-config"
)
brew install "${dependencies[@]}"

# build
mkdir -p build
cd build || exit 1
cmake \
-B build \
-G Ninja \
-S . \
-DBOOST_USE_STATIC=OFF \
-DBUILD_DOCS=OFF \
-G "Unix Makefiles" ..
make -j"$(sysctl -n hw.logicalcpu)"
-DBUILD_WERROR=ON
ninja -C build

# skip autobuild
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"
6 changes: 3 additions & 3 deletions docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ dependencies=(
"opus"
"pkg-config"
)
brew install ${dependencies[@]}
brew install "${dependencies[@]}"
```

If there are issues with an SSL header that is not found:
Expand All @@ -66,7 +66,7 @@ dependencies=(
"npm9"
"pkgconfig"
)
sudo port install ${dependencies[@]}
sudo port install "${dependencies[@]}"
```

#### Windows
Expand Down Expand Up @@ -97,7 +97,7 @@ dependencies=(
"mingw-w64-ucrt-x86_64-opus"
"mingw-w64-ucrt-x86_64-toolchain"
)
pacman -S ${dependencies[@]}
pacman -S "${dependencies[@]}"
```

### Clone
Expand Down
19 changes: 0 additions & 19 deletions toolchain-mingw64.cmake

This file was deleted.

0 comments on commit cfd8bdf

Please sign in to comment.