Skip to content

test/cases/charset: fix size mismatch #7

test/cases/charset: fix size mismatch

test/cases/charset: fix size mismatch #7

Workflow file for this run

name: Ubuntu
on:
push:
pull_request:
workflow_dispatch:
jobs:
test:
# TODO test more variants; we should be regularly testing
# - dynamic load / linked variants, for libraries
# - maybe others as well; possibly we can force-disable
# stuff like avx2 to be able to test MOAR variants
strategy:
fail-fast: false
matrix:
threads: [
{ flag: '--disable-threads', name: '' },
{ flag: '--enable-threads', name: '-threaded' },
]
asan: [
# We want two builds, one with asan on and the other with it off
{ flag: '', name: '' },
{ flag: '-fsanitize=address', name: '-asan' },
]
backend: [
{ name: 'sdl12', pkgs: 'libsdl1.2-dev', disable: 'sdl2' },
{ name: 'sdl2', pkgs: 'libsdl2-dev', disable: 'sdl12' },
]
# We want one build to link to the selected library...
link: [
{ name: 'linked', flag: true },
{ name: 'loaded', flag: false },
]
sys: [
# TODO add more hosts
{ host: 'ubuntu-22.04' },
{ host: 'ubuntu-24.04' },
]
exclude:
# Exclude runtime-loading of SDL 1.2 when running under asan.
# It only detects leak that happen at exit...
- asan: { flag: '-fsanitize=address', name: '-asan' }
backend: { name: 'sdl12', pkgs: 'libsdl1.2-dev', disable: 'sdl2' }
link: { name: 'loaded', flag: false }
concurrency:
group: ${{github.ref}}-${{github.workflow}}-${{matrix.sys.host}}${{matrix.threads.name}}${{matrix.asan.name}}-${{matrix.backend.name}}-${{matrix.link.name}}
cancel-in-progress: true
runs-on: ${{matrix.sys.host}}
steps:
- name: 'Install dependencies'
run: |
sudo apt-get update
sudo apt-get install --fix-missing libutf8proc-dev libjack-jackd2-dev build-essential automake autoconf autoconf-archive libxxf86vm-dev ${{matrix.backend.pkgs}} libasound2-dev libflac-dev git libtool zip wget
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'autoreconf -i'
run: autoreconf -i
- name: 'Build Schism'
env:
THREAD_FLAG: ${{ matrix.threads.flags }}
CFLAGS: '${{ matrix.asan.flag }} -g -O2'
LDFLAGS: '${{ matrix.asan.flag }}'
run: |
mkdir -p build
cd build
../configure --with-flac --with-alsa --with-jack --enable-tests --without-'${{ matrix.backend.disable }}' --with-'${{ matrix.backend.name }}' '${{ matrix.link.flag == true && format('--enable-{0}-linking', matrix.backend.name) || '' }}'
make
cd ..
- name: 'Run test suite'
run: |
# this should fail with an error code if any of the tests fail.
cd build
./schismtrackertest
cd ..
ubuntu:
# TODO for release variants, it would be nice to link against
# either a very old glibc (backwards compatibility is a fuck)
# OR we can static link against musl libc. or we could not
# care and just build an AppImage. Not sure, but either way
# it would be better than the ./run.sh hack --paper
runs-on: ubuntu-22.04
steps:
- name: 'Install dependencies'
run: |
sudo apt-get update
sudo apt-get remove libunwind-*
sudo apt-get install --fix-missing libutf8proc-dev libjack-jackd2-dev build-essential automake autoconf autoconf-archive libxxf86vm-dev libsdl2-dev libsdl1.2-dev libasound2-dev libflac-dev git libtool zip wget libbz2-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
- name: 'Checkout'
uses: actions/checkout@v4
- name: 'Get date of latest commit'
id: date
run: echo "date=$(git log -n 1 --date=short --format=format:%cd | sed 's/\(....\)-\(..\)-\(..\).*/\1\2\3/')" >> $GITHUB_OUTPUT
- name: 'autoreconf -i'
run: autoreconf -i
- name: 'Build Schism binaries'
run: |
mkdir -p build
cd build
../configure --with-flac --with-alsa --with-jack
make
cd ..
- name: 'Create package'
run: |
cd build
strip -S schismtracker
cd ..
cp build/schismtracker .
cp docs/configuration.md .
cp sys/posix/schismtracker.1 .
cp /usr/lib/x86_64-linux-gnu/libutf8proc.so.2 /usr/lib/x86_64-linux-gnu/libFLAC.so.8 /usr/lib/x86_64-linux-gnu/libogg.so.0 .
cp sys/fd.org/schism.desktop .
cp icons/schism-icon-128.png .
wget https://raw.githubusercontent.com/xiph/flac/master/COPYING.Xiph
cp .github/scripts/run.sh .github/scripts/install.sh .
chmod +x run.sh
chmod +x install.sh
zip schismtracker.zip configuration.md COPYING COPYING.Xiph README.md schismtracker.1 schismtracker schism.desktop schism-icon-128.png libFLAC.so.8 libogg.so.0 libutf8proc.so.2 run.sh install.sh
- name: 'Upload artifact'
uses: actions/upload-artifact@v4
with:
name: schismtracker-${{ steps.date.outputs.date }}-linux
path: schismtracker.zip
- name: 'Create source tarball'
env:
SCHISM_VERSION: ${{ steps.date.outputs.date }}
run: |
cd build
make distcheck
make dist-gzip
mv "schismtracker-$SCHISM_VERSION.tar.gz" "../schismtracker-$SCHISM_VERSION.source.tar.gz"
- name: 'Upload source tarball'
uses: actions/upload-artifact@v4
with:
name: schismtracker-${{ steps.date.outputs.date }}.source
path: schismtracker-${{ steps.date.outputs.date }}.source.tar.gz