-
Notifications
You must be signed in to change notification settings - Fork 14
126 lines (106 loc) · 3.54 KB
/
mac.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
125
126
name: Test on macOS
on:
push:
branches:
- '3.0'
pull_request:
branches:
- '3.0'
jobs:
test:
name: "Test on macOS"
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup coreutils
run: brew install coreutils
- name: Setup geos
run: brew install geos
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Set up Go
if: steps.changed-files-specific.outputs.any_changed == 'true'
uses: actions/setup-go@v3
with:
go-version: 1.17
- name: Determine TDengine branch
uses: haya14busa/action-cond@v1
id: determine-branch
with:
cond: ${{ github.base_ref == 'main' }}
if_true: 'main'
if_false: '3.0'
- name: Checkout tdengine
uses: actions/checkout@v2
with:
repository: "taosdata/TDengine"
path: "TDengine"
ref: ${{ steps.determine-branch.outputs.value }}
- name: Build TDengine
run: |
cd TDengine
mkdir build
cd build
cmake ../ -DBUILD_HTTP=false
make -j4 && make install
cd ../../
- name: Start TDengine
run: |
export C_INCLUDE_PATH=$PWD/TDengine/build/build/include
export LD_LIBRARY_PATH=$PWD/TDengine/build/build/lib
mkdir -p /tmp/taos/v3/log /tmp/taos/v3/data
printf "dataDir /tmp/taos/v3/data\nlogDir /tmp/taos/v3/log\ndebugFlag 135\n" |sudo tee /etc/taos/taos.cfg
TAOS_SUPPORT_VNODES=256 taosd &
taosadapter &
sleep 1
- name: Cache Poetry
id: cache-poetry
uses: actions/[email protected]
with:
path: ~/.poetry
key: macos-poetry
#----------------------------------------------
# ----- install & configure poetry -----
#----------------------------------------------
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
#----------------------------------------------
# load cached venv if cache exists
#----------------------------------------------
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
#----------------------------------------------
# install dependencies if cache does not exist
#----------------------------------------------
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
#----------------------------------------------
# install your root project, if required
#----------------------------------------------
- name: Install library
run: poetry install --no-interaction
#----------------------------------------------
# run test suite
#----------------------------------------------
- name: Test
run: |
export LD_LIBRARY_PATH=$PWD/TDengine/build/build/lib
source $VENV
export TDENGINE_URL=localhost:6041
poetry run pip install psutil pandas
poetry run pytest tests
- name: Build Artifacts
run: |
poetry build