-
Notifications
You must be signed in to change notification settings - Fork 1
98 lines (78 loc) · 2.42 KB
/
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
name: CI
on:
pull_request:
types: [review_requested]
workflow_dispatch:
inputs:
reason:
description: 'Reason/Run name'
required: true
default: 'Manual trigger'
run-name: ${{ inputs.reason || github.event.pull_request.title || github.event.head_commit.message || 'unexpected workflow trigger' }}
env:
SKIP_CI: false
jobs:
check:
runs-on: ubuntu-latest
outputs:
skip-ci: ${{ env.SKIP_CI }}
steps:
- id: name-check
name: Check PR name
run: |
if [[ "${{ github.event.pull_request.title }}" =~ ^[d|D][o|O][c|C]\/.*$|^[d|D][o|O][c|C][s|S]\/.*$|^[n|N][o|O]-[c|C][i|I]\/.*$ ]]; then
echo "Skipping CI for documentation-only PR"
echo "SKIP_CI=true" >> $GITHUB_ENV
exit 0
fi
WiFI-POC:
needs: check
if: ${{ needs.check.outputs.skip-ci == 'false' }}
runs-on: windows-latest
env:
BUILD_TYPE: Debug
steps:
- uses: actions/checkout@v3
- name: configure
working-directory: ./POCs/WiFi/Server/
run: cmake -B ./build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
working-directory: ./POCs/WiFi/Server/
run: cmake --build ./build --config ${{env.BUILD_TYPE}}
Master:
needs: check
if: ${{ needs.check.outputs.skip-ci == 'false' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cache/pip
~/.platformio/.cache
key: ${{ runner.os }}-pio
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install PlatformIO Core
run: pip install --upgrade platformio
- name: Test
working-directory: ./Source/Master/
run: platformio test --environment native -f unit -v
Server:
needs: check
if: ${{ needs.check.outputs.skip-ci == 'false' }}
runs-on: windows-latest
env:
BUILD_TYPE: Debug
steps:
- uses: actions/checkout@v3
- name: configure
working-directory: ./Source/Server/
run: cmake -B ./build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
working-directory: ./Source/Server/
run: cmake --build ./build --config ${{env.BUILD_TYPE}}
- name: Run all tests
working-directory: ./Source/Server/Build
run: ctest -j18 -C ${{env.BUILD_TYPE}} -T test --output-on-failure