Skip to content

Commit dd9ae3a

Browse files
author
lauris71
committed
Added .github/workflows
1 parent a7bbbd7 commit dd9ae3a

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
on: [push, pull_request]
3+
permissions:
4+
contents: read
5+
env:
6+
BUILD_NUMBER: ${{ github.run_number }}
7+
CMAKE_BUILD_PARALLEL_LEVEL: 4
8+
# Required dependencies (does not include packaging and optional dependencies)
9+
UBUNTU_DEPS: cmake libxml2-dev zlib1g-dev libssl-dev libflatbuffers-dev
10+
jobs:
11+
ubuntu:
12+
name: Build on Ubuntu ${{ matrix.container }}
13+
runs-on: ubuntu-latest
14+
container: ubuntu:${{ matrix.container }}
15+
strategy:
16+
matrix:
17+
container: ['22.04', '24.04', '24.10']
18+
env:
19+
DEBIAN_FRONTEND: noninteractive
20+
DEBFULLNAME: github-actions
21+
22+
steps:
23+
- name: Install dependencies
24+
run: apt update -qq && apt install --no-install-recommends -y lsb-release build-essential devscripts debhelper lintian pkg-config ${UBUNTU_DEPS} doxygen swig openjdk-17-jdk-headless libpython3-dev python3-setuptools libboost-test-dev
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
- name: Setup changelog
28+
run: |
29+
export VERSION=$(grep project CMakeLists.txt | egrep -o "([0-9]{1,}\.)+[0-9]{1,}")
30+
export VERSIONEX=${VERSION}.${BUILD_NUMBER}.$(lsb_release -rs)
31+
dch --distribution $(lsb_release -cs) -v ${VERSIONEX} "Release ${VERSIONEX}."
32+
- name: Build packages
33+
run: |
34+
JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64 dpkg-buildpackage -us -uc
35+
mv ../libcdoc*.* .
36+
- name: Lintian
37+
run: lintian *.deb;
38+
- name: Archive artifacts
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: ubuntu_${{ matrix.container }}
42+
path: libcdoc*.*

0 commit comments

Comments
 (0)