zip #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: "Install dbus" | |
run: | | |
curl -O http://dbus.freedesktop.org/releases/dbus/dbus-1.13.6.tar.gz | |
file dbus-1.13.6.tar.gz | |
7z x dbus-1.13.6.tar.gz | |
- name: List directory contents | |
run: ls $env:GITHUB_WORKSPACE | |
- name: Verify googletest contents | |
run: ls $env:GITHUB_WORKSPACE/dbus |