-
Notifications
You must be signed in to change notification settings - Fork 4
62 lines (52 loc) · 1.93 KB
/
build_and_test.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
name: Build And Test Linux Mac Windows
on:
push:
release:
types: [published]
jobs:
build-and-test:
timeout-minutes: 20
name: Build
runs-on: ${{matrix.workflow.os}}
strategy:
matrix:
workflow:
- os: ubuntu-24.04
name: "linux_fetchcontent"
- os: ubuntu-24.04
name: "linux_vcpkg"
- os: ubuntu-24.04
name: "linux_vcpkg_dtls_client_only"
- os: windows-2022
name: "windows_vcpkg_static"
- os: macos-12
name: mac_vcpkg_x86_64
- os: macos-12
name: mac_fetchcontent_universal
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- if: matrix.workflow.os == 'ubuntu-24.04'
name: Install Ninja
run: sudo apt-get update && sudo apt-get install -y ninja-build
- if: matrix.workflow.os == 'macos-12'
name: Install Ninja
run: brew install ninja
- name: Build
run: cmake --workflow --preset ${{ matrix.workflow.name }}
- if: matrix.workflow.os == 'windows-2022'
name: Test run
run: |
netsh advfirewall firewall add rule name="embedded_unit_test" dir=in action=allow program="${{ github.workspace }}\build\${{ matrix.workflow.name }}\install\bin\embedded_unit_test.exe" enable=yes
${{ github.workspace }}\build\${{ matrix.workflow.name }}\install\bin\embedded_unit_test.exe -l test_suite --detect_memory_leaks=0
- if: matrix.workflow.os != 'windows-2022'
name: Test run
run: ${{ github.workspace }}/build/${{ matrix.workflow.name }}/install/bin/embedded_unit_test -l test_suite --detect_memory_leaks=0
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts_${{ matrix.workflow.name }}
path: ${{ github.workspace }}/artifacts
if-no-files-found: warn