Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
19e92db
Fix minor warnings when running autogen.sh/autoreconf
rawr51919 Jun 2, 2020
b8fe974
Fixing extra warnings, as well as having the autogen.sh autogenerate …
rawr51919 Jun 2, 2020
20b1446
Minor fix to the autogen.sh directory creation.
rawr51919 Jun 2, 2020
c925752
Fix Makefile.am so the file extensions are proper again
rawr51919 Aug 12, 2023
9fb0b1c
fix potential bug concerning .html, .1, and .3 files
rawr51919 Apr 18, 2024
0076e19
add automatic build workflow
rawr51919 Aug 16, 2025
9adc764
this repository uses the older 'master' style for main branch
rawr51919 Aug 16, 2025
134cc91
add autogen.sh step on all platforms before the configure and compile
rawr51919 Aug 16, 2025
f71caa1
Ensure the chmods are properly structured
rawr51919 Aug 16, 2025
f8d7783
run autogen BEFORE trying to chmod the configure script
rawr51919 Aug 16, 2025
e33851e
Update configure.ac and add ALSA dep to workflow
rawr51919 Aug 16, 2025
3a2a86a
fix C99 support in configure.ac
rawr51919 Aug 16, 2025
4b0d954
add the optional tools for autoreconf
rawr51919 Aug 16, 2025
9a8589d
add docs and gettext to workflow
rawr51919 Aug 16, 2025
7665c78
ensure we can USE the docs stuff
rawr51919 Aug 16, 2025
487bb45
ensure a2x is loaded from correct package
rawr51919 Aug 16, 2025
dad6dcd
create the directories if missing, ensure all packages are utilized
rawr51919 Aug 16, 2025
d3bf8d3
ensure tha
rawr51919 Aug 16, 2025
47f3cd4
Ensure po is created correctly
rawr51919 Aug 16, 2025
1c5b0e6
force our way through the weird errors and compile the whole thing
rawr51919 Aug 16, 2025
8d9a40b
fixing invalid escape sequences in the docs and the POTFILES error
rawr51919 Aug 16, 2025
bf9e6d0
can't do multiple target patterns there
rawr51919 Aug 16, 2025
ace9535
asciidoc.conf was the one with the bad escape sequence
rawr51919 Aug 16, 2025
fb64845
a few compilation fixes
rawr51919 Aug 16, 2025
d9be220
convert makefile.am to spaces to assist with github actions workflow …
rawr51919 Aug 16, 2025
a2c780b
ensure makefile.am uses tabs not spaces
rawr51919 Aug 16, 2025
53f70fd
normalize the line endings and tabs in the build workflow
rawr51919 Aug 16, 2025
cc8a939
create POTFILES a different way
rawr51919 Aug 16, 2025
7a3ab58
don't use Makefile.in as the makefile
rawr51919 Aug 16, 2025
bafc621
POTFILES never had any problems this way
rawr51919 Aug 16, 2025
ee97a22
Add the missing docs build targets
rawr51919 Aug 16, 2025
2c83348
swap alsa in favor of portaudio
rawr51919 Aug 16, 2025
1c3254d
cross-platform alsaplay.cpp
rawr51919 Aug 16, 2025
940cc5a
fix conditional
rawr51919 Aug 16, 2025
c486652
rewire the ALSA/PortAudio detection
rawr51919 Aug 16, 2025
7f7d3d0
ensure the new ALSA/PORTAUDIO conditional works correctly
rawr51919 Aug 16, 2025
6361cf0
ensure github actions runner doesn't hang
rawr51919 Aug 16, 2025
64644dd
guard against infinite = yes spam
rawr51919 Aug 16, 2025
920e5a2
Truly guard against infinite = yes spam
rawr51919 Aug 16, 2025
542e65b
add config.h added by configure to the alsa/portaudio code
rawr51919 Aug 16, 2025
dbefd40
tweaks to cross-compiling and macos to ensure portaudio is triggered …
rawr51919 Aug 16, 2025
c8b6e03
add the xml parser on macos and fix xmllint on the other jobs
rawr51919 Aug 16, 2025
6897f3e
add cpan dependency on macos and ensure portaudio is installed for cr…
rawr51919 Aug 16, 2025
35cfb90
properly install the XML parser and ensure all build targets build co…
rawr51919 Aug 16, 2025
0ba097a
ensure libxml2 is up-to-date with the other build targets on macOS
rawr51919 Aug 16, 2025
e17bea7
skip docs on all but one build to ensure builds pass
rawr51919 Aug 16, 2025
09257df
correctly disable documentation for all other than the first builder
rawr51919 Aug 16, 2025
3deb915
ensure alsa and portaudio checks work everywhere
rawr51919 Aug 16, 2025
9f5456e
can't build with more than one audio library
rawr51919 Aug 16, 2025
e93bfe5
ensure the ALSA/PortAudio filtering logic works correctly
rawr51919 Aug 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

