name: Test Shaka Packager description: | A reusable action to test Shaka Packager. Should be run after building Shaka Packager. inputs: lib_type: description: A library type, either "static" or "shared". required: true build_type: description: A build type, either "Debug" or "Release". required: true build_type_suffix: description: A suffix to append to the build type in the output path. required: false default: "" exe_ext: description: The extension on executable files. required: false default: "" runs: using: composite steps: - name: Test shell: bash run: | echo "::group::Prepare test environment" # NOTE: Some of these tests must be run from the "src" directory. cd src/ OUTDIR=out/${{ inputs.build_type }}${{ inputs.build_type_suffix }} if [[ '${{ runner.os }}' == 'macOS' ]]; then export DYLD_FALLBACK_LIBRARY_PATH=$OUTDIR fi echo "::endgroup::" for i in $OUTDIR/*test${{ inputs.exe_ext }}; do echo "::group::Test $i" "$i" || exit 1 echo "::endgroup::" done echo "::group::Test $OUTDIR/packager_test.py" python3 $OUTDIR/packager_test.py \ -v --libpackager_type=${{ inputs.lib_type }}_library echo "::endgroup::"