-
Notifications
You must be signed in to change notification settings - Fork 279
71 lines (56 loc) · 3.17 KB
/
tests.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
name: tests
on:
push:
branches: [ main ]
paths-ignore:
- 'docs/**'
- '*.md'
pull_request:
types: [ opened, synchronize, reopened, edited ]
paths-ignore:
- 'docs/**'
- '*.md'
jobs:
tests:
name: tests
runs-on: [ "self-hosted", "avx512" ]
steps:
- name: Ensure workspace ownership
run: echo "chown -R $USER $GITHUB_WORKSPACE" && sudo chown -R $USER $GITHUB_WORKSPACE
- name: Check out code
uses: actions/checkout@v3
- name: Start builder container
run: |
TZ=$(readlink -f /etc/localtime | awk -F '/zoneinfo/' '{print $2}')
sudo docker rm -f infinity_build && sudo docker run -d --name infinity_build --network=host -e TZ=$TZ -v $PWD:/infinity infiniflow/infinity_builder:ubuntu2310
- name: Build debug version
run: sudo docker exec infinity_build bash -c "cd /infinity && rm -fr cmake-build-debug && mkdir -p cmake-build-debug && cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -S /infinity -B /infinity/cmake-build-debug && cmake --build /infinity/cmake-build-debug"
- name: Install pysdk
run: sudo docker exec infinity_build bash -c "cd /infinity/python && python3 setup.py install"
- name: Start infinity debug version
run: |
# Run a command in the background
sudo docker exec infinity_build bash -c "cd /infinity/ && rm -fr /tmp/infinity && cmake-build-debug/src/infinity > debug.log 2>&1" &
- name: pysdk & sqllogictest debug version
run: sudo docker exec infinity_build bash -c "cd /infinity/ && python3 tools/sqllogictest.py"
- name: Stop infinity debug
run: sudo kill $(pidof cmake-build-debug/src/infinity)
if: always() # always run this step even if previous steps failed
- name: Collect infinity debug output
# GitHub Actions interprets output lines starting with "Error" as error messages, and it automatically sets the step status to failed when such lines are detected.
run: cat debug.log 2>/dev/null || true
if: always() # always run this step even if previous steps failed
- name: Build release version
run: sudo docker exec infinity_build bash -c "cd /infinity && rm -fr cmake-build-release && mkdir -p cmake-build-release && cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -S /infinity -B /infinity/cmake-build-release && cmake --build /infinity/cmake-build-release"
- name: Start infinity release version
run: |
sudo docker exec infinity_build bash -c "cd /infinity/ && rm -fr /tmp/infinity && cmake-build-release/src/infinity > release.log 2>&1" &
- name: pysdk & sqllogictest release version
run: sudo docker exec infinity_build bash -c "cd /infinity/ && python3 tools/sqllogictest.py"
- name: Stop infinity release
run: sudo kill $(pidof cmake-build-release/src/infinity)
if: always() # always run this step even if previous steps failed
- name: Collect infinity release output
# GitHub Actions interprets output lines starting with "Error" as error messages, and it automatically sets the step status to failed when such lines are detected.
run: cat release.log 2>/dev/null || true
if: always() # always run this step even if previous steps failed