Skip to content

Commit

Permalink
Use PCRE2 library in CI
Browse files Browse the repository at this point in the history
Make use of the PCRE2 library (in Fedora CI + PackIt and Ubuntu IC).
  • Loading branch information
evgenyz committed Sep 4, 2023
1 parent 5a8c2ba commit 33140c3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ jobs:
- name: Install Deps
run: |
sudo apt-get update
sudo apt-get -y install lcov swig xsltproc rpm-common lua5.3 libyaml-dev libapt-pkg-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
sudo apt-get -y install lcov swig xsltproc rpm-common lua5.3 libpcre2-dev libyaml-dev libapt-pkg-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
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 ../
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PCRE2=True ../
make all
- name: Test
Expand All @@ -57,15 +57,15 @@ jobs:
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 pcre-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 apt-devel
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 apt-devel
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Build
working-directory: ./build
run: |
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ../
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PCRE2=True ../
make all
- name: Test
working-directory: ./build
Expand Down Expand Up @@ -97,13 +97,13 @@ jobs:
brew install swig
brew install libxmlsec1
brew install openssl
brew install pcre
brew install pcre2
# Runs a set of commands using the runners shell
- name: Build
run: |
cd $GITHUB_WORKSPACE/build
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_PROBES=false ../
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DWITH_PCRE2=True -DENABLE_PROBES=False ../
make all
- name: Test
Expand Down
7 changes: 7 additions & 0 deletions openscap.spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,11 @@ BuildRequires: apt-devel
%endif
BuildRequires: rpm-devel
BuildRequires: libgcrypt-devel
%if 0%{?fedora}
BuildRequires: pcre2-devel
%else
BuildRequires: pcre-devel
%endif
BuildRequires: libacl-devel
BuildRequires: libselinux-devel
BuildRequires: libcap-devel
Expand Down Expand Up @@ -136,6 +140,9 @@ Tool for scanning Atomic containers.
# gconf is a legacy system not used any more, and it blocks testing of oscap-anaconda-addon
# as gconf is no longer part of the installation medium
%cmake \
%if 0%{?fedora}
-DWITH_PCRE2=ON \
%endif
-DENABLE_PERL=OFF \
-DENABLE_DOCS=ON \
-DOPENSCAP_PROBE_UNIX_GCONF=OFF \
Expand Down

0 comments on commit 33140c3

Please sign in to comment.