forked from K5PTB/fldigi
-
Notifications
You must be signed in to change notification settings - Fork 0
131 lines (115 loc) · 4.39 KB
/
Copy pathbuild.yml
File metadata and controls
131 lines (115 loc) · 4.39 KB
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
name: Build (Linux + macOS)
# Compile checks on the platforms users build from source on. These are BUILD
# CHECKS, not releases: the README deliberately ships no prebuilt Linux binary,
# and an unsigned macOS build is not something to hand a stranger. The point is
# to catch a break in the PR that causes it rather than in a user's bug report.
#
# The Windows portable zip -- the one artifact users actually download -- is
# built by windows-portable.yml.
on:
push:
branches: [master]
pull_request:
workflow_dispatch:
jobs:
linux:
name: Linux (Ubuntu, FLTK ${{ matrix.fltk }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# ubuntu-latest carries FLTK 1.3 only. BUILDING.md lists 1.3 as
# "should work, not independently verified" -- so this job is the
# verification, and it runs on every push for free.
fltk: ["1.3"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
set -euo pipefail
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential autoconf automake libtool pkg-config \
gettext autopoint \
libfltk${{ matrix.fltk }}-dev \
libsamplerate0-dev libsndfile1-dev libpng-dev \
portaudio19-dev libpulse-dev libasound2-dev \
libhamlib-dev libxft-dev libxinerama-dev libudev-dev
echo "fltk-config: $(fltk-config --version)"
- name: Configure
run: |
set -euo pipefail
autoreconf -vfi
./configure
- name: Build
run: make -C src -j"$(nproc)"
- name: Verify the binary
run: |
set -euo pipefail
test -x src/fldigi
./src/fldigi --version
echo "TCI present: $(strings -a src/fldigi | grep -c '^tci_')"
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: fldigi-linux-x86_64-fltk${{ matrix.fltk }}
path: src/fldigi
if-no-files-found: error
retention-days: 14
macos:
name: macOS (${{ matrix.arch }})
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- runner: macos-latest
arch: arm64
- runner: macos-15-intel
arch: x86_64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install dependencies
run: |
set -euo pipefail
brew install fltk libsamplerate libsndfile portaudio \
pkg-config autoconf automake libtool gettext
echo "fltk-config: $("$(brew --prefix)/bin/fltk-config" --version)"
- name: Configure
run: |
set -euo pipefail
# gettext's autopoint is keg-only; autoreconf needs it on PATH.
export PATH="$(brew --prefix gettext)/bin:$PATH"
autoreconf -vfi
# Both lines are load-bearing on macOS and come straight from
# BUILDING.md: libsndfile is keg-only so its .pc file is not on the
# default search path, and FLTK_CONFIG must point at Homebrew's
# fltk-config rather than whatever configure would guess.
# LDFLAGS is required on Apple Silicon and NOT optional: FLTK 1.4.5's
# fltk-config emits -ljpeg, and Homebrew's /opt/homebrew/lib is not a
# default linker search path on arm64 (/usr/local/lib is, on Intel) --
# so the link dies with "ld: library 'jpeg' not found" on arm64 while
# Intel succeeds. BUILDING.md says the commands are identical on both
# architectures; on this point they are not.
./configure \
PKG_CONFIG_PATH="$(brew --prefix)/lib/pkgconfig:$(brew --prefix libsndfile)/lib/pkgconfig" \
FLTK_CONFIG="$(brew --prefix)/bin/fltk-config" \
LDFLAGS="-L$(brew --prefix)/lib"
- name: Build
run: make -C src -j"$(sysctl -n hw.ncpu)"
- name: Verify the binary
run: |
set -euo pipefail
test -x src/fldigi
./src/fldigi --version
file src/fldigi
echo "TCI present: $(strings -a src/fldigi | grep -c '^tci_')"
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: fldigi-macos-${{ matrix.arch }}
path: src/fldigi
if-no-files-found: error
retention-days: 14