| 1 |
|
| 2 |
|
| 3 |
name: Gating |
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
on: |
| 8 |
push: |
| 9 |
branches: [ '*' ] |
| 10 |
pull_request: |
| 11 |
branches: [ main, maint-1.3 ] |
| 12 |
|
| 13 |
concurrency: |
| 14 |
group: ${{ github.workflow }}-${{ github.event.number || github.run_id }} |
| 15 |
cancel-in-progress: true |
| 16 |
|
| 17 |
|
| 18 |
jobs: |
| 19 |
|
| 20 |
build-ubuntu: |
| 21 |
|
| 22 |
name: Build, Test on Ubuntu Latest |
| 23 |
runs-on: ubuntu-latest |
| 24 |
|
| 25 |
|
| 26 |
steps: |
| 27 |
|
| 28 |
- uses: actions/checkout@v6 |
| 29 |
with: |
| 30 |
submodules: recursive |
| 31 |
|
| 32 |
|
| 33 |
- name: Install Deps |
| 34 |
run: | |
| 35 |
sudo apt-get update |
| 36 |
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 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 |
| 37 |
sudo apt-get -y remove rpm |
| 38 |
|
| 39 |
|
| 40 |
- name: Build |
| 41 |
working-directory: ./build |
| 42 |
run: | |
| 43 |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ../ |
| 44 |
make all |
| 45 |
|
| 46 |
- name: Test |
| 47 |
working-directory: ./build |
| 48 |
run: | |
| 49 |
export $(dbus-launch) |
| 50 |
ctest --output-on-failure |
| 51 |
|
| 52 |
build-fedora: |
| 53 |
name: Build, Test on Fedora Latest (Container) |
| 54 |
runs-on: ubuntu-latest |
| 55 |
container: |
| 56 |
image: fedora:latest |
| 57 |
steps: |
| 58 |
- name: Install Deps |
| 59 |
run: dnf install -y cmake git procps-ng dbus-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 |
| 60 |
- name: Checkout |
| 61 |
uses: actions/checkout@v6 |
| 62 |
with: |
| 63 |
submodules: recursive |
| 64 |
- name: Build |
| 65 |
working-directory: ./build |
| 66 |
run: | |
| 67 |
cmake -DCMAKE_COMPILE_WARNING_AS_ERROR=True -DCMAKE_BUILD_TYPE=RelWithDebInfo ../ |
| 68 |
make all |
| 69 |
- name: Test |
| 70 |
working-directory: ./build |
| 71 |
run: | |
| 72 |
export $(dbus-launch) |
| 73 |
ctest --output-on-failure |
| 74 |
|
| 75 |
build-fedora-nss: |
| 76 |
name: Build, Test on Fedora Rawhide (NSS) (Container) |
| 77 |
runs-on: ubuntu-latest |
| 78 |
container: |
| 79 |
image: fedora:rawhide |
| 80 |
steps: |
| 81 |
- name: Install Deps |
| 82 |
run: dnf install -y cmake git procps-ng dbus-devel libacl-devel libblkid-devel libcap-devel libcurl-devel nss-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 |
| 83 |
- name: Checkout |
| 84 |
uses: actions/checkout@v6 |
| 85 |
with: |
| 86 |
submodules: recursive |
| 87 |
- name: Build |
| 88 |
working-directory: ./build |
| 89 |
run: | |
| 90 |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_CRYPTO=nss ../ |
| 91 |
make all |
| 92 |
- name: Test |
| 93 |
working-directory: ./build |
| 94 |
run: | |
| 95 |
export $(dbus-launch) |
| 96 |
ctest --output-on-failure |
| 97 |
|
| 98 |
build-macos: |
| 99 |
|
| 100 |
name: Build, Test on macOS Latest |
| 101 |
runs-on: macos-latest |
| 102 |
|
| 103 |
|
| 104 |
steps: |
| 105 |
|
| 106 |
- uses: actions/checkout@v6 |
| 107 |
|
| 108 |
|
| 109 |
- name: Install Deps |
| 110 |
run: | |
| 111 |
# Unlink and re-link to prevent errors when GitHub Mac runner images |
| 112 |
# install Python outside of Brew: |
| 113 |
brew list -1 | grep python | while read formula; do brew unlink $formula; brew link --overwrite $formula; done |
| 114 |
brew update |
| 115 |
brew install doxygen |
| 116 |
brew install opendbx |
| 117 |
brew install pkg-config |
| 118 |
brew install popt |
| 119 |
brew install swig |
| 120 |
brew install libxmlsec1 |
| 121 |
brew install openssl |
| 122 |
brew install pcre2 |
| 123 |
|
| 124 |
|
| 125 |
- name: Build |
| 126 |
run: | |
| 127 |
cd $GITHUB_WORKSPACE/build |
| 128 |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_PROBES=False ../ |
| 129 |
make all |
| 130 |
|
| 131 |
- name: Test |
| 132 |
run: | |
| 133 |
cd $GITHUB_WORKSPACE/build |
| 134 |
echo "Tests are so broken for macOS :(" |