1
0

chore: use github provided package to fetch dependencies

This commit is contained in:
2026-01-22 16:24:21 +08:00
parent 1c1e709ed1
commit 6449ae1977
6 changed files with 54 additions and 18 deletions

View File

@@ -10,7 +10,7 @@ mkdir install
cd build
# Build in Release mode
cmake -DCMAKE_BUILD_TYPE=Release -DYYCC_BUILD_TEST=ON -DGTest_ROOT=$GTest_ROOT ../..
cmake -DCMAKE_BUILD_TYPE=Release -DYYCC_BUILD_TEST=ON -DGTest_ROOT=$GTest_ROOT -DYYCC_BUILD_BENCHMARK=ON -Dbenchmark_ROOT=$benchmark_ROOT ../..
cmake --build .
cmake --install . --prefix=../install

View File

@@ -10,7 +10,7 @@ mkdir install
cd build
# Build in Release mode
cmake -DCMAKE_BUILD_TYPE=Release -DYYCC_BUILD_TEST=ON -DGTest_ROOT=$GTest_ROOT ../..
cmake -DCMAKE_BUILD_TYPE=Release -DYYCC_BUILD_TEST=ON -DGTest_ROOT=$GTest_ROOT -DYYCC_BUILD_BENCHMARK=ON -Dbenchmark_ROOT=$benchmark_ROOT ../..
cmake --build .
cmake --install . --prefix=../install

View File

@@ -9,7 +9,7 @@ MKDIR install
CD build
:: Build with x64 architecture in Release mode
cmake -A x64 -DYYCC_BUILD_TEST=ON -DGTest_ROOT=%GTest_ROOT% ../..
cmake -A x64 -DYYCC_BUILD_TEST=ON -DGTest_ROOT=%GTest_ROOT% -DYYCC_BUILD_BENCHMARK=ON -Dbenchmark_ROOT=%benchmark_ROOT% ../..
cmake --build . --config Release
cmake --install . --prefix=../install --config Release

View File

@@ -13,10 +13,15 @@ jobs:
run: |
sudo apt update
sudo apt install -y build-essential cmake git
- name: Setup Google Test and Google Benchmark
- name: Fetch Google Test
uses: actions/checkout@v4
with:
repository: 'google/googletest'
ref: 'v1.17.0'
path: 'extern/googletest'
- name: Build Google Test
run: |
# Setup Google Test
git clone -b v1.17.0 https://github.com/google/googletest.git --depth 1 extern/googletest
# Build Google Test
cd extern/googletest
mkdir build install
cd build
@@ -27,8 +32,15 @@ jobs:
cd install
export GTest_ROOT=$(pwd)
cd ../..
# Setup Google Benchmark
git clone -b v1.9.4 https://github.com/google/benchmark.git --depth 1 extern/benchmark
- name: Fetch Google Benchmark
uses: actions/checkout@v4
with:
repository: 'google/benchmark'
ref: 'v1.9.4'
path: 'extern/benchmark'
- name: Build Google Benchmark
run: |
# Build Google Benchmark
cd extern/benchmark
# Create symlink to googletest as required by benchmark
ln -s ../googletest googletest

View File

@@ -9,10 +9,15 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Google Test and Google Benchmark
- name: Fetch Google Test
uses: actions/checkout@v4
with:
repository: 'google/googletest'
ref: 'v1.17.0'
path: 'extern/googletest'
- name: Build Google Test
run: |
# Setup Google Test
git clone -b v1.17.0 https://github.com/google/googletest.git --depth 1 extern/googletest
# Build Google Test
cd extern/googletest
mkdir build install
cd build
@@ -23,8 +28,15 @@ jobs:
cd install
export GTest_ROOT=$(pwd)
cd ../..
# Setup Google Benchmark
git clone -b v1.9.4 https://github.com/google/benchmark.git --depth 1 extern/benchmark
- name: Fetch Google Benchmark
uses: actions/checkout@v4
with:
repository: 'google/benchmark'
ref: 'v1.9.4'
path: 'extern/benchmark'
- name: Build Google Benchmark
run: |
# Build Google Benchmark
cd extern/benchmark
# Create symlink to googletest as required by benchmark
ln -s ../googletest googletest

View File

@@ -16,10 +16,15 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Google Test and Google Benchmark
- name: Fetch Google Test
uses: actions/checkout@v4
with:
repository: 'google/googletest'
ref: 'v1.17.0'
path: 'extern/googletest'
- name: Build Google Test
run: |
# Setup Google Test
git clone -b v1.17.0 https://github.com/google/googletest.git --depth 1 extern/googletest
# Build Google Test
cd extern/googletest
mkdir build install
cd build
@@ -30,8 +35,15 @@ jobs:
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
- name: Fetch Google Benchmark
uses: actions/checkout@v4
with:
repository: 'google/benchmark'
ref: 'v1.9.4'
path: 'extern/benchmark'
- name: Build Google Benchmark
run: |
# Build Google Benchmark
cd extern/benchmark
# Create symlink to googletest as required by benchmark
mklink /D googletest ../googletest