diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 849aff902..3c3e4c1d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,9 @@ jobs: with: fetch-depth: 2 - uses: actions/setup-python@v5 + with: + python-version: '3.x' + check-latest: true - name: Install dependencies run: | python -m venv venv @@ -27,10 +30,6 @@ jobs: lsblk -l echo "sda rotational = $(cat /sys/block/sda/queue/rotational)" echo "sdb rotational = $(cat /sys/block/sdb/queue/rotational)" - - uses: actions/cache@v4 - with: - path: ~/.cache/pre-commit - key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }} - name: Run pre-commit checks run: | source venv/bin/activate @@ -43,7 +42,8 @@ jobs: container: ["ubuntu-dev:20", "alpine-dev:latest"] build-type: [Debug, Release] compiler: [{ cxx: g++, c: gcc }] - cxx_flags: ["-Werror"] + # -no-pie to disable address randomization so we could symbolize stacktraces + cxx_flags: ["-Werror -no-pie"] sanitizers: ["NoSanitizers"] include: - container: "alpine-dev:latest" @@ -59,12 +59,6 @@ jobs: sanitizers: "Sanitizers" runs-on: ubuntu-latest - env: - SCCACHE_GHA_ENABLED: "true" - SCCACHE_CACHE_SIZE: 6G - SCCACHE_ERROR_LOG: /tmp/sccache_log.txt - # SCCACHE_LOG: debug - container: image: ghcr.io/romange/${{ matrix.container }} # Seems that docker by default prohibits running iouring syscalls @@ -99,16 +93,6 @@ jobs: touch /mnt/foo ls -la /mnt/foo - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.7 - - - name: Configure Cache Env - uses: actions/github-script@v7 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '') - - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type @@ -129,14 +113,12 @@ jobs: export USAN="ON" fi - # -no-pie to disable address randomization so we could symbolize stacktraces cmake -B ${GITHUB_WORKSPACE}/build \ -DCMAKE_BUILD_TYPE=${{matrix.build-type}} \ -GNinja \ -DCMAKE_C_COMPILER="${{matrix.compiler.c}}" \ -DCMAKE_CXX_COMPILER="${{matrix.compiler.cxx}}" \ - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache \ - -DCMAKE_CXX_FLAGS="${{matrix.cxx_flags}} -no-pie" -DWITH_AWS:BOOL=OFF \ + -DCMAKE_CXX_FLAGS="${{matrix.cxx_flags}}" -DWITH_AWS:BOOL=OFF \ -DWITH_ASAN="${ASAN}" \ -DWITH_USAN="${USAN}" \ -L diff --git a/.github/workflows/daily-builds.yml b/.github/workflows/daily-builds.yml index 49ef2d76a..56550d3ea 100644 --- a/.github/workflows/daily-builds.yml +++ b/.github/workflows/daily-builds.yml @@ -1,7 +1,6 @@ name: daily-builds on: - # TODO: Remove this. This is for testing schedule: - cron: '0 6 * * *' # run at 6 AM UTC workflow_dispatch: @@ -37,15 +36,6 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.7 - - - name: Configure Cache Env - uses: actions/github-script@v7 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '') - name: Install dependencies run: | @@ -59,8 +49,7 @@ jobs: - name: Configure & Build run: | cd $GITHUB_WORKSPACE/build - cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache \ - ${{ matrix.flags }} + cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja ${{ matrix.flags }} ninja src/all - name: Test run: | @@ -74,15 +63,6 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.7 - - - name: Configure Cache Env - uses: actions/github-script@v7 - with: - script: | - core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); - core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '') - name: Install dependencies run: | @@ -114,7 +94,7 @@ jobs: echo "*************************** START BUILDING **************************************" CC=gcc-12 CXX=g++-12 cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DWITH_UNWIND=OFF \ - -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_FLAGS="-Wl,-ld_classic" \ + -DCMAKE_CXX_FLAGS="-Wl,-ld_classic" \ -DCMAKE_C_COMPILER="gcc-12" -DCMAKE_CXX_COMPILER="g++-12" ninja src/all diff --git a/src/server/db_slice.cc b/src/server/db_slice.cc index 899609017..871b889e3 100644 --- a/src/server/db_slice.cc +++ b/src/server/db_slice.cc @@ -1579,7 +1579,7 @@ auto DbSlice::StopSampleTopK(DbIndex db_ind) -> SamplingResult { SamplingResult result; result.top_keys.reserve(fmap.size()); for (auto& [key, count] : fmap) { - result.top_keys.emplace_back(move(key), count); + result.top_keys.emplace_back(std::move(key), count); } return result; } diff --git a/src/server/dfly_main.cc b/src/server/dfly_main.cc index ad58c6a19..2ee33cd35 100644 --- a/src/server/dfly_main.cc +++ b/src/server/dfly_main.cc @@ -108,8 +108,6 @@ constexpr size_t kFiberDefaultStackSize = 32_KB - 16; constexpr size_t kFiberDefaultStackSize = 40_KB - 16; #endif -using util::http::TlsClient; - enum class TermColor { kDefault, kRed, kGreen, kYellow }; // Returns the ANSI color code for the given color. TermColor::kDefault is // an invalid input. @@ -170,7 +168,7 @@ string NormalizePaths(std::string_view path) { } template unique_ptr MakeListener(Args&&... args) { - auto res = make_unique(forward(args)...); + auto res = make_unique(std::forward(args)...); res->SetConnFiberStackSize(kFiberDefaultStackSize); return res; } diff --git a/src/server/multi_command_squasher.cc b/src/server/multi_command_squasher.cc index 604340a65..5e4a013c7 100644 --- a/src/server/multi_command_squasher.cc +++ b/src/server/multi_command_squasher.cc @@ -246,7 +246,7 @@ bool MultiCommandSquasher::ExecuteSquashed(facade::RedisReplyBuilder* rb) { fb2::BlockingCounter bc(num_shards); DVLOG(1) << "Squashing " << num_shards << " " << tx->DebugId(); - auto cb = [this, tx, bc, rb]() mutable { + auto cb = [this, bc, rb]() mutable { this->SquashedHopCb(EngineShard::tlocal(), rb->GetRespVersion()); bc->Dec(); };