Skip to content

Commit

Permalink
move Documentation check to separate job
Browse files Browse the repository at this point in the history
Currently all cabal tests can fail due to missing documentation,
this is undesirable since we can no more distinguish ghc / clash version related problems if documentation does not build
  • Loading branch information
lmbollen committed May 16, 2024
1 parent 48b4b55 commit 76368a3
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 4 deletions.
34 changes: 34 additions & 0 deletions .ci/build_docs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,38 @@
#!/bin/bash

# If no arguments are given, print usage
if [ $# -eq 0 ]; then
echo "Usage: --clash_version <version>"
exit 1
fi

# Parse command line options
while (( "$#" )); do
case "$1" in
--clash_version)
clash_version="$2"
shift 2
;;
--) # end argument parsing
shift
break
;;
-*|--*=) # unsupported flags
echo "Error: Unsupported flag $1" >&2
exit 1
;;
*) # preserve positional arguments
PARAMS="$PARAMS $1"
shift
;;
esac
done

# Check if clash_version is set, exit if it's not
if [[ -z "$clash_version" ]]; then
echo "Error: clash_version is not set, use --clash_version" >&2
exit 1
fi
set -xeou pipefail

# Build dependencies first, so they don't end up in logs
Expand Down
15 changes: 11 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,6 @@ jobs:
run: |
.ci/test_cabal.sh
- name: Documentation
run: |
.ci/build_docs.sh
linting:
name: Source code linting
runs-on: ubuntu-latest
Expand All @@ -125,3 +121,14 @@ jobs:
- name: Whitespace
run: |
.ci/test_whitespace.sh
documentation:
name: Documentation clash_version 9.6.4
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Build
run: |
.ci/build_docs.sh --clash_version 1.8.1

0 comments on commit 76368a3

Please sign in to comment.