chore: update github build script.
- enable gtest and benchmark build. - allow install gtest and benchmark binary. - add test and benchmark step in github action.
This commit is contained in:
58
.github/workflows/windows.yml
vendored
58
.github/workflows/windows.yml
vendored
@@ -16,28 +16,34 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
# - name: Setup Google Test and Google Benchmark
|
||||
# run: |
|
||||
# # Setup Google Test
|
||||
# git clone -b v1.17.0 https://github.com/google/googletest.git extern/googletest
|
||||
# cd extern/googletest
|
||||
# mkdir build install
|
||||
# cd build
|
||||
# cmake -DCMAKE_CXX_STANDARD=23 -Dgtest_force_shared_crt=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
# cmake --build . --config Release
|
||||
# cmake --install . --prefix=../install --config Release
|
||||
# cd ../..
|
||||
# # Setup Google Benchmark
|
||||
# git clone -b v1.9.4 https://github.com/google/benchmark.git extern/benchmark
|
||||
# cd extern/benchmark
|
||||
# # Create symlink to googletest as required by benchmark
|
||||
# mklink /D googletest ../googletest
|
||||
# mkdir build install
|
||||
# cd build
|
||||
# cmake -DCMAKE_CXX_STANDARD=23 -DBENCHMARK_ENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release ..
|
||||
# cmake --build . --config Release
|
||||
# cmake --install . --prefix=../install --config Release
|
||||
# cd ../..
|
||||
- name: Setup Google Test and Google Benchmark
|
||||
run: |
|
||||
# Setup Google Test
|
||||
git clone -b v1.17.0 https://github.com/google/googletest.git --depth 1 extern/googletest
|
||||
cd extern/googletest
|
||||
mkdir build install
|
||||
cd build
|
||||
cmake -DCMAKE_CXX_STANDARD=23 -Dgtest_force_shared_crt=ON -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake --build . --config Release
|
||||
cmake --install . --prefix=../install --config Release
|
||||
cd ..
|
||||
cd install
|
||||
set GTest_ROOT=%CD%
|
||||
cd ../..
|
||||
# Setup Google Benchmark
|
||||
git clone -b v1.9.4 https://github.com/google/benchmark.git --depth 1 extern/benchmark
|
||||
cd extern/benchmark
|
||||
# Create symlink to googletest as required by benchmark
|
||||
mklink /D googletest ../googletest
|
||||
mkdir build install
|
||||
cd build
|
||||
cmake -DCMAKE_CXX_STANDARD=23 -DBENCHMARK_ENABLE_TESTING=OFF -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake --build . --config Release
|
||||
cmake --install . --prefix=../install --config Release
|
||||
cd ..
|
||||
cd install
|
||||
set benchmark_ROOT=%CD%
|
||||
cd ../..
|
||||
- name: Build YYCC
|
||||
shell: cmd
|
||||
run: |
|
||||
@@ -46,6 +52,14 @@ 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 }}
|
||||
.\.github\windows_build.bat
|
||||
- name: Run YYCC Test
|
||||
shell: cmd
|
||||
run: |
|
||||
.\bin\install\bin\YYCCTest.exe
|
||||
- name: Run YYCC Benchmark
|
||||
shell: cmd
|
||||
run: |
|
||||
.\bin\install\bin\YYCCBenchmark.exe
|
||||
- name: Upload Built Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user