From efb0eb22f2b687b8bc53578f2171c42622b62eaa Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Thu, 19 Dec 2024 00:02:28 +0800 Subject: [PATCH] feat use ninja --- .gitea/workflows/linux-mips-gcc.yml | 4 ++-- .gitea/workflows/linux-mips64-gcc.yml | 4 ++-- .gitea/workflows/linux-riscv64-gcc.yml | 4 ++-- .gitea/workflows/linux-x64-clang.yml | 4 ++-- .gitea/workflows/linux-x64-gcc.yml | 4 ++-- .gitea/workflows/linux-x86-gcc.yml | 4 ++-- tile/base/internal/time_keeper_test.cc | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/linux-mips-gcc.yml b/.gitea/workflows/linux-mips-gcc.yml index c281183..375c4bc 100644 --- a/.gitea/workflows/linux-mips-gcc.yml +++ b/.gitea/workflows/linux-mips-gcc.yml @@ -38,11 +38,11 @@ jobs: - name: install-tools run: | sudo apt-get update -y - sudo apt-get install -y cmake make g++-mipsel-linux-gnu qemu-user-binfmt + sudo apt-get install -y cmake make g++-mipsel-linux-gnu qemu-user-binfmt ninja-build - name: configure run: | mkdir build && cd build - cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/mips-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON .. + cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchains/mips-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON .. - name: build run: cmake --build build --target all -j $(nproc) - name: test diff --git a/.gitea/workflows/linux-mips64-gcc.yml b/.gitea/workflows/linux-mips64-gcc.yml index 4531e39..3425af6 100644 --- a/.gitea/workflows/linux-mips64-gcc.yml +++ b/.gitea/workflows/linux-mips64-gcc.yml @@ -39,11 +39,11 @@ jobs: - name: install-tools run: | sudo apt-get update -y - sudo apt-get install -y cmake make g++-mips64el-linux-gnuabi64 qemu-user-binfmt + sudo apt-get install -y cmake make g++-mips64el-linux-gnuabi64 qemu-user-binfmt ninja-build - name: configure run: | mkdir build && cd build - cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/mips64el-linux-gnuabi64.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON .. + cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchains/mips64el-linux-gnuabi64.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON .. - name: build run: cmake --build build --target all -j $(nproc) - name: test diff --git a/.gitea/workflows/linux-riscv64-gcc.yml b/.gitea/workflows/linux-riscv64-gcc.yml index b7fa618..5ddfe11 100644 --- a/.gitea/workflows/linux-riscv64-gcc.yml +++ b/.gitea/workflows/linux-riscv64-gcc.yml @@ -40,11 +40,11 @@ jobs: - name: install-tools run: | sudo apt-get update -y - sudo apt-get install -y cmake make g++-riscv64-linux-gnu qemu-user-binfmt + sudo apt-get install -y cmake make g++-riscv64-linux-gnu qemu-user-binfmt ninja-build - name: configure run: | mkdir build && cd build - cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/riscv64-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON .. + cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchains/riscv64-linux-gnu.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_TESTS=ON -DTILE_BUILD_BENCHMARKS=ON .. - name: build run: cmake --build build --target all -j $(nproc) - name: test diff --git a/.gitea/workflows/linux-x64-clang.yml b/.gitea/workflows/linux-x64-clang.yml index 639234c..9e51524 100644 --- a/.gitea/workflows/linux-x64-clang.yml +++ b/.gitea/workflows/linux-x64-clang.yml @@ -32,14 +32,14 @@ jobs: - name: install-tools run: | sudo apt-get update -y - sudo apt-get install -y cmake make clang-tools + sudo apt-get install -y cmake make clang-tools ninja-build - name: configure env: CC: clang CXX: clang++ run: | mkdir build && cd build - cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_BENCHMARKS=ON -DTILE_BUILD_TESTS=ON .. + cmake -GNinja -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_BENCHMARKS=ON -DTILE_BUILD_TESTS=ON .. - name: build run: | cmake --build build -j $(nproc) diff --git a/.gitea/workflows/linux-x64-gcc.yml b/.gitea/workflows/linux-x64-gcc.yml index 752dcbd..676febd 100644 --- a/.gitea/workflows/linux-x64-gcc.yml +++ b/.gitea/workflows/linux-x64-gcc.yml @@ -36,11 +36,11 @@ jobs: - name: install-tools run: | sudo apt-get update -y - sudo apt-get install -y cmake make + sudo apt-get install -y cmake make ninja-build - name: configure run: | mkdir build && cd build - cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_BENCHMARKS=ON -DTILE_BUILD_TESTS=ON .. + cmake -GNinja -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_BENCHMARKS=ON -DTILE_BUILD_TESTS=ON .. - name: build run: | cmake --build build -j $(nproc) diff --git a/.gitea/workflows/linux-x86-gcc.yml b/.gitea/workflows/linux-x86-gcc.yml index 19710af..237abff 100644 --- a/.gitea/workflows/linux-x86-gcc.yml +++ b/.gitea/workflows/linux-x86-gcc.yml @@ -38,11 +38,11 @@ jobs: - name: install-tools run: | sudo apt-get update -y - sudo apt-get install -y cmake make gcc-multilib g++-multilib + sudo apt-get install -y cmake make gcc-multilib g++-multilib ninja-build - name: configure run: | mkdir build && cd build - cmake -DCMAKE_TOOLCHAIN_FILE=../toolchains/host.gcc-m32.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_BENCHMARKS=ON -DTILE_BUILD_TESTS=ON .. + cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=../toolchains/host.gcc-m32.toolchain.cmake -DCMAKE_BUILD_TYPE=${{matrix.build_type}} -DTILE_BUILD_BENCHMARKS=ON -DTILE_BUILD_TESTS=ON .. - name: build run: | cmake --build build -j $(nproc) diff --git a/tile/base/internal/time_keeper_test.cc b/tile/base/internal/time_keeper_test.cc index b085258..4418bb5 100644 --- a/tile/base/internal/time_keeper_test.cc +++ b/tile/base/internal/time_keeper_test.cc @@ -12,8 +12,8 @@ namespace tile { namespace internal { constexpr auto kTestDuration = std::chrono::seconds(5); -constexpr auto kInterval = std::chrono::milliseconds(50); -constexpr auto kTimerNum = 100; +constexpr auto kInterval = std::chrono::milliseconds(200); +constexpr auto kTimerNum = 1000; TEST(TimeKeeper, OneFastTimer) {