-
-
Notifications
You must be signed in to change notification settings - Fork 79
73 lines (67 loc) · 2.36 KB
/
ccpp.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
name: FVWM3 CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
container:
image: ${{ matrix.os == 'alpine' && 'fvwmorg/fvwm3-build-alpine:latest' || 'fvwmorg/fvwm3-build:latest' }}
env:
GO111MODULE: "on"
strategy:
matrix:
os: [ubuntu-latest, alpine]
build-system: [autotools, meson]
compiler: [gcc, clang]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set git safe directory
run: git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Configure and Build
run: |
if [ "${{ matrix.build-system }}" = "autotools" ]; then
if [ "${{ matrix.compiler }}" = "gcc" ]; then
export CFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
else
export CC_LD=lld
fi
export CC=${{ matrix.compiler }}
./autogen.sh && ./configure --enable-mandoc --enable-golang && make -j
fi
if [ "${{ matrix.build-system }}" = "meson" ]; then
if [ "${{ matrix.compiler }}" = "gcc" ]; then
export CFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
else
export CC_LD=lld
fi
export CC=${{ matrix.compiler }}
meson setup builddir -Dhtmldoc=true -Dmandoc=true && ninja -C builddir
fi
notification:
runs-on: ubuntu-20.04
name: notifications
steps:
- name: irc pull request
uses: Gottox/[email protected]
if: github.event_name == 'pull_request'
with:
server: irc.libera.chat
notice: false
channel: "#fvwm"
nickname: fvwm3-gh-pr
message: "PR: [${{ github.event.pull_request.number }}]: ${{ github.event.pull_request.title }} -- [${{ github.event.pull_request.user.login }}]"
- name: irc tag created
uses: Gottox/[email protected]
if: github.event_name == 'create' && github.event.ref_type == 'tag'
with:
server: irc.libera.chat
notice: false
channel: "#fvwm"
nickname: fvwm-gh
message: ${{ github.actor }} tagged ${{ github.repository }} ${{ github.event.ref }}