-
Notifications
You must be signed in to change notification settings - Fork 4
84 lines (72 loc) · 2.1 KB
/
build_linux.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
name: Linux
on:
push:
branches: [ master, '*-ci' ]
pull_request:
branches: [ master ]
workflow_dispatch:
schedule:
- cron: '0 0 * * 0'
jobs:
build_linux:
runs-on: ${{matrix.os}}
strategy:
matrix:
os: ["ubuntu-20.04", "ubuntu-22.04"]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up JDK 1.8
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 8
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install Conan v2
run: |
python -m pip install --upgrade pip
python -m pip install conan>=2.0
conan profile detect
- name: Build Zserio C++ tutorial
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
cmake --build .
- name: Test Zserio C++ tutorial
run: |
build/ZserioTutorialCpp write_joe
build/ZserioTutorialCpp read
build/ZserioTutorialCpp write_boss
build/ZserioTutorialCpp read
- name: Build Zserio C++ tutorial (sources regeneration)
run: |
cd build
rm -rd *
cmake .. -DCMAKE_BUILD_TYPE=Release -DREGENERATE_CPP_SOURCES=ON
cmake --build .
- name: Test Zserio C++ tutorial (sources regeneration)
run: |
build/ZserioTutorialCpp write_joe
build/ZserioTutorialCpp read
build/ZserioTutorialCpp write_boss
build/ZserioTutorialCpp read
- name: Build Zserio C++ tutorial for Conan users
run: |
conan build ./conan --build=missing --output=build_conan
- name: Test Zserio C++ tutorial for Conan users
run: |
build_conan/ZserioTutorialCpp write_joe
build_conan/ZserioTutorialCpp read
build_conan/ZserioTutorialCpp write_boss
build_conan/ZserioTutorialCpp read
- name: Archive Zserio C++ tutorial binary
uses: actions/upload-artifact@v3
with:
name: zserio-tutorial-cpp-${{matrix.os}}
path: build/ZserioTutorialCpp