iox-#2330 add notify systemd #10
Workflow file for this run
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: Build for systemd | |
on: | |
push: | |
branches: [ main , iox-*] | |
pull_request: | |
branches: [ main, release*, iox-* ] | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: | |
image: jrei/systemd-ubuntu:18.04 | |
options: --privileged --volume /sys/fs/cgroup:/sys/fs/cgroup:ro | |
steps: | |
- name: Update | |
uses: apt update | |
- name: Install depends | |
run: apt install -y gcc g++ cmake libacl1-dev libncurses5-dev pkg-config libsystemd-dev | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Cmake cache | |
run: cmake -Bbuild -Hiceoryx_meta -DBUILD_SHARED_LIBS=ON -DUSE_SYSTEMD=ON | |
- name: build | |
run: cmake --build build -j 16 | |
- name: Install | |
run: cmake --build build --target install | |
- name: Ldconfig run | |
run: ldconfig | |
- name: Create unit file | |
run: echo -e "[Unit]\nDescription=Test application roudi\n\n[Service]\nType=notify\nUser=roma\nRestartSec=10\nRestart=always\nExecStart=/usr/local/bin/iox-roudi\nTimeoutStartSec=10\nWatchdogSec=5\n\n[Install]\nWantedBy=multi-user.target" > /etc/systemd/system/test_iox.service | |
- name: Show unit | |
run: cat /etc/systemd/system/test_iox.service | |
- name: Daemon reload | |
run: systemctl daemon-reload | |
- name: Start roudi | |
run: systemctl start test_iox | |
- name: Check status | |
run: systemctl status test_iox || true | |
- name: Stop roudi | |
run: systemctl stop test_iox |