ci(codeql): migrate builds to ninja (#3250)
Some checks failed
CI / GitHub Env Debug (push) Has been cancelled
CI / Setup Release (push) Has been cancelled
CI / Setup Flatpak Matrix (push) Has been cancelled
CI Docker / Check Dockerfiles (push) Has been cancelled
CodeQL / Get language matrix (push) Has been cancelled
localize / Update Localization (push) Has been cancelled
Build GH-Pages / update_pages (push) Has been cancelled
CI / Linux Flatpak (push) Has been cancelled
CI / Linux ${{ matrix.type }} (--appimage-build, 22.04, AppImage) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 13) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (macos, 14) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest) (push) Has been cancelled
CI / Homebrew (${{ matrix.os_name }}-${{ matrix.os_version }}${{ matrix.release == true && ' (Release)' || '' }}) (ubuntu, latest, true) (push) Has been cancelled
CI / Macports (macOS-${{ matrix.os_version }}) (13, true) (push) Has been cancelled
CI / Macports (macOS-${{ matrix.os_version }}) (14) (push) Has been cancelled
CI / Windows (push) Has been cancelled
CI Docker / Setup Release (push) Has been cancelled
CI Docker / Docker${{ matrix.tag }} (push) Has been cancelled
CodeQL / Analyze (${{ matrix.name }}) (push) Has been cancelled

This commit is contained in:
ReenigneArcher 2024-10-01 21:12:40 -04:00 committed by GitHub
parent 9cc8bc8f62
commit 024bd8f8b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 41 additions and 54 deletions

View File

@ -5,33 +5,31 @@ set -e
pacman --noconfirm -Syu pacman --noconfirm -Syu
# install dependencies # install dependencies
pacman -S --noconfirm \ dependencies=(
base-devel \ "git"
diffutils \ "mingw-w64-ucrt-x86_64-cmake"
gcc \ "mingw-w64-ucrt-x86_64-cppwinrt"
git \ "mingw-w64-ucrt-x86_64-curl-winssl"
make \ "mingw-w64-ucrt-x86_64-miniupnpc"
mingw-w64-ucrt-x86_64-cmake \ "mingw-w64-ucrt-x86_64-nlohmann-json"
mingw-w64-ucrt-x86_64-cppwinrt \ "mingw-w64-ucrt-x86_64-nodejs"
mingw-w64-ucrt-x86_64-curl-winssl \ "mingw-w64-ucrt-x86_64-nsis"
mingw-w64-ucrt-x86_64-graphviz \ "mingw-w64-ucrt-x86_64-onevpl"
mingw-w64-ucrt-x86_64-miniupnpc \ "mingw-w64-ucrt-x86_64-openssl"
mingw-w64-ucrt-x86_64-nlohmann-json \ "mingw-w64-ucrt-x86_64-opus"
mingw-w64-ucrt-x86_64-nodejs \ "mingw-w64-ucrt-x86_64-toolchain"
mingw-w64-ucrt-x86_64-nsis \ )
mingw-w64-ucrt-x86_64-onevpl \ pacman -S --noconfirm "${dependencies[@]}"
mingw-w64-ucrt-x86_64-openssl \
mingw-w64-ucrt-x86_64-opus \
mingw-w64-ucrt-x86_64-rust \
mingw-w64-ucrt-x86_64-toolchain
# build # build
mkdir -p build mkdir -p build
cd build || exit 1
cmake \ cmake \
-B build \
-G Ninja \
-S . \
-DBUILD_DOCS=OFF \ -DBUILD_DOCS=OFF \
-G "MinGW Makefiles" .. -DBUILD_WERROR=ON
mingw32-make -j"$(nproc)" ninja -C build
# skip autobuild # skip autobuild
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT" echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"

View File

@ -2,22 +2,28 @@
set -e set -e
# install dependencies # install dependencies
brew install \ dependencies=(
boost \ "boost"
cmake \ "cmake"
miniupnpc \ "miniupnpc"
node \ "ninja"
opus \ "node"
pkg-config "openssl@3"
"opus"
"pkg-config"
)
brew install "${dependencies[@]}"
# build # build
mkdir -p build mkdir -p build
cd build || exit 1
cmake \ cmake \
-B build \
-G Ninja \
-S . \
-DBOOST_USE_STATIC=OFF \ -DBOOST_USE_STATIC=OFF \
-DBUILD_DOCS=OFF \ -DBUILD_DOCS=OFF \
-G "Unix Makefiles" .. -DBUILD_WERROR=ON
make -j"$(sysctl -n hw.logicalcpu)" ninja -C build
# skip autobuild # skip autobuild
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT" echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"

View File

@ -34,12 +34,13 @@ dependencies=(
"graphviz" # Optional, for docs "graphviz" # Optional, for docs
"icu4c" # Optional, if boost is not installed "icu4c" # Optional, if boost is not installed
"miniupnpc" "miniupnpc"
"ninja"
"node" "node"
"openssl@3" "openssl@3"
"opus" "opus"
"pkg-config" "pkg-config"
) )
brew install ${dependencies[@]} brew install "${dependencies[@]}"
``` ```
If there are issues with an SSL header that is not found: If there are issues with an SSL header that is not found:
@ -63,10 +64,11 @@ dependencies=(
"graphviz" # Optional, for docs "graphviz" # Optional, for docs
"libopus" "libopus"
"miniupnpc" "miniupnpc"
"ninja"
"npm9" "npm9"
"pkgconfig" "pkgconfig"
) )
sudo port install ${dependencies[@]} sudo port install "${dependencies[@]}"
``` ```
#### Windows #### Windows
@ -97,7 +99,7 @@ dependencies=(
"mingw-w64-ucrt-x86_64-opus" "mingw-w64-ucrt-x86_64-opus"
"mingw-w64-ucrt-x86_64-toolchain" "mingw-w64-ucrt-x86_64-toolchain"
) )
pacman -S ${dependencies[@]} pacman -S "${dependencies[@]}"
``` ```
### Clone ### Clone

View File

@ -1,19 +0,0 @@
# the name of the target operating system
SET(CMAKE_SYSTEM_NAME Windows)
# which compilers to use for C and C++
SET(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
SET(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
SET(CMAKE_RC_COMPILER x86_64-w64-mingw32-windres)
# here is the target environment located
SET(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
#SET(CMAKE_SYSROOT ${CMAKE_FIND_ROOT_PATH})
#SET(CMAKE_EXE_LINKER_FLAGS "-static ${CMAKE_EXE_LINKER_FLAGS}")
# adjust the default behaviour of the FIND_XXX() commands:
# search headers and libraries in the target environment, search
# programs in the host environment
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)