File tree Expand file tree Collapse file tree 7 files changed +93
-39
lines changed Expand file tree Collapse file tree 7 files changed +93
-39
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : build-cachelib-docker
2+ on :
3+ push :
4+ pull_request :
5+
6+ jobs :
7+ build-cachelib-docker :
8+ name : " CentOS/latest - Build CacheLib with all dependencies"
9+ runs-on : ubuntu-latest
10+ env :
11+ REPO : cachelib
12+ GITHUB_REPO : pmem/CacheLib
13+ CONTAINER_REG : ghcr.io/pmem/cachelib
14+ CONTAINER_REG_USER : ${{ secrets.GH_CR_USER }}
15+ CONTAINER_REG_PASS : ${{ secrets.GH_CR_PAT }}
16+ FORCE_IMAGE_ACTION : ${{ secrets.FORCE_IMAGE_ACTION }}
17+ HOST_WORKDIR : ${{ github.workspace }}
18+ WORKDIR : docker
19+ IMG_VER : develop
20+ strategy :
21+ matrix :
22+ CONFIG : ["OS=centos OS_VER=8streams PUSH_IMAGE=1"]
23+ steps :
24+ - name : " System Information"
25+ run : |
26+ echo === uname ===
27+ uname -a
28+ echo === /etc/os-release ===
29+ cat /etc/os-release
30+ echo === df -hl ===
31+ df -hl
32+ echo === free -h ===
33+ free -h
34+ echo === top ===
35+ top -b -n1 -1 -Eg || timeout 1 top -b -n1
36+ echo === env ===
37+ env
38+ echo === gcc -v ===
39+ gcc -v
40+ - name : " checkout sources"
41+ uses : actions/checkout@v2
42+
43+ - name : Pull the image or rebuild and push it
44+ run : cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh $FORCE_IMAGE_ACTION
45+
46+ - name : Run the build
47+ run : cd $WORKDIR && ${{ matrix.CONFIG }} ./build.sh
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ TAG="${OS}-${OS_VER}-${IMG_VER}"
2727IMAGE_NAME=${CONTAINER_REG} :${TAG}
2828CONTAINER_NAME=CacheLib-${OS} -${OS_VER}
2929WORKDIR=/CacheLib # working dir within Docker container
30- SCRIPTSDIR=${WORKDIR} /utils/ docker
30+ SCRIPTSDIR=${WORKDIR} /docker
3131
3232if [[ -z " ${OS} " || -z " ${OS_VER} " ]]; then
3333 echo " ERROR: The variables OS and OS_VER have to be set " \
Original file line number Diff line number Diff line change 1+ FROM quay.io/centos/centos:stream8
2+
3+ RUN dnf install -y \
4+ cmake \
5+ sudo \
6+ git \
7+ tzdata \
8+ vim \
9+ gdb \
10+ clang
11+
12+ COPY ./install-cachelib-deps.sh ./install-cachelib-deps.sh
13+ RUN ./install-cachelib-deps.sh
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # SPDX-License-Identifier: BSD-3-Clause
3+ # Copyright 2022, Intel Corporation
4+
5+ git clone https://github.com/pmem/CacheLib CacheLib
6+
7+ ./CacheLib/contrib/prerequisites-centos8.sh
8+
9+ for pkg in zstd googleflags googlelog googletest sparsemap fmt folly fizz wangle fbthrift ;
10+ do
11+ sudo ./CacheLib/contrib/build-package.sh -j -I /opt/ " $pkg "
12+ done
13+
14+ rm -rf CacheLib
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ function push_image {
6161 # - not a pull_request event,
6262 # - and PUSH_IMAGE flag was set for current build.
6363 if [[ " ${CI_REPO_SLUG} " == " ${GITHUB_REPO} " \
64- && (${CI_BRANCH} == stable- * || ${CI_BRANCH} == master ) \
64+ && (${CI_BRANCH} == develop || ${CI_BRANCH} == main ) \
6565 && ${CI_EVENT_TYPE} != " pull_request" \
6666 && ${PUSH_IMAGE} == " 1" ]]
6767 then
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # SPDX-License-Identifier: BSD-3-Clause
3+ # Copyright 2022, Intel Corporation
4+
5+ set -e
6+
7+ function sudo_password() {
8+ echo ${USERPASS} | sudo -Sk $*
9+ }
10+
11+ cd ..
12+ mkdir build
13+ cd build
14+ cmake ../cachelib -DBUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=/opt -DCMAKE_BUILD_TYPE=Debug
15+ sudo_password make install -j$( nproc)
16+
17+ cd /opt/tests && $WORKDIR /run_tests.sh
You can’t perform that action at this time.
0 commit comments