Skip to content

Commit ba8ff32

Browse files
romangekostasrim
authored andcommitted
fix: broken gha cache (#4951)
* fix: broken gha cache Also fix some clang warnings. Signed-off-by: Roman Gershman <roman@dragonflydb.io> * chore: comments --------- Signed-off-by: Roman Gershman <roman@dragonflydb.io>
1 parent 22529db commit ba8ff32

File tree

5 files changed

+11
-51
lines changed

5 files changed

+11
-51
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ jobs:
1919
with:
2020
fetch-depth: 2
2121
- uses: actions/setup-python@v5
22+
with:
23+
python-version: '3.x'
24+
check-latest: true
2225
- name: Install dependencies
2326
run: |
2427
python -m venv venv
@@ -27,10 +30,6 @@ jobs:
2730
lsblk -l
2831
echo "sda rotational = $(cat /sys/block/sda/queue/rotational)"
2932
echo "sdb rotational = $(cat /sys/block/sdb/queue/rotational)"
30-
- uses: actions/cache@v4
31-
with:
32-
path: ~/.cache/pre-commit
33-
key: pre-commit|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}
3433
- name: Run pre-commit checks
3534
run: |
3635
source venv/bin/activate
@@ -43,7 +42,8 @@ jobs:
4342
container: ["ubuntu-dev:20", "alpine-dev:latest"]
4443
build-type: [Debug, Release]
4544
compiler: [{ cxx: g++, c: gcc }]
46-
cxx_flags: ["-Werror"]
45+
# -no-pie to disable address randomization so we could symbolize stacktraces
46+
cxx_flags: ["-Werror -no-pie"]
4747
sanitizers: ["NoSanitizers"]
4848
include:
4949
- container: "alpine-dev:latest"
@@ -59,12 +59,6 @@ jobs:
5959
sanitizers: "Sanitizers"
6060

6161
runs-on: ubuntu-latest
62-
env:
63-
SCCACHE_GHA_ENABLED: "true"
64-
SCCACHE_CACHE_SIZE: 6G
65-
SCCACHE_ERROR_LOG: /tmp/sccache_log.txt
66-
# SCCACHE_LOG: debug
67-
6862
container:
6963
image: ghcr.io/romange/${{ matrix.container }}
7064
# Seems that docker by default prohibits running iouring syscalls
@@ -99,16 +93,6 @@ jobs:
9993
touch /mnt/foo
10094
ls -la /mnt/foo
10195
102-
- name: Run sccache-cache
103-
uses: mozilla-actions/sccache-action@v0.0.7
104-
105-
- name: Configure Cache Env
106-
uses: actions/github-script@v7
107-
with:
108-
script: |
109-
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
110-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '')
111-
11296
- name: Configure CMake
11397
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
11498
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
@@ -129,14 +113,12 @@ jobs:
129113
export USAN="ON"
130114
fi
131115
132-
# -no-pie to disable address randomization so we could symbolize stacktraces
133116
cmake -B ${GITHUB_WORKSPACE}/build \
134117
-DCMAKE_BUILD_TYPE=${{matrix.build-type}} \
135118
-GNinja \
136119
-DCMAKE_C_COMPILER="${{matrix.compiler.c}}" \
137120
-DCMAKE_CXX_COMPILER="${{matrix.compiler.cxx}}" \
138-
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache \
139-
-DCMAKE_CXX_FLAGS="${{matrix.cxx_flags}} -no-pie" -DWITH_AWS:BOOL=OFF \
121+
-DCMAKE_CXX_FLAGS="${{matrix.cxx_flags}}" -DWITH_AWS:BOOL=OFF \
140122
-DWITH_ASAN="${ASAN}" \
141123
-DWITH_USAN="${USAN}" \
142124
-L

.github/workflows/daily-builds.yml

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
name: daily-builds
22

