From 3a49aa035ff391aa40b3db2327470e70ca5e2502 Mon Sep 17 00:00:00 2001 From: Pierre Villemot Date: Fri, 13 Oct 2023 15:57:05 +0200 Subject: [PATCH] Warnings as errors on the CI This PR turns warnings into errors in the CI by adding a new profile `ci` in `dune`. I also remove the useless `warnings` profile. --- .github/workflows/build.yml | 4 ++-- src/dune | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 70f236177..2ccdd4127 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,8 +72,8 @@ jobs: - name: Install dependencies run: opam exec -- make deps js-deps - - name: Run make - run: opam exec -- make + - name: Build the project + run: opam exec -- dune build --profile ci @check - name: Monitor changes uses: getsentry/action-git-diff-suggestions@main diff --git a/src/dune b/src/dune index 0a8173aaa..250bda13c 100644 --- a/src/dune +++ b/src/dune @@ -3,9 +3,9 @@ (flags (:standard -bin-annot -w -22 -warn-error -A)) (ocamlopt_flags -g)) - (warnings ;; This profile can be used to simply enable all warnings. + (ci ;; This profile is used by the CI. (flags - (:standard -bin-annot -w +A -warn-error -A)) + (:standard -bin-annot -w -22 -warn-error +A)) (ocamlopt_flags -g)) (release ;; The release profile has optimizations enabled. (flags