-
Notifications
You must be signed in to change notification settings - Fork 322
124 lines (108 loc) · 3.36 KB
/
hybridse-ci.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
name: HybridSE CI
on:
push:
branches:
- main
paths:
- .github/workflows/hybridse-ci.yml
- 'cases/**'
- 'hybridse/**'
- 'include/**'
pull_request:
paths:
- .github/workflows/hybridse-ci.yml
- 'cases/**'
- 'hybridse/**'
- 'include/**'
workflow_dispatch:
env:
CTEST_PARALLEL_LEVEL: 2 # parallel test level for ctest (make test)
CTEST_OUTPUT_ON_FAILURE: ON
NPROC: 2 # default Parallel build number for GitHub's Linux runner
jobs:
linux-build:
runs-on: ubuntu-latest
container:
image: ghcr.io/4paradigm/hybridsql:latest
env:
TESTING_ENABLE_STRIP: ON
steps:
- uses: actions/checkout@v2
- name: Build HybridSE
run: |
make hybridse-build
- name: Core Test
run: |
make hybridse-test
- name: Upload Cpp UT Results
if: always()
uses: actions/upload-artifact@v2
with:
name: linux-ut-result-cpp-${{ github.sha }}
path: |
build/hybridse/**/*.xml
macos-build:
name: Build in MacOS
runs-on: macos-latest
env:
NPROC: 3
CTEST_PARALLEL_LEVEL: 3 # parallel test level for ctest (make test)
# this option enables print inner output rows of each node in runner
HYBRIDSE_DEBUG: true
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
brew install coreutils
- name: Cache thirdparty
uses: actions/cache@v3
with:
path: |
.deps/
thirdsrc
key: ${{ runner.os }}-thirdparty-${{ hashFiles('third-party/**/CMakeLists.txt', 'third-party/**/*.cmake', 'third-party/**/*.sh') }}
- name: Build Core
run: |
make hybridse-build
- name: Core Test
run: |
make hybridse-test
- name: Upload Event File
if: always()
uses: actions/upload-artifact@v3
with:
name: event-file
path: ${{ github.event_path }}
- name: Upload Cpp UT Results
if: always()
uses: actions/upload-artifact@v3
with:
name: macos-ut-result-cpp-${{ github.sha }}
path: |
build/hybridse/**/*.xml
publish-test-results-linux:
needs: ["linux-build"]
# the action will only run on 4paradigm/OpenMLDB's context, not for fork repo or dependabot
if: >
always() && github.event_name == 'push' || (
github.event.pull_request.head.repo.full_name == github.repository &&
github.event.sender.login != 'dependabot[bot]' )
name: Publish Linux UT Results
uses: ./.github/workflows/publish-test-results-action.yml
with:
files: linux-ut-result-*/**/*.xml
check_name: HybridSE Linux Test Report
comment_title: HybridSE Linux Test Report
publish-test-results-mac:
needs: ["macos-build"]
# the action will only run on 4paradigm/OpenMLDB's context, not for fork repo or dependabot
if: >
always() && github.event_name == 'push' || (
github.event.pull_request.head.repo.full_name == github.repository &&
github.event.sender.login != 'dependabot[bot]' )
name: Publish Mac UT Results
uses: ./.github/workflows/publish-test-results-action.yml
with:
files: macos-ut-result-*/**/*.xml
check_name: HybridSE Mac Test Report
comment_title: HybridSE Mac Test Report