-
Notifications
You must be signed in to change notification settings - Fork 63
97 lines (91 loc) · 2.86 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
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
name: tests
on:
push:
tags-ignore:
- 'v[0-9]+.[0-9]+.[0-9]+'
branches:
- master
- review/**
paths:
- 'include/**'
- 'CMakeLists.txt'
pull_request:
branches:
- master
paths:
- 'include/**'
- 'CMakeLists.txt'
jobs:
prep:
name: Notify about testing
runs-on: ubuntu-latest
steps:
- uses: inlife/actiord-action@v1
with:
url: ${{ secrets.ACTIORD_URL }}
discord_token: ${{ secrets.DISCORD_TOKEN }}
discord_channel: ${{ secrets.DISCORD_CHANNEL }}
icon: https://avatars1.githubusercontent.com/u/26773913?s=200&v=4
state: started
build-win:
name: Test Windows
runs-on: windows-latest
needs: [prep]
steps:
- uses: actions/checkout@v1
- name: Run cmake generator
run: cmake -B build -DENET_TEST=1
- name: Run Windows build
run: cmake --build build
- name: Run unit tests
run: cd build ; .\Debug\enet_test.exe
- name: Run unit tests with extra peers
run: cd build ; .\Debug\enet_test_extra_peers.exe
build-lin:
name: Test Linux
runs-on: ubuntu-latest
needs: [prep]
steps:
- uses: actions/checkout@v1
- name: Run cmake generator
run: cmake -B build -DENET_TEST=1
- name: Run build on Linux
run: cmake --build build
- name: Test build on Linux
run: build/enet_test
- name: Test build on Linux with extra peers
run: build/enet_test_extra_peers
build-mac:
name: Test macOS
runs-on: macOS-latest
needs: [prep]
steps:
- uses: actions/checkout@v1
- name: Run cmake generator
run: cmake -B build -DENET_TEST=1
- name: Run build on macOS
run: cmake --build build
- name: Test build on macOS
run: build/enet_test
- name: Test build on macOS with extra peers
run: build/enet_test_extra_peers
done:
name: Notify about status
runs-on: ubuntu-latest
needs: [build-mac, build-lin, build-win]
if: "always()"
steps:
- uses: inlife/actiord-action@v1
if: ${{ contains(needs.build-mac.result, 'success') && contains(needs.build-lin.result, 'success') && contains(needs.build-win.result, 'success') }}
with:
url: ${{ secrets.ACTIORD_URL }}
icon: https://avatars1.githubusercontent.com/u/26773913?s=200&v=4
state: succeeded
- uses: inlife/actiord-action@v1
if: ${{ !(contains(needs.build-mac.result, 'success') && contains(needs.build-lin.result, 'success') && contains(needs.build-win.result, 'success')) }}
with:
url: ${{ secrets.ACTIORD_URL }}
discord_token: ${{ secrets.DISCORD_TOKEN }}
discord_channel: ${{ secrets.DISCORD_CHANNEL }}
icon: https://avatars1.githubusercontent.com/u/26773913?s=200&v=4
state: failed