-
Notifications
You must be signed in to change notification settings - Fork 383
112 lines (97 loc) · 3.92 KB
/
build.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
# This is a basic workflow to help you get started with Actions
name: Gating
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ '*' ]
pull_request:
branches: [ main, maint-1.3 ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build-ubuntu:
# The type of runner that the job will run on
name: Build, Test on Ubuntus
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-latest]
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
submodules: recursive
# Runs a single command using the runners shell
- name: Install Deps
run: |
sudo apt-get update
sudo apt-get -y install lcov swig xsltproc rpm-common lua5.3 libpcre2-dev libyaml-dev libdbus-1-dev libdbus-glib-1-dev libcurl4-openssl-dev libgcrypt-dev libselinux1-dev libgconf2-dev libacl1-dev libblkid-dev libcap-dev libxml2-dev libxslt1-dev libxml-parser-perl libxml-xpath-perl libperl-dev librpm-dev librtmp-dev libxmlsec1-dev libxmlsec1-openssl python3-dbusmock python3-pytest
sudo apt-get -y remove rpm
# Runs a set of commands using the runners shell
- name: Build
working-directory: ./build
run: |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PCRE2=True ../
make all
- name: Test
working-directory: ./build
run: |
export $(dbus-launch)
ctest --output-on-failure
build-fedora:
name: Build, Test on Fedora Latest (Container)
runs-on: ubuntu-latest
container:
image: fedora:latest
steps:
- name: Install Deps
run: dnf install -y cmake git dbus-devel GConf2-devel libacl-devel libblkid-devel libcap-devel libcurl-devel libgcrypt-devel libselinux-devel libxml2-devel libxslt-devel libattr-devel make openldap-devel pcre2-devel perl-XML-Parser perl-XML-XPath perl-devel python3-devel python3-dbusmock rpm-devel swig bzip2-devel gcc-c++ libyaml-devel xmlsec1-devel xmlsec1-openssl-devel hostname bzip2 lua rpm-build which strace python3-pytest
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
working-directory: ./build
run: |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PCRE2=True ../
make all
- name: Test
working-directory: ./build
run: |
export $(dbus-launch)
ctest --output-on-failure
build-macos:
# The type of runner that the job will run on
name: Build, Test on MacOS X Latest
runs-on: macos-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: Install Deps
run: |
# Unlink and re-link to prevent errors when GitHub Mac runner images
# install Python outside of Brew:
brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done
brew update
brew install doxygen
brew install opendbx
brew install pkg-config
brew install popt
brew install swig
brew install libxmlsec1
brew install openssl
brew install pcre2
# Runs a set of commands using the runners shell
- name: Build
run: |
cd $GITHUB_WORKSPACE/build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PCRE2=True -DENABLE_PROBES=False ../
make all
- name: Test
run: |
cd $GITHUB_WORKSPACE/build
echo "Tests are so broken for MacOS :("