[*]
indent_style = tab
indent_size = 2
end_of_line = crlf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
278 changes: 278 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,278 @@
name: Build and Release audiofile

on:
push:
branches:
- master

workflow_dispatch:
inputs:
release_type:
description: 'Set to "main" for full release; else pre-release'
required: false
default: ''

permissions:
contents: write

jobs:
build-linux-alsa:
name: Build Linux with ALSA
runs-on: ubuntu-latest
outputs:
linux-path: ./release/audiofile
steps:
- uses: actions/checkout@v5

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential autoconf automake autopoint libtool pkg-config \
gettext intltool gtk-doc-tools \
asciidoc docbook-xml docbook-xsl \
libxml2-utils libasound2-dev

- name: Generate configure & Build
run: |
chmod +x ./autogen.sh
./autogen.sh
chmod +x ./configure
./configure
make -j$(nproc)

- name: Strip audiofile binary only
run: strip ./audiofile || true

- name: Upload Linux build with ALSA artifact
uses: actions/upload-artifact@v4
with:
name: audiofile-linux-alsa
path: ./audiofile

- name: Upload Documentation artifact
uses: actions/upload-artifact@v4
with:
name: audiofile-docs
path: ./docs/_build

build-linux-portaudio:
name: Build Linux with PortAudio
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential autoconf automake autopoint libtool pkg-config \
gettext intltool gtk-doc-tools \
asciidoc docbook-xml docbook-xsl \
libxml2-utils portaudio19-dev

- name: Generate configure & Build audiofile
run: |
chmod +x ./autogen.sh
./autogen.sh
chmod +x ./configure
./configure --disable-docs
make -j$(nproc)

- name: Strip audiofile binary only
run: strip ./audiofile || true

- name: Upload Linux build with PortAudio artifact
uses: actions/upload-artifact@v4
with:
name: audiofile-linux-portaudio
path: ./audiofile

build-windows-x64:
name: Cross-build Windows x64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Install MinGW-w64 and autotools
run: |
sudo apt-get update
sudo apt-get install -y \
gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64 \
make binutils-mingw-w64 automake autoconf autopoint libtool pkg-config \
gettext intltool gtk-doc-tools asciidoc docbook-xml docbook-xsl libxml2-utils

- name: Build PortAudio for Windows x64
run: |
git clone https://github.com/PortAudio/portaudio.git
cd portaudio
./configure --host=x86_64-w64-mingw32 --disable-shared --prefix=$(pwd)/build
make
make install
cd ..

- name: Generate configure & Build audiofile
run: |
chmod +x ./autogen.sh
./autogen.sh
chmod +x ./configure
./configure CC=x86_64-w64-mingw32-gcc \
CXX=x86_64-w64-mingw32-g++ \
CPPFLAGS="-I$(pwd)/portaudio/build/include" \
LDFLAGS="-L$(pwd)/portaudio/build/lib" \
PKG_CONFIG_LIBDIR=$(pwd)/portaudio/build/lib/pkgconfig \
--host=x86_64-w64-mingw32 --disable-docs
make -j$(nproc)

- name: Strip audiofile.exe only
run: x86_64-w64-mingw32-strip ./audiofile.exe || true

- name: Upload Windows x64 artifact
uses: actions/upload-artifact@v4
with:
name: audiofile-windows-x64
path: ./audiofile.exe

build-windows-x86:
name: Cross-build Windows x86
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- name: Install MinGW-w64 and autotools
run: |
sudo apt-get update
sudo apt-get install -y \
gcc-mingw-w64-i686 g++-mingw-w64-i686 \
make binutils-mingw-w64 automake autoconf autopoint libtool pkg-config \
gettext intltool gtk-doc-tools asciidoc docbook-xml docbook-xsl libxml2-utils

- name: Build PortAudio for Windows x86
run: |
git clone https://github.com/PortAudio/portaudio.git
cd portaudio
./configure --host=i686-w64-mingw32 --disable-shared --prefix=$(pwd)/build
make
make install
cd ..

- name: Generate configure & Build audiofile
run: |
chmod +x ./autogen.sh
./autogen.sh
chmod +x ./configure
./configure CC=i686-w64-mingw32-gcc \
CXX=i686-w64-mingw32-g++ \
CPPFLAGS="-I$(pwd)/portaudio/build/include" \
LDFLAGS="-L$(pwd)/portaudio/build/lib" \
PKG_CONFIG_LIBDIR=$(pwd)/portaudio/build/lib/pkgconfig \
--host=i686-w64-mingw32 --disable-docs
make -j$(nproc)

