Skip to content

Commit

Permalink
update self-hosted runner
Browse files Browse the repository at this point in the history
  • Loading branch information
1a1a11a committed Feb 4, 2022
1 parent ab8e567 commit b51bbeb
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 69 deletions.
62 changes: 35 additions & 27 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,24 @@ env:
BUILD_TYPE: Release

jobs:
linux:
name: bionic / gcc-7
runs-on: ubuntu-18.04
env:
CC: gcc
steps:
- uses: actions/checkout@v2
- name: Prepare1
run: sudo apt install libglib2.0-dev libgoogle-perftools-dev build-essential cmake google-perftools
# - 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
run: make test
# gcc7:
# name: bionic / gcc-7
# runs-on: ubuntu-18.04
# env:
# CC: gcc
# steps:
# - uses: actions/checkout@v2
# - name: Prepare1
# run: sudo apt install libglib2.0-dev libgoogle-perftools-dev build-essential cmake google-perftools
# - 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
# run: make test

# macos:
# name: macos / clang
# runs-on: macos-10.15
Expand All @@ -47,19 +48,26 @@ jobs:
# continue-on-error: true
# run: make test

build:
# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
# cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ubuntu-latest
# ubuntu:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Prepare1
# run: sudo apt install libglib2.0-dev libgoogle-perftools-dev build-essential cmake google-perftools
# - 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: Test
# working-directory: ${{github.workspace}}/build
# run: ctest -C ${{env.BUILD_TYPE}}

selfhosted:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Prepare1
run: sudo apt install libglib2.0-dev libgoogle-perftools-dev build-essential cmake google-perftools
# - name: Prepare2
# run: bash scripts/setup.sh
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
Expand Down
27 changes: 18 additions & 9 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

CURR_DIR=$(pwd)

