Skip to content

ci: Linux + macOS build checks #2

ci: Linux + macOS build checks

ci: Linux + macOS build checks #2

Workflow file for this run

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