diff options
author | Oneric <oneric@oneric.stub> | 2022-10-21 00:47:17 +0200 |
---|---|---|
committer | Oneric <oneric@oneric.stub> | 2022-10-22 18:05:11 +0200 |
commit | 4eb5c6dcff48628772568a7a185fbb1b0e57c014 (patch) | |
tree | 40e5a8d3e0ec0e7e84741fe8a574400e58dc8ede | |
parent | 1884f6ef05673941c4db6bc89a8850c167905eff (diff) | |
download | libass-4eb5c6dcff48628772568a7a185fbb1b0e57c014.tar.bz2 libass-4eb5c6dcff48628772568a7a185fbb1b0e57c014.tar.xz |
ci/gha: ensure internal API is namespaced
If static libass is linked into a binary defining functions
of the same name there will be issues. To avoid this ensure
our non-static functions are all prefixed with 'ass_'.
-rw-r--r-- | .github/workflows/ghci.yml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/.github/workflows/ghci.yml b/.github/workflows/ghci.yml index 673546a..7383ab1 100644 --- a/.github/workflows/ghci.yml +++ b/.github/workflows/ghci.yml @@ -197,6 +197,28 @@ jobs: - name: compile run: make -j 2 + - name: ensure internal functions are namespaced + if: startsWith(matrix.os, 'ubuntu-') + run: | + test -f libass/.libs/libass.a || (echo "Static lib is missing!"; exit 1) + set +e + list="$(nm libass/.libs/libass.a | grep ' T ' | grep -v ' ass_')" + case "$?" in + 1) + : # All good + ;; + 0) + echo "There are non-namespaced functions! Prefix them with 'ass_'." + echo "$list" + exit 1 + ;; + *) + echo "Internal grep error occured!" + echo "$list" + exit 2 + ;; + esac + - name: run tests if: matrix.skip_tests != 'yes' run: | |