Use container in CI
This commit is contained in:
parent
286da5e409
commit
ee15f98142
|
@ -10,7 +10,7 @@ on:
|
||||||
env:
|
env:
|
||||||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
|
||||||
BUILD_TYPE: Debug
|
BUILD_TYPE: Debug
|
||||||
|
CXX: g++-9
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
# The CMake configure and build commands are platform agnostic and should work equally
|
# The CMake configure and build commands are platform agnostic and should work equally
|
||||||
|
@ -19,6 +19,11 @@ jobs:
|
||||||
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
|
# 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
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 90
|
timeout-minutes: 90
|
||||||
|
container:
|
||||||
|
image: ghcr.io/${{ github.actor }}/ubuntu-dev:latest
|
||||||
|
credentials:
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GHCR_TOKEN }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
@ -26,33 +31,33 @@ jobs:
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
uname -a
|
uname -a
|
||||||
sudo apt-fast install -y autoconf-archive bison libunwind-dev libfl-dev ninja-build libtool curl gcc-10 g++-10
|
|
||||||
sudo apt-fast install -y libboost-all-dev libxml2-dev zip ccache
|
|
||||||
cmake --version
|
cmake --version
|
||||||
mkdir -p ${{github.workspace}}/build
|
mkdir -p ${{github.workspace}}/build
|
||||||
- name: Cache ccache
|
- name: Cache build deps
|
||||||
id: cache-ccache
|
id: cache-deps
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.ccache
|
~/.ccache
|
||||||
key: ${{ runner.os }}-ccache-${{ github.sha }}
|
${{github.workspace}}/build/_deps
|
||||||
restore-keys: ${{ runner.os }}-ccache-
|
key: ${{ runner.os }}-deps-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-deps-
|
||||||
|
|
||||||
- name: Configure CMake
|
- 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.
|
# 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
|
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
|
||||||
run: |
|
run: |
|
||||||
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -GNinja -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
|
||||||
cd ${{github.workspace}}/build
|
cd ${{github.workspace}}/build && pwd
|
||||||
env:
|
du -hcs _deps/
|
||||||
CC: gcc-10
|
|
||||||
CXX: g++-10
|
|
||||||
- name: Build & Test
|
- name: Build & Test
|
||||||
working-directory: ${{github.workspace}}/build
|
|
||||||
run: |
|
run: |
|
||||||
|
cd ${{github.workspace}}/build
|
||||||
ninja core/all server/all
|
ninja core/all server/all
|
||||||
ccache --show-stats
|
ccache --show-stats
|
||||||
# GLOG_logtostderr=1 ctest -V -R list_family_test
|
# GLOG_logtostderr=1 ctest -V -R list_family_test
|
||||||
echo Run ctest -V -L DFLY
|
echo Run ctest -V -L DFLY
|
||||||
GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1 ctest -V -L DFLY
|
#GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1
|
||||||
GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1 CTEST_OUTPUT_ON_FAILURE=1 ninja server/test
|
ctest -V -L DFLY
|
||||||
|
# GLOG_logtostderr=1 GLOG_vmodule=transaction=1,engine_shard_set=1 CTEST_OUTPUT_ON_FAILURE=1 ninja server/test
|
||||||
|
|
Loading…
Reference in New Issue