File tree Expand file tree Collapse file tree 2 files changed +53
-6
lines changed Expand file tree Collapse file tree 2 files changed +53
-6
lines changed Original file line number Diff line number Diff line change 11#! /bin/bash
2+
3+ me=$( basename " $0 " )
4+ # If no arguments are given, print usage
5+ if [ $# -eq 0 ]; then
6+ echo " Usage: . $me --clash <version> --ghc <version>"
7+ exit 1
8+ fi
9+
10+ # Parse command line options
11+ while (( "$# " )) ; do
12+ case " $1 " in
13+ --clash)
14+ clash_version=" $2 "
15+ shift 2
16+ ;;
17+ --ghc)
18+ ghc_version=" $2 "
19+ shift 2
20+ ;;
21+ --) # end argument parsing
22+ shift
23+ break
24+ ;;
25+ -* |--* =) # unsupported flags
26+ echo " Error: Unsupported flag $1 " >&2
27+ exit 1
28+ ;;
29+ * ) # preserve positional arguments
30+ PARAMS=" $PARAMS $1 "
31+ shift
32+ ;;
33+ esac
34+ done
35+
36+ # Check if clash_version is set, exit if it's not
37+ if [[ -z " $clash_version " ]]; then
38+ echo " Error: clash_version is not set, use --clash_version" >&2
39+ exit 1
40+ fi
241set -xeou pipefail
342
443# Build dependencies first, so they don't end up in logs
544cabal build \
645 --constraint=clash-prelude==$clash_version \
746 --enable-documentation \
8- --allow-newer=circuit-notation: ghc \
47+ --with-ghc= $ ghc \
948 clash-protocols
1049
1150# circuit-notation currently _compiles on 8.10, but isn't usable. The only
@@ -15,7 +54,7 @@ cabal build \
1554cabal haddock \
1655 --constraint=clash-prelude==$clash_version \
1756 --enable-documentation \
18- --allow-newer=circuit-notation: ghc \
57+ --with-ghc= $ ghc \
1958 clash-protocols \
2059 | & tee haddock_log
2160
Original file line number Diff line number Diff line change @@ -111,10 +111,6 @@ jobs:
111111 run : |
112112 .ci/test_cabal.sh
113113
114- - name : Documentation
115- run : |
116- .ci/build_docs.sh
117-
118114 linting :
119115 name : Source code linting
120116 runs-on : ubuntu-latest
@@ -125,3 +121,15 @@ jobs:
125121 - name : Whitespace
126122 run : |
127123 .ci/test_whitespace.sh
124+
125+ documentation :
126+ name : Documentation
127+ runs-on : ubuntu-latest
128+ steps :
129+ - name : Checkout
130+ uses : actions/checkout@v4
131+
132+ - name : Build
133+ # Make sure we use supported versions for Clash and GHC
134+ run : |
135+ .ci/build_docs.sh --clash 1.8.1 --ghc 9.6.4
You can’t perform that action at this time.
0 commit comments