-
Notifications
You must be signed in to change notification settings - Fork 6
87 lines (74 loc) · 2.25 KB
/
build-package.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
---
name: Build install package
on:
release:
types:
- published
workflow_dispatch:
defaults:
run:
shell: bash
env:
LC_ALL: C.UTF-8
jobs:
build-deb-gcc:
name: Build (${{ matrix.os }}, ${{ matrix.cc }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
- ubuntu-24.04
cc:
- gcc
# # Disable Clang (enable required: matrix.include.cc: clang)
# - clang
include:
- cc: gcc
LDFLAGS: ''
CFLAGS: '-O2'
# # Disable Clang (enable required: matrix.cc.clang)
# - cc: clang
# # # Disable ASan, incompatible w/ Valgrind test
# # # https://github.com/google/sanitizers/issues/856#issuecomment-924966052
# # LDFLAGS: '-fsanitize=address -fno-omit-frame-pointer'
# # CFLAGS: '-Og -fsanitize=address -fno-omit-frame-pointer'
# LDFLAGS: ''
# CFLAGS: '-O2'
env:
CC: ${{ matrix.cc }}
LDFLAGS: ${{ matrix.LDFLAGS }}
CFLAGS: ${{ matrix.CFLAGS }}
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Fetch update package information
run: sudo apt-get update --assume-yes
- name: Install build-essential and tools
run: sudo apt-get install --assume-yes build-essential debhelper dpkg-dev valgrind clang
- name: Install package dependencies
run: sudo apt-get install --assume-yes libconfig-dev libconfig++-dev libhiredis-dev libjson-c-dev libpq-dev librdkafka-dev
- name: Run testsuite
run: make test
- name: Compile and build bianry
run: make
- name: Build package
run: make package-deb
- name: Upload package(s)
uses: actions/upload-artifact@v4
with:
name: Packages-${{ matrix.os }}
path: |
schaufel_*.buildinfo
schaufel_*.changes
schaufel_*.deb
- name: Release package(s)
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
schaufel_*.buildinfo
schaufel_*.changes
schaufel_*.deb