mmitch / gbsplay

gameboy sound player

Home Page:https://mmitch.github.io/gbsplay/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

build: LDFLAGS are not honored during libimpulse generation

mmitch opened this issue · comments

The Code Coverage build workflow needs some extra flags to enable code coverage statistics.
These flags don't work with the generation of impulse.h (LDFLAGS seems to be ignored), so the workflow currently adopts a two-step build:

- name: Build impulsegen
# this builds impulsegen without coverage - LDFLAGS are not honored during build, so it would fail otherwise :/
run: |
./configure
make impulse.h
- name: Build with coverage
# this builds gbsplay with coverage enabled with GCC
env:
CFLAGS: '-O0 -coverage'
LDFLAGS: '-lgcov -coverage'
run: |
./configure
make gbsplay
- name: Test with coverage
# run the test under coverage
run: |
./gbsplay -c examples/gbsplayrc_sample -E b -o stdout examples/nightmode.gbs >/dev/null
gcov *.o

  1. impulse.h is generated with default flags, thus impulsegen.c is not considered covered code
  2. the remaining build is run again, this time with coverage enabled

Can we make this work in a single pass without changing the build flags in the middle?