-
Notifications
You must be signed in to change notification settings - Fork 142
139 lines (117 loc) · 3.8 KB
/
continuous.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
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Build
on:
push:
branches:
- main
jobs:
SmokeTests:
name: ${{ matrix.name }} (${{ matrix.config }} ${{ matrix.index_size }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-11, windows-2022]
config: [Debug, Release]
index_size: [Standard, Gargantua]
include:
- os: macos-11
name: macOS
- os: ubuntu-20.04
name: Linux
- os: windows-2022
name: Windows
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Checkout data
uses: actions/checkout@v3
with:
repository: BrunoLevy/geogram.data
path: tests/data
- name: Python3
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: RobotFramework
run: |
pip3 install robotframework
robot --version || true
################### Linux/MacOS ###############################################
- name: Dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install xorg-dev
- name: Configure (Linux/MacOS)
if: runner.os != 'Windows'
run: |
if [[ "${{matrix.index_size}}" == "Gargantua" ]]; \
then cp CMakeOptions.txt.gargantua CMakeOptions.txt; fi
./configure.sh
echo "platform="\
`./configure.sh --show-platform`-${{ matrix.config }} >> $GITHUB_ENV
- name: Build (Linux/MacOS)
if: runner.os != 'Windows'
run: |
cd build/${{ env.platform }};\
make -j2 2>&1 |tee ../../build_log.txt
- name: Tests (Linux/MacOs)
if: runner.os != 'Windows'
run: |
build/${{ env.platform }}/tests/runpybot.sh --include=smoke tests/
################### Windows ##################################################
- name: Configure (Windows)
if: runner.os == 'Windows'
run: |
if "${{matrix.index_size}}" == "Gargantua" ^
(copy CMakeOptions.txt.gargantua CMakeOptions.txt)
./configure.bat
- name: Build (Windows)
if: runner.os == 'Windows'
run: |
cmake --build build/Windows --config ${{ matrix.config }} ^
| tee -filepath build_log.txt
- name: Tests (Windows)
if: runner.os == 'Windows'
run: |
build/Windows/tests/runpybot.bat ^
--config=${{ matrix.config }} --include=smoke tests/
##############################################################################
- name: Publish tests results as artifacts
uses: actions/upload-artifact@v3
with:
name: smoke-${{matrix.name}}-${{matrix.config}}-${{matrix.index_size}}
if-no-files-found: ignore
path: |
report.html
log.html
build_log.txt
TESTS_SUCCESS
- name: "Notify tests results"
uses: andstor/file-existence-action@v2
with:
files: "TESTS_SUCCESS"
fail: true
##############################################################################
Reports:
runs-on: ubuntu-latest
if: always()
needs: SmokeTests
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Generate reports from artifacts
run: |
./tools/generate_reports.sh
- name: Publish reports on gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./reports/smoke
destination_dir: reports/smoke