chore: write github action
This commit is contained in:
3
.github/scripts/README.md
vendored
Normal file
3
.github/scripts/README.md
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
# GitHub Scripts
|
||||
|
||||
These scripts should be executed at the root directory of each project respectively.
|
||||
23
.github/scripts/linux.sh
vendored
23
.github/scripts/linux.sh
vendored
@@ -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 ..
|
||||
|
||||
23
.github/scripts/macos.sh
vendored
23
.github/scripts/macos.sh
vendored
@@ -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
2
.github/scripts/stb-linux.sh
vendored
Normal 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
2
.github/scripts/stb-macos.sh
vendored
Normal 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
4
.github/scripts/stb-windows.bat
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
@ECHO OFF
|
||||
|
||||
:: Just directly record self as root directory
|
||||
SET STB_ROOT=%CD%
|
||||
8
.github/scripts/windows.bat
vendored
8
.github/scripts/windows.bat
vendored
@@ -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 ..
|
||||
|
||||
24
.github/scripts/yycc-linux.sh
vendored
24
.github/scripts/yycc-linux.sh
vendored
@@ -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 ..
|
||||
|
||||
24
.github/scripts/yycc-macos.sh
vendored
24
.github/scripts/yycc-macos.sh
vendored
@@ -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 ..
|
||||
|
||||
23
.github/scripts/yycc-windows.bat
vendored
23
.github/scripts/yycc-windows.bat
vendored
@@ -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 ..
|
||||
|
||||
21
.github/scripts/zlib-linux.sh
vendored
21
.github/scripts/zlib-linux.sh
vendored
@@ -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 ..
|
||||
|
||||
21
.github/scripts/zlib-macos.sh
vendored
21
.github/scripts/zlib-macos.sh
vendored
@@ -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 ..
|
||||
|
||||
20
.github/scripts/zlib-windows.bat
vendored
20
.github/scripts/zlib-windows.bat
vendored
@@ -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 ..
|
||||
|
||||
Reference in New Issue
Block a user