1
0

chore: write github action

This commit is contained in:
2026-01-30 16:12:39 +08:00
parent 2f59e16590
commit 6b0d73177b
19 changed files with 342 additions and 30 deletions

3
.github/scripts/README.md vendored Normal file
View File

@@ -0,0 +1,3 @@
# GitHub Scripts
These scripts should be executed at the root directory of each project respectively.

View File

@@ -0,0 +1,23 @@
#!/bin/bash
set -euo pipefail
YYCCommonplace_ROOT="${YYCCommonplace_ROOT:?YYCCommonplace_ROOT must be set}"
STB_ROOT="${STB_ROOT:?STB_ROOT must be set}"
ZLIB_ROOT="${ZLIB_ROOT:?ZLIB_ROOT must be set}"
# Create build directory and enter it
mkdir bin
cd bin
# Create internal build and install directory
mkdir build
mkdir install
# Build in Release mode
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=23 -DNEMO_BUILD_UNVIRT=ON -DNEMO_BUILD_BALLANCE=ON -DNEMO_BUILD_BMAP=ON -DNEMO_BUILD_BMAPINSPECTOR=ON -DYYCCommonplace_ROOT=$YYCCommonplace_ROOT -DSTB_ROOT=$STB_ROOT -DZLIB_ROOT=$ZLIB_ROOT ../..
cmake --build .
cmake --install . --prefix=../install
cd ..
# Back to root directory
cd ..

View File

@@ -0,0 +1,23 @@
#!/bin/bash
set -euo pipefail
YYCCommonplace_ROOT="${YYCCommonplace_ROOT:?YYCCommonplace_ROOT must be set}"
STB_ROOT="${STB_ROOT:?STB_ROOT must be set}"
ZLIB_ROOT="${ZLIB_ROOT:?ZLIB_ROOT must be set}"
# Create build directory and enter it
mkdir bin
cd bin
# Create internal build and install directory
mkdir build
mkdir install
# Build in Release mode
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=23 -DNEMO_BUILD_UNVIRT=ON -DNEMO_BUILD_BALLANCE=ON -DNEMO_BUILD_BMAP=ON -DNEMO_BUILD_BMAPINSPECTOR=ON -DYYCCommonplace_ROOT=$YYCCommonplace_ROOT -DSTB_ROOT=$STB_ROOT -DZLIB_ROOT=$ZLIB_ROOT ../..
cmake --build .
cmake --install . --prefix=../install
cd ..
# Back to root directory
cd ..

2
.github/scripts/stb-linux.sh vendored Normal file
View File

@@ -0,0 +1,2 @@
# Just directly record self as root directory
set STB_ROOT=$(pwd)

2
.github/scripts/stb-macos.sh vendored Normal file
View File

@@ -0,0 +1,2 @@
# Just directly record self as root directory
set STB_ROOT=$(pwd)

4
.github/scripts/stb-windows.bat vendored Normal file
View File

@@ -0,0 +1,4 @@
@ECHO OFF
:: Just directly record self as root directory
SET STB_ROOT=%CD%

View File

@@ -3,16 +3,16 @@
:: Create build directory and enter it
MKDIR bin
CD bin
:: Create internal build and install directory, then enter it
:: Create internal build and install directory
MKDIR build
MKDIR install
CD build
:: Build with x64 architecture in Release mode
cmake -A x64 -DYYCC_BUILD_TEST=ON -DGTest_ROOT=%GTest_ROOT% -DYYCC_BUILD_BENCHMARK=ON -Dbenchmark_ROOT=%benchmark_ROOT% ../..
CD build
cmake -A x64 -DCMAKE_CXX_STANDARD=23 -DNEMO_BUILD_UNVIRT=ON -DNEMO_BUILD_BALLANCE=ON -DNEMO_BUILD_BMAP=ON -DNEMO_BUILD_BMAPINSPECTOR=ON -DYYCCommonplace_ROOT=%YYCCommonplace_ROOT% -DSTB_ROOT=%STB_ROOT% -DZLIB_ROOT=%ZLIB_ROOT% ../..
cmake --build . --config Release
cmake --install . --prefix=../install --config Release
CD ..
:: Back to root directory
CD ..
CD ..

View File

@@ -0,0 +1,24 @@
#!/bin/bash
set -euo pipefail
# Create build directory and enter it
mkdir bin
cd bin
# Create internal build and install directory
mkdir build
mkdir install
# Build in Release mode
cd build
cmake -DCMAKE_CXX_STANDARD=23 -DCMAKE_BUILD_TYPE=Release ../..
cmake --build .
cmake --install . --prefix=../install
cd ..
# Record install directory
cd install
set YYCCommonplace_ROOT=$(pwd)
cd ..
# Back to root directory
cd ..

View File

@@ -0,0 +1,24 @@
#!/bin/bash
set -euo pipefail
# Create build directory and enter it
mkdir bin
cd bin
# Create internal build and install directory
mkdir build
mkdir install
# Build in Release mode
cd build
cmake -DCMAKE_CXX_STANDARD=23 -DCMAKE_BUILD_TYPE=Release ../..
cmake --build .
cmake --install . --prefix=../install
cd ..
# Record install directory
cd install
set YYCCommonplace_ROOT=$(pwd)
cd ..
# Back to root directory
cd ..

View File

@@ -0,0 +1,23 @@
@ECHO OFF
:: Create build directory and enter it
MKDIR bin
CD bin
:: Create internal build and install directory
MKDIR build
MKDIR install
:: Build with x64 architecture in Release mode
CD build
cmake -A x64 -DCMAKE_CXX_STANDARD=23 ../..
cmake --build . --config Release
cmake --install . --prefix=../install --config Release
CD ..
:: Record install directory
CD install
SET YYCCommonplace_ROOT=%CD%
CD ..
:: Back to root directory
CD ..

View File

@@ -0,0 +1,21 @@
#!/bin/bash
set -euo pipefail
# Create build and install directory
mkdir build
mkdir install
# Record install directory first because build step require it
cd install
set ZLIB_ROOT=$(pwd)
cd ..
# Build in Release mode
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=23 -DZLIB_BUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=$ZLIB_ROOT ../..
cmake --build .
cmake --install .
cd ..
# Back to root directory
cd ..

View File

@@ -0,0 +1,21 @@
#!/bin/bash
set -euo pipefail
# Create build and install directory
mkdir build
mkdir install
# Record install directory first because build step require it
cd install
set ZLIB_ROOT=$(pwd)
cd ..
# Build in Release mode
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=23 -DZLIB_BUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=$ZLIB_ROOT ../..
cmake --build .
cmake --install .
cd ..
# Back to root directory
cd ..

View File

@@ -0,0 +1,20 @@
@ECHO OFF
:: Create build and install directory
MKDIR build
MKDIR install
:: Record install directory first because build step require it
CD install
SET ZLIB_ROOT=%CD%
CD ..
:: Build with x64 architecture in Release mode
CD build
cmake -A x64 -DCMAKE_CXX_STANDARD=23 -DZLIB_BUILD_EXAMPLES=OFF -DCMAKE_INSTALL_PREFIX=%ZLIB_ROOT% ../..
cmake --build . --config Release
cmake --install . --config Release
CD ..
:: Back to root directory
CD ..