-
-
Notifications
You must be signed in to change notification settings - Fork 78
146 lines (132 loc) · 4.32 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: FVWM3 CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-linux:
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}
- if: matrix.build-system == 'autotools'
name: Prepare Build
run: ./autogen.sh
- name: Configure and Build
run: |
export CC=${{ matrix.compiler }}
if [ "${{ matrix.compiler }}" = "gcc" ]; then
export CFLAGS="-flto -Werror=odr -Werror=lto-type-mismatch -Werror=strict-aliasing"
else
export CC_LD=lld
fi
if [ "${{ matrix.build-system }}" = "autotools" ]; then
./configure --enable-mandoc --enable-golang && make -j
else
meson setup builddir -Dhtmldoc=true -Dmandoc=true && ninja -C builddir
fi
build-macOS-13:
runs-on: macos-13
strategy:
matrix:
build-system: [autotools, meson]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install dependencies
run: |
if [ "${{ matrix.build-system }}" = "autotools" ]; then
build_tools="autoconf automake"
else
build_tools="meson ninja"
fi
brew update
brew install asciidoctor fontconfig freetype go libevent libice libpng libx11 libxext libxft libxrandr libxrender libxt ${build_tools}
- if: matrix.build-system == 'autotools'
name: Prepare Build
run: ./autogen.sh
- name: Configure Build
run: |
if [ "${{ matrix.build-system }}" = "autotools" ]; then
./configure --enable-mandoc --enable-golang
else
meson setup builddir -Dhtmldoc=true -Dmandoc=true
fi
- name: Build fvwm3 for macOS-13 with ${{ matrix.build-system }}
run: |
if [ "${{ matrix.build-system }}" = "autotools" ]; then
make
else
ninja -C builddir
fi
build-FreeBSD-14:
runs-on: ubuntu-latest
strategy:
matrix:
build-system: [autotools, meson]
steps:
- uses: actions/checkout@v4
- name: FreeBSD VM build
id: test
uses: vmactions/freebsd-vm@v1
with:
release: "14.1"
usesh: true
prepare: |
set -x
if [ "${{ matrix.build-system }}" = "autotools" ]; then
build_tools="autoconf automake"
else
build_tools="meson ninja"
fi
pkg install -y ${build_tools} go rubygem-asciidoctor libevent libICE libX11 libXext libXft libXrandr libXrender libXt perl5 png pkgconf python3
run: |
set -x
pwd
freebsd-version
if [ "${{ matrix.build-system }}" = "autotools" ]; then
./autogen.sh
./configure CPPFLAGS='-I/usr/local/include' LDFLAGS='-L/usr/local/lib' --enable-mandoc --enable-golang
cat config.log
make
else
CFLAGS='-I/usr/local/include' LDFLAGS='-L/usr/local/lib' meson setup build
ninja -C build
fi
notification:
runs-on: ubuntu-20.04
name: notifications
steps:
- name: irc pull request
uses: Gottox/irc-message-action@v2.1.3
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/irc-message-action@v2.1.3
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 }}