-
Notifications
You must be signed in to change notification settings - Fork 392
45 lines (42 loc) · 1.5 KB
/
build_systemd.yaml
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
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