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 cd build
# Build in Release mode # 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 --build .
cmake --install . --prefix=../install cmake --install . --prefix=../install

View File

@@ -10,7 +10,7 @@ mkdir install
cd build cd build
# Build in Release mode # 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 --build .
cmake --install . --prefix=../install cmake --install . --prefix=../install

View File

@@ -9,7 +9,7 @@ MKDIR install
CD build CD build
:: Build with x64 architecture in Release mode :: 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 --build . --config Release
cmake --install . --prefix=../install --config Release cmake --install . --prefix=../install --config Release

View File

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

View File

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

View File

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