33
on:
4-
# TODO: Remove this. This is for testing
54
schedule:
65
- cron: '0 6 * * *' # run at 6 AM UTC
76
workflow_dispatch:
@@ -37,15 +36,6 @@ jobs:
3736
- uses: actions/checkout@v4
3837
with:
3938
submodules: true
40-
- name: Run sccache-cache
41-
uses: mozilla-actions/sccache-action@v0.0.7
42-
43-
- name: Configure Cache Env
44-
uses: actions/github-script@v7
45-
with:
46-
script: |
47-
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
48-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '')
4939

5040
- name: Install dependencies
5141
run: |
@@ -59,8 +49,7 @@ jobs:
5949
- name: Configure & Build
6050
run: |
6151
cd $GITHUB_WORKSPACE/build
62-
cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_C_COMPILER_LAUNCHER=sccache \
63-
${{ matrix.flags }}
52+
cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja ${{ matrix.flags }}
6453
ninja src/all
6554
- name: Test
6655
run: |
@@ -74,15 +63,6 @@ jobs:
7463
- uses: actions/checkout@v4
7564
with:
7665
submodules: true
77-
- name: Run sccache-cache
78-
uses: mozilla-actions/sccache-action@v0.0.7
79-
80-
- name: Configure Cache Env
81-
uses: actions/github-script@v7
82-
with:
83-
script: |
84-
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
85-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '')
8666

8767
- name: Install dependencies
8868
run: |
@@ -114,7 +94,7 @@ jobs:
11494
11595
echo "*************************** START BUILDING **************************************"
11696
CC=gcc-12 CXX=g++-12 cmake .. -DCMAKE_BUILD_TYPE=Debug -GNinja -DWITH_UNWIND=OFF \
117-
-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_FLAGS="-Wl,-ld_classic" \
97+
-DCMAKE_CXX_FLAGS="-Wl,-ld_classic" \
11898
-DCMAKE_C_COMPILER="gcc-12" -DCMAKE_CXX_COMPILER="g++-12"
11999
120100
ninja src/all

src/server/db_slice.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1579,7 +1579,7 @@ auto DbSlice::StopSampleTopK(DbIndex db_ind) -> SamplingResult {
15791579
SamplingResult result;
15801580
result.top_keys.reserve(fmap.size());
15811581
for (auto& [key, count] : fmap) {
1582-
result.top_keys.emplace_back(move(key), count);
1582+
result.top_keys.emplace_back(std::move(key), count);
15831583
}
15841584
return result;
15851585
}

src/server/dfly_main.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ constexpr size_t kFiberDefaultStackSize = 32_KB - 16;
108108
constexpr size_t kFiberDefaultStackSize = 40_KB - 16;
109109
#endif
110110

111-
using util::http::TlsClient;
112-
113111
enum class TermColor { kDefault, kRed, kGreen, kYellow };
114112
// Returns the ANSI color code for the given color. TermColor::kDefault is
115113
// an invalid input.
@@ -170,7 +168,7 @@ string NormalizePaths(std::string_view path) {
170168
}
171169

172170
template <typename... Args> unique_ptr<Listener> MakeListener(Args&&... args) {
173-
auto res = make_unique<Listener>(forward<Args>(args)...);
171+
auto res = make_unique<Listener>(std::forward<Args>(args)...);
174172
res->SetConnFiberStackSize(kFiberDefaultStackSize);
175173
return res;
176174
}

src/server/multi_command_squasher.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ bool MultiCommandSquasher::ExecuteSquashed(facade::RedisReplyBuilder* rb) {
257257
fb2::BlockingCounter bc(num_shards);
258258
DVLOG(1) << "Squashing " << num_shards << " " << tx->DebugId();
259259

260-
auto cb = [this, tx, bc, rb]() mutable {
260+
auto cb = [this, bc, rb]() mutable {
261261
this->SquashedHopCb(EngineShard::tlocal(), rb->GetRespVersion());
262262
bc->Dec();
263263
};

0 commit comments

Comments
 (0)