chore: update yycc gh action build script
This commit is contained in:
31
.github/workflows/linux.yml
vendored
31
.github/workflows/linux.yml
vendored
@@ -23,17 +23,11 @@ jobs:
|
||||
- name: Build Google Test
|
||||
shell: bash
|
||||
run: |
|
||||
# Build Google Test
|
||||
cd extern/googletest
|
||||
mkdir build install
|
||||
cd build
|
||||
cmake -DCMAKE_CXX_STANDARD=23 -Dgtest_force_shared_crt=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake --build .
|
||||
cmake --install . --prefix=../install
|
||||
cd ..
|
||||
cd install
|
||||
echo "GTest_ROOT=$(pwd)" >> "$GITHUB_ENV"
|
||||
cd ..
|
||||
# Build Google Test
|
||||
source ../../.github/scripts/gtest/linux.sh
|
||||
# Record environment variable
|
||||
echo "GTest_ROOT=$GTest_ROOT" >> "$GITHUB_ENV"
|
||||
cd ../..
|
||||
- name: Fetch Google Benchmark
|
||||
uses: actions/checkout@v4
|
||||
@@ -44,25 +38,18 @@ jobs:
|
||||
- name: Build Google Benchmark
|
||||
shell: bash
|
||||
run: |
|
||||
# Build Google Benchmark
|
||||
cd extern/benchmark
|
||||
# Create symlink to googletest as required by benchmark
|
||||
ln -s ../googletest googletest
|
||||
mkdir build install
|
||||
cd build
|
||||
cmake -DCMAKE_CXX_STANDARD=23 -DBENCHMARK_ENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake --build .
|
||||
cmake --install . --prefix=../install
|
||||
cd ..
|
||||
cd install
|
||||
echo "benchmark_ROOT=$(pwd)" >> "$GITHUB_ENV"
|
||||
cd ..
|
||||
# Build Google Benchmark
|
||||
source ../../.github/scripts/gbenchmark/linux.sh
|
||||
# Record environment variable
|
||||
echo "benchmark_ROOT=$benchmark_ROOT" >> "$GITHUB_ENV"
|
||||
cd ../..
|
||||
- name: Build YYCC
|
||||
shell: bash
|
||||
run: |
|
||||
chmod +x ./.github/linux_build.sh
|
||||
./.github/linux_build.sh
|
||||
source ./.github/scripts/linux.sh
|
||||
- name: Run YYCC Test
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
31
.github/workflows/macos.yml
vendored
31
.github/workflows/macos.yml
vendored
@@ -18,17 +18,11 @@ jobs:
|
||||
- name: Build Google Test
|
||||
shell: bash
|
||||
run: |
|
||||
# Build Google Test
|
||||
cd extern/googletest
|
||||
mkdir build install
|
||||
cd build
|
||||
cmake -DCMAKE_CXX_STANDARD=23 -Dgtest_force_shared_crt=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake --build .
|
||||
cmake --install . --prefix=../install
|
||||
cd ..
|
||||
cd install
|
||||
echo "GTest_ROOT=$(pwd)" >> "$GITHUB_ENV"
|
||||
cd ..
|
||||
# Build Google Test
|
||||
source ../../.github/scripts/gtest/macos.sh
|
||||
# Record environment variable
|
||||
echo "GTest_ROOT=$GTest_ROOT" >> "$GITHUB_ENV"
|
||||
cd ../..
|
||||
- name: Fetch Google Benchmark
|
||||
uses: actions/checkout@v4
|
||||
@@ -39,25 +33,18 @@ jobs:
|
||||
- name: Build Google Benchmark
|
||||
shell: bash
|
||||
run: |
|
||||
# Build Google Benchmark
|
||||
cd extern/benchmark
|
||||
# Create symlink to googletest as required by benchmark
|
||||
ln -s ../googletest googletest
|
||||
mkdir build install
|
||||
cd build
|
||||
cmake -DCMAKE_CXX_STANDARD=23 -DBENCHMARK_ENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake --build .
|
||||
cmake --install . --prefix=../install
|
||||
cd ..
|
||||
cd install
|
||||
echo "benchmark_ROOT=$(pwd)" >> "$GITHUB_ENV"
|
||||
cd ..
|
||||
# Build Google Benchmark
|
||||
source ../../.github/scripts/gbenchmark/macos.sh
|
||||
# Record environment variable
|
||||
echo "benchmark_ROOT=$benchmark_ROOT" >> "$GITHUB_ENV"
|
||||
cd ../..
|
||||
- name: Build YYCC
|
||||
shell: bash
|
||||
run: |
|
||||
chmod +x ./.github/macos_build.sh
|
||||
./.github/macos_build.sh
|
||||
source ./.github/scripts/macos.sh
|
||||
- name: Run YYCC Test
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
40
.github/workflows/windows.yml
vendored
40
.github/workflows/windows.yml
vendored
@@ -25,21 +25,13 @@ jobs:
|
||||
- name: Build Google Test
|
||||
shell: cmd
|
||||
run: |
|
||||
CD extern\googletest
|
||||
:: Build Google Test
|
||||
cd extern/googletest
|
||||
mkdir build
|
||||
mkdir install
|
||||
cd build
|
||||
cmake -A x64 -DCMAKE_CXX_STANDARD=23 -Dgtest_force_shared_crt=ON ..
|
||||
cmake --build . --config Release
|
||||
cmake --install . --prefix=../install --config Release
|
||||
cd ..
|
||||
cd install
|
||||
CALL ..\..\.github\scripts\gtest\windows.bat
|
||||
:: Idk why I can't use $GITHUB_ENV, so I use this stupid way to do this.
|
||||
:: This is first entry so we override it.
|
||||
echo set GTest_ROOT=%CD% > ../../envs.bat
|
||||
cd ..
|
||||
cd ../..
|
||||
ECHO SET GTest_ROOT=%GTest_ROOT% > ..\envs.bat
|
||||
CD ..\..
|
||||
- name: Fetch Google Benchmark
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -49,22 +41,14 @@ jobs:
|
||||
- name: Build Google Benchmark
|
||||
shell: cmd
|
||||
run: |
|
||||
:: Build Google Benchmark
|
||||
cd extern/benchmark
|
||||
CD extern\benchmark
|
||||
:: Create symlink to googletest as required by benchmark
|
||||
mklink /D googletest ../googletest
|
||||
mkdir build
|
||||
mkdir install
|
||||
cd build
|
||||
cmake -A x64 -DCMAKE_CXX_STANDARD=23 -DBENCHMARK_ENABLE_TESTING=OFF ..
|
||||
cmake --build . --config Release
|
||||
cmake --install . --prefix=../install --config Release
|
||||
cd ..
|
||||
cd install
|
||||
mklink /D googletest ..\googletest
|
||||
:: Build Google Benchmark
|
||||
CALL ..\..\.github\scripts\gbenchmark\windows.bat
|
||||
:: This is second entry so we append it.
|
||||
echo set benchmark_ROOT=%CD% >> ../../envs.bat
|
||||
cd ..
|
||||
cd ../..
|
||||
ECHO SET benchmark_ROOT=%benchmark_ROOT% >> ..\envs.bat
|
||||
CD ..\..
|
||||
- name: Build YYCC
|
||||
shell: cmd
|
||||
run: |
|
||||
@@ -74,9 +58,9 @@ jobs:
|
||||
if not exist %VCVARS% set VCVARS="C:\Program Files\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
call %VCVARS% ${{ matrix.msvc_arch }}
|
||||
:: Extract saved environment variables
|
||||
call .\extern\envs.bat
|
||||
CALL .\extern\envs.bat
|
||||
:: Build Project
|
||||
.\.github\windows_build.bat
|
||||
CALL .\.github\scripts\windows.bat
|
||||
- name: Run YYCC Test
|
||||
shell: cmd
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user