- name: Strip audiofile.exe only
run: i686-w64-mingw32-strip ./audiofile.exe || true

- name: Upload Windows x86 artifact
uses: actions/upload-artifact@v4
with:
name: audiofile-windows-x86
path: ./audiofile.exe

build-macos:
name: Build macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v5

- name: Install dependencies
shell: bash
run: |
brew install pkg-config automake libtool autoconf gettext intltool gtk-doc asciidoc docbook-xsl portaudio cpanminus libxml2
echo "export PATH=$(brew --prefix libxml2)/bin:$PATH" >> $GITHUB_PATH
echo "export PKG_CONFIG_PATH=$(brew --prefix libxml2)/lib/pkgconfig" >> $GITHUB_ENV
echo "export LDFLAGS=-L$(brew --prefix libxml2)/lib" >> $GITHUB_ENV
echo "export CPPFLAGS=-I$(brew --prefix libxml2)/include" >> $GITHUB_ENV

- name: Install XML parser
run: cpan XML::Parser

- name: Generate configure & Build
run: |
export PERL_BAD_REGEX=0
chmod +x ./autogen.sh
./autogen.sh
chmod +x ./configure
./configure --disable-docs
make -j$(sysctl -n hw.ncpu)

- name: Strip audiofile binary only
run: strip ./audiofile || true

- name: Upload macOS artifact
uses: actions/upload-artifact@v4
with:
name: audiofile-macos
path: ./audiofile

release:
name: Create GitHub Release
runs-on: ubuntu-latest
needs:
- build-linux-alsa
- build-linux-portaudio
- build-windows-x64
- build-windows-x86
- build-macos
steps:
- uses: actions/checkout@v5

- name: Download Linux ALSA artifact
uses: actions/download-artifact@v5
with:
name: audiofile-linux-alsa
path: release/linux-alsa

- name: Download Linux PortAudio artifact
uses: actions/download-artifact@v5
with:
name: audiofile-linux-portaudio
path: release/linux-portaudio

- name: Download Windows x64 artifact
uses: actions/download-artifact@v5
with:
name: audiofile-windows-x64
path: release/windows-x64

- name: Download Windows x86 artifact
uses: actions/download-artifact@v5
with:
name: audiofile-windows-x86
path: release/windows-x86

- name: Download macOS artifact
uses: actions/download-artifact@v5
with:
name: audiofile-macos
path: release/macos

- name: Download Documentation artifact
uses: actions/download-artifact@v5
with:
name: audiofile-docs
path: release/docs

- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: build-${{ github.run_number }}
prerelease: ${{ github.event.inputs.release_type != 'main' }}
files: |
release/linux-alsa/audiofile
release/linux-portaudio/audiofile
release/windows-x64/audiofile.exe
release/windows-x86/audiofile.exe
release/macos/audiofile
release/docs/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,12 @@ compile
config.cache
config.guess
config.h
config.h.in
config.h.in*
config.log
config.status
config.sub
configure
config.rpath
configure*
depcomp
install-sh
intl
Expand All @@ -41,3 +42,5 @@ stamp-h.in
stamp-h1
test-driver
version.h
m4*
po
4 changes: 3 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Process this file with automake to produce Makefile.in

SUBDIRS = gtest libaudiofile sfcommands test examples docs
SUBDIRS = gtest libaudiofile sfcommands test examples docs po

EXTRA_DIST = \
ACKNOWLEDGEMENTS \
Expand All @@ -15,6 +15,8 @@ EXTRA_DIST = \

pkgconfig_DATA = audiofile.pc

# ACLOCAL_AMFLAGS = -I m4

dist-hook: audiofile.spec
cp audiofile.spec $(distdir)

Expand Down
13 changes: 9 additions & 4 deletions autogen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,17 @@ if test -z $AUTORECONF; then
exit 1
fi

# Ensure POTFILES.in doesn't already exist before creating a blank one
if [ ! -f "$srcdir/po/POTFILES.in" ]; then
mkdir -p "$srcdir/po"
touch "$srcdir/po/POTFILES.in"
fi

rootme=`pwd`
cd $srcdir
autoreconf --install --verbose || exit $?
cd $rootme
autoreconf --install --force --verbose || exit $?
cd "$rootme"

$srcdir/configure "$@"

echo
echo "Now type 'make' to compile libaudiofile."
echo "\nNow type 'make' to compile libaudiofile."
Loading