-
Notifications
You must be signed in to change notification settings - Fork 148
94 lines (92 loc) · 3.46 KB
/
restart_recovery_suite.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
83
84
85
86
87
88
89
90
91
92
93
94
name: Restart recovery suite
on:
schedule:
- cron: '0 1 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build
timeout-minutes: 420
runs-on: ubuntu-22.04
container:
image: concordbft/concord-bft:0.60
options: --cap-add=NET_ADMIN
outputs:
err_output: ${{ steps.prepare_err_artifacts.outputs.test}}
strategy:
fail-fast: false
matrix:
compiler: [g++]
steps:
- name: Cleanup pre-installed tools
run: |
# This is a fix for https://github.com/actions/virtual-environments/issues/1918
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
mkdir build
cd build
cmake \
-DCMAKE_CXX_COMPILER=${{ matrix.compiler }} \
-DBUILD_COMM_UDP=ON \
-DBUILD_COMM_TCP_TLS=OFF \
-DBUILD_COMM_TCP_PLAIN=OFF \
-DCMAKE_BUILD_TYPE=RELEASE \
-DBUILD_COMM_TCP_TLS=FALSE \
-DBUILD_TESTING=ON \
-DENABLE_RESTART_RECOVERY_TESTS=TRUE \
-DBUILD_COMM_TCP_PLAIN=FALSE \
-DCMAKE_CXX_FLAGS_RELEASE='-O3 -g' \
-DUSE_LOG4CPP=TRUE \
-DBUILD_ROCKSDB_STORAGE=TRUE \
-DUSE_S3_OBJECT_STORE=OFF \
-DUSE_OPENTRACING=ON \
-DOMIT_TEST_OUTPUT=OFF\
-DKEEP_APOLLO_LOGS=TRUE\
-DUSE_FAKE_CLOCK_IN_TIME_SERVICE=TRUE\
..
make -j$(nproc)
- name: Test
run: |
cd build
# many tests require administrative priviliges for running iptables or nc
sudo ctest --timeout 24000 --test-timeout 24000 --output-on-failure -R skvbc_restart_recovery_tests
- name: Prepare artifacts
if: ${{ failure() }}
run: |
mkdir -p artifact
sudo chown -R ${USER}:${GROUP} ${PWD}/build
tar -czvf artifact/logs.tar.gz ./build/tests/apollo/logs
- name: Upload artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: artifacts-${{ matrix.compiler }}-${{ matrix.ci_build_type }}-${{ github.sha }}
path: ${{ github.workspace }}/artifact/
- name: Check ERROR/FATAL logs
if: always()
run: |
./.github/success_action_if_err_logs_exist.sh ./build/tests/apollo/logs
echo "file_count=$(find ./build/tests/apollo/logs -name ReplicaErrorLogs.txt | wc -l)" >> $GITHUB_ENV
- name: Prepare error artifacts
id: prepare_err_artifacts
if: ${{ env.file_count > 0 }}
run: |
sudo chown -R ${USER}:${GROUP} ${PWD}/build
tar -czvf ${{ github.workspace }}/artifact/logs.tar.gz ./build/tests/apollo/logs
du -h ${{ github.workspace }}/artifact
sudo df -h
echo "::set-output name=test::success"
- name: Upload error artifacts
uses: actions/upload-artifact@v2
if: ${{ env.file_count > 0 }}
with:
name: artifacts-${{ matrix.compiler }}-${{ matrix.ci_build_type }}-${{ github.sha }}
path: ${{ github.workspace }}/artifact/