-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (75 loc) · 2.72 KB
/
workflow-self-hosted-ubuntu.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: Ubuntu CI Check
on:
push:
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
pull_request:
paths-ignore:
- "docs/**"
- "Changelog.md"
- "README.md"
release:
types: [push]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_ubuntu:
name: ubuntu ci check
runs-on: self-hosted-ubuntu
strategy:
fail-fast: false
env:
VCPKG_ROOT: ~/cache/vcpkg
DEPS_ROOT: ~/cache/deps
steps:
- uses: actions/checkout@v3
with:
clean: false
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 8
java-package: jdk
- name: apt install
run: |
sudo apt update
sudo apt install -y lcov ccache wget python3-dev python3-pip git curl zip unzip tar
sudo apt install -y --no-install-recommends \
clang make build-essential cmake libssl-dev zlib1g-dev ca-certificates \
libgmp-dev flex bison patch libzstd-dev ninja-build pkg-config ccache uuid-runtime
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly-2022-07-28
override: true
- name: Reuse build cache
run: |
mkdir -p ./build
rm -rf deps
ln -s ${{ env.DEPS_ROOT }} deps
- name: Remove cache if correspond dir change
run: ./tools/.ci/clear_build_cache.sh
- name: Config vcpkg registry proxy
run: sed -i "s/https:\/\/github.com/http:\/\/ghproxy.com\/https:\/\/github.com/g" vcpkg-configuration.json
- name: Build for linux
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
cd build && cmake -DCMAKE_TOOLCHAIN_FILE=${{ env.VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake -DCMAKE_BUILD_TYPE=Debug -DTESTS=ON -DCOVERAGE=ON -DWITH_LIGHTNODE=ON -DWITH_CPPSDK=ON -DWITH_TIKV=ON -DWITH_TARS_SERVICES=ON -DTOOLS=ON .. || cat *.log
make -j8
- name: Test
run: |
export PATH=/home/ci/.tiup/bin/:$PATH
cat /home/ci/.bashrc
curl --proto '=https' --tlsv1.2 -sSf https://tiup-mirrors.pingcap.com/install.sh | sh
source /home/ci/.bashrc
tiup update --self && tiup update playground
tiup install playground tikv:v5.4.2 pd:v5.4.2
nohup tiup playground v5.4.2 --mode tikv-slim --without-monitor &
sleep 30 && cd build && CTEST_OUTPUT_ON_FAILURE=TRUE ctest
- name: Integration test - Air
run: cd tools && bash .ci/ci_check_air.sh
- name: Integration test - Pro
run: cd tools && bash .ci/ci_check_pro.sh