Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 20 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@ name: build

on: [push, pull_request]

permissions:
contents: read

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
# macos:
# name: macos / clang
# runs-on: macos-10.15
# env:
# CC: clang
# steps:
# - uses: actions/checkout@v2
# - name: Prepare1
# run: brew install gcc glib google-perftools libomp
# - name: Prepare2
# run: bash scripts/setup.sh
# - name: Configure CMake
# run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
# - name: build
# run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
# - name: Run
# continue-on-error: true
# run: make test
macos:
name: macos / clang
runs-on: macos-latest
Copy link

Copilot AI Jun 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using 'macos-latest' may lead to varying build environments over time; consider pinning to a specific macOS version to ensure consistent builds if required.

Suggested change
runs-on: macos-latest
runs-on: macos-12

Copilot uses AI. Check for mistakes.
steps:
- uses: actions/checkout@v4
- name: Prepare
run: bash scripts/install_dependency.sh
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Test
working-directory: ${{github.workspace}}/build
run: |
ctest -C ${{env.BUILD_TYPE}} --output-on-failure

ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Prepare
run: bash scripts/install_dependency.sh
- name: Configure CMake with LSan
Expand All @@ -49,7 +49,7 @@ jobs:
selfhosted:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DENABLE_GLCACHE=on -DENABLE_LRB=on
- name: Build
Expand Down
16 changes: 8 additions & 8 deletions test/test_evictionAlgo.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ static void print_results(const cache_t *cache, const cache_stat_t *res) {
}
printf("};\n");

printf("uint64_t miss_cnt_true[] = {");
printf("uint64_t miss_cnt[] = {");
printf("%ld", (long)res[0].n_miss);
for (uint64_t i = 1; i < CACHE_SIZE / STEP_SIZE; i++) {
printf(", %ld", (long)res[i].n_miss);
}
printf("};\n");

printf("uint64_t miss_byte_true[] = {");
printf("uint64_t miss_byte[] = {");
printf("%ld", (long)res[0].n_miss_byte);
for (uint64_t i = 1; i < CACHE_SIZE / STEP_SIZE; i++) {
printf(", %ld", (long)res[i].n_miss_byte);
Expand Down Expand Up @@ -327,10 +327,10 @@ static void test_LeCaR(gconstpointer user_data) {
}

static void test_Cacheus(gconstpointer user_data) {
uint64_t miss_cnt_true[] = {89776, 82725, 78839, 73048,
69329, 69184, 69117, 66048};
uint64_t miss_byte_true[] = {4048868864, 3727920128, 3489738752, 3184179200,
2981198336, 2968055296, 2925565440, 2789046784};
uint64_t miss_cnt_true[] = {90052, 82866, 77130, 77115,
69828, 68435, 67930, 66993};
uint64_t miss_byte_true[] = {4068200448, 3757362176, 3439912448, 3359079424,
3018722816, 2928907776, 2867576832, 2834809856};

reader_t *reader = (reader_t *)user_data;
common_cache_params_t cc_params = {
Expand Down Expand Up @@ -607,8 +607,8 @@ static void empty_test(gconstpointer user_data) { ; }

int main(int argc, char *argv[]) {
g_test_init(&argc, &argv, NULL);
srand(0); // for reproducibility
set_rand_seed(rand());
srand(0); // for reproducibility
set_rand_seed(42); // Use fixed seed for cross-platform consistency

reader_t *reader;

Expand Down
Loading