setup_ubuntu() {
sudo apt install libglib2.0-dev libgoogle-perftools-dev build-essential cmake google-perftools
Expand All @@ -16,41 +17,49 @@ setup_macOS() {
}

setup_xgboost() {
cd /tmp/
pushd /tmp/
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
pushd xgboost
mkdir build
cd build
pushd build
cmake ..
make -j
sudo make install
}

setup_lightgbm() {
cd /tmp/
pushd /tmp/
git clone --recursive https://github.com/microsoft/LightGBM
cd LightGBM
pushd LightGBM
mkdir build
cd build
pushd build
cmake ..
make -j
sudo make install
}

setup_zstd() {
cd /tmp/
pushd /tmp/
wget https://github.com/facebook/zstd/releases/download/v1.5.0/zstd-1.5.0.tar.gz
tar xvf zstd-1.5.0.tar.gz;
cd zstd-1.5.0/build/cmake/
pushd zstd-1.5.0/build/cmake/
mkdir _build;
cd _build/;
pushd _build/;
cmake ..
make -j
sudo make install
}


# setup_ubuntu
download_data
setup_xgboost
setup_lightgbm
setup_zstd







12 changes: 0 additions & 12 deletions test/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,6 @@ static cache_t *create_test_cache(const char *alg_name,
cache = LeCaR_init(cc_params, NULL);
} else if (strcasecmp(alg_name, "Cacheus") == 0) {
cache = Cacheus_init(cc_params, NULL);

// } else if (strcmp(alg_name, "SLRU") == 0) {
// SLRU_init_params_t *init_params = g_new0(SLRU_init_params_t, 1);
// init_params_g = init_params;
// init_params->n_seg = 2;
// cache = SLRU_init(cc_params, init_params);
// } else if (strcmp(alg_name, "Optimal") == 0) {
// struct Optimal_init_params *init_params = g_new0(struct Optimal_init_params, 1);
// init_params_g = init_params;
// init_params->reader = reader;
// init_params->ts = 0;
// cache = Optimal_init(cc_params, (void *) init_params);
} else if (strcasecmp(alg_name, "SLRU") == 0) {
SLRU_init_params_t init_params;
init_params.n_seg = 5; // Currently hard-coded
Expand Down
21 changes: 0 additions & 21 deletions test/test_evictionAlgo.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,9 +241,6 @@ static void test_LHD(gconstpointer user_data) {

static void test_Hyperbolic(gconstpointer user_data) {
uint64_t req_cnt_true = 113872, req_byte_true = 4205978112;
// uint64_t miss_cnt_true[] = {77842, 72545, 68305, 64548, 61235, 57379, 56122, 54931};
// uint64_t miss_byte_true[] = {3674691072, 3378123776, 3130418688, 3008906752,
// 2823867904, 2587132928, 2510087680, 2432546304};
uint64_t miss_cnt_true[] = {85819, 78714, 70297, 64546, 61234, 57377, 56121, 54930};
uint64_t miss_byte_true[] = {3832728576, 3443996160, 3132970496, 3008947712,
2823863808, 2587067392, 2510083584, 2432542208};
Expand All @@ -264,9 +261,6 @@ static void test_Hyperbolic(gconstpointer user_data) {

static void test_LeCaR(gconstpointer user_data) {
uint64_t req_cnt_true = 113872, req_byte_true = 4205978112;
// uint64_t miss_cnt_true[] = {92692, 86943, 78684, 80389, 72269, 68092, 65518, 67356};
// uint64_t miss_byte_true[] = {4024961024, 3801507840, 3484686848, 3547768832,
// 3072761856, 2909752320, 2755649024, 2786736128};
uint64_t miss_cnt_true[] = {92692, 86839, 78751, 81283, 72368, 68083, 65219, 68423};
uint64_t miss_byte_true[] = {4024961024, 3799468544, 3506645504, 3605686272,
3081307648, 2909224448, 2736208384, 2849179136};
Expand All @@ -288,9 +282,6 @@ static void test_LeCaR(gconstpointer user_data) {

static void test_LFUDA(gconstpointer user_data) {
uint64_t req_cnt_true = 113872, req_byte_true = 4205978112;
// uint64_t miss_cnt_true[] = {92233, 85809, 80462, 79335, 73049, 69671, 67942, 67782};
// uint64_t miss_byte_true[] = {4023913984, 3752341504, 3534985216, 3504430592, 3150782464, 2977339904, 2867254784, 2824277504};

uint64_t miss_cnt_true[] = {92233, 85805, 80462, 79335, 73049, 69670, 67946, 67783};
uint64_t miss_byte_true[] = {4023913984, 3752284160, 3534985216, 3504430592,
3150782464, 2977274368, 2867447296, 2824343040};
Expand All @@ -311,11 +302,6 @@ static void test_LFUDA(gconstpointer user_data) {

static void test_MRU(gconstpointer user_data) {
uint64_t req_cnt_true = 113872, req_byte_true = 4205978112;
// uint64_t miss_cnt_true[] = {97661, 94006, 88557, 83224,
// 77645, 66502, 62676, 59598};
// uint64_t miss_byte_true[] = {4002354176, 3760773120, 3541634048, 3329184768,
// 3101117440, 2661397504, 2484923904, 2363019776};

/* a new result */
uint64_t miss_cnt_true[] = {100096, 93466, 87001, 82124, 77443, 71956, 68252, 64936};
uint64_t miss_byte_true[] = {3929311744, 3599883264, 3304649728, 3097044480,
Expand Down Expand Up @@ -359,13 +345,6 @@ static void test_LRU_K(gconstpointer user_data) {

static void test_ARC(gconstpointer user_data) {
uint64_t req_cnt_true = 113872, req_byte_true = 4205978112;
// uint64_t miss_cnt_true[] = {91767, 86514, 83030, 83100, 73160, 69011, 67656, 66081};
// uint64_t miss_byte_true[] = {3998675456, 3785527296, 3658743808, 3684266496, 3143558656, 2961070080, 2879977472, 2780966912};

// uint64_t miss_cnt_true[] = {91385, 84061, 77353, 76506, 68994, 66441, 64819, 64376};
// uint64_t miss_byte_true[] = {3990213632, 3692986368, 3434442752, 3413374464,
// 2963407872, 2804032512, 2717934080, 2690728448};

uint64_t miss_cnt_true[] = {93798, 87602, 84471, 83216, 73606, 68674, 72144, 72726};
uint64_t miss_byte_true[] = {4037066752, 3814765056, 3722742784, 3637225984,
3158606848, 2914956800, 3077340160, 3112387584};
Expand Down

0 comments on commit b51bbeb

Please sign in to comment.