-
Notifications
You must be signed in to change notification settings - Fork 1
137 lines (117 loc) · 4.44 KB
/
build.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
---
name: CPP CI
on:
pull_request:
concurrency:
# Cancel any CI/CD workflow currently in progress for the same PR.
# Allow running concurrently with any other commits.
group: build-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
build_ubuntu:
strategy:
matrix:
configurations: [Debug, Release]
runs-on: ubuntu-20.04
env:
# Configuration type to build. For documentation on how build matrices work, see
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: ${{matrix.configurations}}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: 'false'
paths_ignore: '["**.md"]'
- uses: actions/checkout@v4
if: steps.skip_check.outputs.should_skip != 'true'
with:
submodules: 'recursive'
- name: Build
if: steps.skip_check.outputs.should_skip != 'true'
run: |
mkdir build
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}}
cmake --build build -j $(nproc)
- name: Run unit tests
if: steps.skip_check.outputs.should_skip != 'true'
working-directory: ./build/test
run: ./tests -d yes
- name: Upload rst2rfcxml binary
if: steps.skip_check.outputs.should_skip != 'true'
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: Ubuntu ${{matrix.configurations}} rst2rfcxml
path: ${{github.workspace}}/build/rst2rfcxml/rst2rfcxml
retention-days: 5
build_windows:
strategy:
matrix:
configurations: [Debug, Release]
runs-on: windows-latest
env:
# Configuration type to build. For documentation on how build matrices work, see
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: ${{matrix.configurations}}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: 'false'
paths_ignore: '["**.md"]'
- uses: actions/checkout@v4
if: steps.skip_check.outputs.should_skip != 'true'
with:
submodules: 'recursive'
- name: Build
if: steps.skip_check.outputs.should_skip != 'true'
run: |
mkdir build
cmake -B build
cmake --build build -j $(nproc) --config ${{env.BUILD_CONFIGURATION}}
- name: Run unit tests
if: steps.skip_check.outputs.should_skip != 'true'
run: ./build/test/${{env.BUILD_CONFIGURATION}}/tests.exe -d yes
- name: Upload rst2rfcxml binary
if: steps.skip_check.outputs.should_skip != 'true'
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: Windows ${{matrix.configurations}} rst2rfcxml.exe
path: ${{github.workspace}}/build/rst2rfcxml/${{env.BUILD_CONFIGURATION}}/rst2rfcxml.exe
retention-days: 5
build_macos:
strategy:
matrix:
configurations: [Debug, Release]
runs-on: macos-14
env:
# Configuration type to build. For documentation on how build matrices work, see
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: ${{matrix.configurations}}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5
with:
cancel_others: 'false'
paths_ignore: '["**.md"]'
- uses: actions/checkout@v4
if: steps.skip_check.outputs.should_skip != 'true'
with:
submodules: 'recursive'
- name: Build
if: steps.skip_check.outputs.should_skip != 'true'
run: |
mkdir build
cmake -B build -DCMAKE_BUILD_TYPE=${{env.BUILD_CONFIGURATION}}
cmake --build build -j $(nproc)
- name: Run unit tests
if: steps.skip_check.outputs.should_skip != 'true'
working-directory: ./build/test
run: ./tests -d yes
- name: Upload rst2rfcxml binary
if: steps.skip_check.outputs.should_skip != 'true'
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882
with:
name: MacOS ${{matrix.configurations}} rst2rfcxml
path: ${{github.workspace}}/build/rst2rfcxml/rst2rfcxml
retention-days: 5