Skip to content
Merged
Changes from all commits
Commits
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
21 changes: 14 additions & 7 deletions .github/workflows/packcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
# If you have not committed packcheck.sh in your repo at PACKCHECK
# then it is automatically pulled from this URL.
PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/composewell/packcheck"
PACKCHECK_GITHUB_COMMIT: "4efa717bc63b4bbd0501a07df5c610849e5d6281"
PACKCHECK_GITHUB_COMMIT: "b91dd7daf50d91047ca8c1cce47e8634e34dfcbc"

# ubuntu seems to have better support than debian on CI systems
runs-on: ${{ matrix.runner }}
Expand Down Expand Up @@ -354,21 +354,22 @@ jobs:
chmod +x $1
fi
}
if test -n "$SUBDIR"; then
cd "$SUBDIR"
fi
download_one packcheck.sh

# Store the function in a file so that it can be reused across multiple
# steps.
- name: Setup packcheck
shell: bash
run: |
if test -n "$SUBDIR"; then
rm -f cabal.project
cd "$SUBDIR"
fi
cat << 'EOF' > packcheck-setup.sh
setup_packcheck_args() {
if test -n "$SUBDIR"; then
mv packcheck.sh "$SUBDIR/"
rm -f cabal.project
cd "$SUBDIR"
fi

ARGS="${{ matrix.command }} $COMMON_OPTIONS"
if test "${{ matrix.command }}" = "cabal"; then
ARGS="$ARGS $CABAL_OPTIONS"
Expand Down Expand Up @@ -409,6 +410,9 @@ jobs:
(runner.os == 'Windows' && steps.restore-deps-win.outputs.cache-hit != 'true')
shell: bash
run: |
if test -n "$SUBDIR"; then
cd "$SUBDIR"
fi
source packcheck-setup.sh
setup_packcheck_args
eval "./packcheck.sh $ARGS BUILD_DEPS_ONLY=y"
Expand Down Expand Up @@ -463,6 +467,9 @@ jobs:
- name: Run packcheck (final build)
shell: bash
run: |
if test -n "$SUBDIR"; then
cd "$SUBDIR"
fi
source packcheck-setup.sh
setup_packcheck_args
eval "./packcheck.sh $ARGS BUILD_PACKAGE_ONLY=y"
Expand Down
Loading