Skip to content

Commit

Permalink
Skip w-dream-html example on build (#358)
Browse files Browse the repository at this point in the history
w-dream-html depends on external package dream-html, which, in turn,
depends on package dream, which makes it awkward to install dream-html
inside Dream's CI. So skip this example.
  • Loading branch information
alxtuz authored Oct 22, 2024
1 parent 186ab99 commit 5e85a74
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,27 @@ jobs:
- run: opam exec -- make test
if: runner.os != 'Windows'

- run: opam lint example/**/*.opam
- run: opam lint --recursive example

- name: Build examples
if: runner.os != 'Windows'
run: |
set -e
set -x
EXAMPLES=$(find example -maxdepth 1 -type d -not -name "w-mirage*" -not -name "r-tyxml" | grep -v "^example/0" | grep -v "^example$" | sort)
EXCLUDED_EXAMPLES='w-mirage*|r-tyxml|w-dream-html'
EXAMPLES=$(find example -maxdepth 1 -type d | grep -Ev $EXCLUDED_EXAMPLES | grep -v "^example/0" | grep -v "^example$" | sort)
shopt -s nullglob
for EXAMPLE in $EXAMPLES
do
FILE=$(ls $EXAMPLE/*.ml $EXAMPLE/*.re $EXAMPLE/server/*.ml $EXAMPLE/server/*.re)
FILE=$(find $EXAMPLE -maxdepth 1 -type f -and -path "${EXAMPLE}/*.ml")
FILE+=$(find $EXAMPLE -maxdepth 1 -type f -and -path "${EXAMPLE}/*.re")
FILE+=$(find $EXAMPLE -maxdepth 2 -type f -and -path "${EXAMPLE}/server/*.ml")
FILE+=$(find $EXAMPLE -maxdepth 2 -type f -and -path "${EXAMPLE}/server/*.re")
if [[ "$FILE" == "" ]]; then
continue
fi
EXE=$(echo $FILE | sed 's/\..*$/.exe/g')
echo dune build $EXE
opam exec -- dune build $EXE
Expand Down
5 changes: 5 additions & 0 deletions example/z-playground/runtime/runtime.opam
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
opam-version: "2.0"

synopsis: "Dream playground runtime"
homepage: "https://github.com/aantron/dream"
bug-reports: "https://github.com/aantron/dream/issues"
author: "Anton Bachin <[email protected]>"
license: "MIT"
maintainer: "Anton Bachin <[email protected]>"

depends: [
"dream"
"dune" {>= "2.0.0"}
Expand Down

0 comments on commit 5e85a74

Please sign in to comment.