Skip to content

Commit

Permalink
Fedora build (#441)
Browse files Browse the repository at this point in the history
* Fedora dependencies

* Basic building in github actions

* Removing vim-common dep from CI

* Adding CPack for RPM and Deb

* Fixed

* Upload RPMs

* Excludes not needed in Fedora 34

* ubuntu-latest

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Update build.yml

* Update CMakeLists.txt

* Update .github/workflows/build.yml

Co-authored-by: Raul Metsma <raul@metsma.ee>

* Update CMakeLists.txt

Co-authored-by: Raul Metsma <raul@metsma.ee>

Co-authored-by: Aidan Macdonald <aidan.plenert.macdonald@gmail.com>
Co-authored-by: Raul Metsma <raul@metsma.ee>
  • Loading branch information
3 people authored Nov 24, 2021
1 parent d7adf36 commit 076f6e5
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
34 changes: 34 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,40 @@ jobs:
with:
name: pkgs
path: macOS/libdigidocpp*.*
fedora:
name: Build on Fedora to ${{ matrix.container }}
runs-on: ubuntu-latest
container: ${{ matrix.container }}
strategy:
matrix:
container: ['fedora:33']
env:
MAKEFLAGS: -j3
steps:
- name: Checkout
uses: actions/checkout@v1
with:
submodules: recursive
- name: Install Build Deps
run: dnf groupinstall -y "Development Tools" "Development Libraries" fedora-packager
- name: Install Deps
run: |
dnf install -y \
cmake openssl-devel xerces-c-devel \
xml-security-c-devel zlib-devel vim-common \
https://www.codesynthesis.com/download/xsd/4.0/linux-gnu/x86_64/xsd-4.0.0-1.x86_64.rpm
- name: Build
run: |
mkdir build
cd build
cmake -DCMAKE_INSTALL_SYSCONFDIR=/etc ..
make
make package
- name: Archive artifacts
uses: actions/upload-artifact@v2
with:
name: rpms
path: build/libdigidocpp*.rpm
ubuntu:
name: Build on Ubuntu to ${{ matrix.container }}
runs-on: ubuntu-latest
Expand Down
9 changes: 9 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ set( BUILD_TOOLS YES CACHE BOOL "Build digidoc-tool" )
set( BUILD_SHARED_LIBS YES CACHE BOOL "Build library as SHARED or STATIC" )
set( SIGNCERT "" CACHE STRING "Common name of certificate to used sign binaries, empty skip signing" )
set( CROSSSIGNCERT "" CACHE STRING "Common name of certificate to used cross sign binaries, empty skip signing" )
set(CPACK_PACKAGE_VERSION ${VERSION})
set(CPACK_GENERATOR "RPM" "DEB")
set(CPACK_PACKAGE_NAME "libdigidocpp")
set(CPACK_PACKAGE_RELEASE 1)
set(CPACK_PACKAGE_CONTACT "Andrus Randveer")
set(CPACK_PACKAGE_VENDOR "RIA")
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/")
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_PACKAGE_RELEASE}.${CMAKE_SYSTEM_PROCESSOR}")
include(CPack)
if( APPLE )
set( FRAMEWORK YES CACHE BOOL "Build library as Mac OS X Framework" )
set( USE_KEYCHAIN YES CACHE BOOL "Use keychain to store PKCS12 access certificate" )
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@
[![Coverity Scan Build Status](https://scan.coverity.com/projects/727/badge.svg)](https://scan.coverity.com/projects/727)
[![LGTM alerts](https://img.shields.io/lgtm/alerts/g/open-eid/libdigidocpp.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/open-eid/libdigidocpp/alerts/)

### Ubuntu
### Ubuntu, Fedora

1. Install dependencies

# Ubuntu
sudo apt install cmake libxml-security-c-dev xsdcxx libssl-dev zlib1g-dev
# Fedora
sudo dnf install cmake openssl-devel xerces-c-devel xml-security-c-devel zlib-devel vim-common https://www.codesynthesis.com/download/xsd/4.0/linux-gnu/x86_64/xsd-4.0.0-1.x86_64.rpm

* doxygen - Optional, for API documentation
* libboost-test-dev - Optional, for unittests
Expand Down

0 comments on commit 076f6e5

Please sign in to comment.