forked from COVESA/capicxx-dbus-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
146 lines (119 loc) · 5 KB
/
makefile.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
138
139
140
141
142
143
144
145
146
name: C/C++ CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build_on_ubuntu_22_04:
runs-on: [ubuntu-22.04]
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Checkout capicxx-core-runtime"
uses: actions/checkout@v4
with:
repository: COVESA/capicxx-core-runtime
path: "capicxx-core-runtime"
- name: "Install dbus"
run: |
wget http://dbus.freedesktop.org/releases/dbus/dbus-1.13.6.tar.gz
tar -xzf dbus-1.13.6.tar.gz
for patch in src/dbus-patches/*.patch
do
patch -d dbus-1.13.6 -Np1 -i "$PWD/$patch" || continue
done
cmake -B build-dbus/libdbus -D DBUS_BUILD_TESTS=N -D CMAKE_INSTALL_PREFIX=install -S dbus-1.13.6/cmake
cmake --build build-dbus/libdbus
cmake --install build-dbus/libdbus --strip
- name: "Checkout googletest"
uses: actions/checkout@v4
with:
repository: google/googletest
ref: v1.12.0
path: "googletest"
- name: "Build capicxx-core-runtime"
run: |
cmake -S capicxx-core-runtime -B build-core-runtime -D CMAKE_INSTALL_PREFIX=install
cmake --build build-core-runtime --target install
- name: "Build capicxx-dbus-runtime"
run: |
cmake -S . -B build-dbus-runtime -D GTEST_ROOT=${{ runner.workspace }}/capicxx-dbus-runtime/googletest -D CMAKE_PREFIX_PATH=install -D CMAKE_INSTALL_PREFIX=install
cmake --build build-dbus-runtime --target build_tests
cmake --install build-dbus-runtime --strip
- name: "Run tests"
run: |
ls -l ${{ github.workspace }}/install/lib
export LD_LIBRARY_PATH=${{ github.workspace }}/install/lib
export COMMONAPI_CONFIG=${{ github.workspace }}/src/test/commonapi-dbus.ini
env -C build-dbus-runtime ctest -V
build_on_windows_latest:
runs-on: windows-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Checkout capicxx-core-runtime"
uses: actions/checkout@v4
with:
repository: COVESA/capicxx-core-runtime
path: "capicxx-core-runtime"
- name: "Checkout googletest"
uses: actions/checkout@v4
with:
repository: google/googletest
ref: v1.12.0
path: "googletest"
- name: "Checkout expat"
uses: actions/checkout@v4
with:
repository: libexpat/libexpat
ref: R_2_2_9
path: "libexpat"
# - name: Windows - Install boost 1.83.0 with gcc and x86
# uses: MarkusJx/[email protected]
# id: windows-gcc-1_83-x86
# with:
# boost_version: 1.83.0
# platform: windows
# boost_install_dir: C:\runner
# toolset: msvc
# arch: x86
# cache: true
- name: "Build expat"
run: |
cmake -A x64 -B build-expat -D CMAKE_INSTALL_PREFIX=${{ runner.workspace }}\install -S ${{ runner.workspace }}\capicxx-dbus-runtime\libexpat\expat
cmake --build build-expat --config Release --target install
- name: "Install dbus"
run: |
curl -L -o dbus-1.13.6.tar.gz http://dbus.freedesktop.org/releases/dbus/dbus-1.13.6.tar.gz
tar -zxvf dbus-1.13.6.tar.gz
$dbus = "${{ runner.workspace }}\capicxx-dbus-runtime\dbus-1.13.6"
$patches = Get-ChildItem -Path src\dbus-patches -Filter "*.patch"
Write-Output "DBus Path: $dbus"
if (Test-Path $dbus) {
Write-Output "DBus directory exists."
} else {
Write-Output "Error: DBus directory does not exist."
exit 1
}
Write-Output "Patch Files:"
foreach ($patch in $patches) {
Write-Output $patch.FullName
}
foreach ($patch in $patches) {
& git -C $dbus apply --check --verbose --ignore-whitespace $patch.FullName
}
cmake -A x64 -B build-dbus\libdbus -D DBUS_BUILD_TESTS=N -D CMAKE_INSTALL_PREFIX=${{ runner.workspace }}\install -S ${{ runner.workspace }}\capicxx-dbus-runtime\dbus-1.13.6\cmake
cmake --build build-dbus\libdbus --config Release --target install
- name: List capi src
run: ls $env:GITHUB_WORKSPACE\src
- name: Verify dbus content
run: ls $env:GITHUB_WORKSPACE\dbus-1.13.6
- name: "Build capicxx-core-runtime"
run: |
cmake -S capicxx-core-runtime -B build-core-runtime -D BOOST_ROOT=C:\runner\boost -DCMAKE_INSTALL_PREFIX=${{ runner.workspace }}\install
cmake --build build-core-runtime --target install
- name: "Build capicxx-dbus-runtime"
run: |
cmake -B build-dbus-runtime -D GTEST_ROOT=${{ runner.workspace }}\capicxx-dbus-runtime\googletest -D CMAKE_PREFIX_PATH=${{ runner.workspace }}\install -D CMAKE_INSTALL_PREFIX=${{ runner.workspace }}\install
cmake --build build-dbus-runtime --target build_tests install