From 69e4efe5286e8955743c64034a2c7eb69e7e4a6a Mon Sep 17 00:00:00 2001 From: Daniel Gröber Date: Fri, 26 Oct 2018 17:53:18 +0200 Subject: Switch CI to v2-build --- scripts/ci/steps/00-config.sh | 7 ------- scripts/ci/steps/05-print-packages.sh | 1 - scripts/ci/steps/10-dependencies.sh | 3 --- scripts/ci/steps/10-update.sh | 1 + scripts/ci/steps/15-print-packages.sh | 1 - scripts/ci/steps/20-sdist.sh | 9 ++++++++- scripts/ci/steps/30-build.sh | 6 +++--- scripts/ci/steps/40-test.sh | 6 ++++-- 8 files changed, 16 insertions(+), 18 deletions(-) delete mode 120000 scripts/ci/steps/05-print-packages.sh delete mode 100644 scripts/ci/steps/10-dependencies.sh create mode 100644 scripts/ci/steps/10-update.sh delete mode 120000 scripts/ci/steps/15-print-packages.sh diff --git a/scripts/ci/steps/00-config.sh b/scripts/ci/steps/00-config.sh index eb8280a..8068fa9 100644 --- a/scripts/ci/steps/00-config.sh +++ b/scripts/ci/steps/00-config.sh @@ -1,10 +1,3 @@ -if [ -w . ]; then - sandbox="$PWD"/.cabal-sandbox - sandbox_config="$PWD"/cabal.sandbox.config -else - sandbox="$HOME"/cabal-sandbox - sandbox_config="$HOME"/cabal.sandbox.config -fi source_dir="$(mktemp --tmpdir -d "cabal-helper.sdistXXXXXXXXX")" build_dir="$(mktemp --tmpdir -d "cabal-helper.distXXXXXXXXX")" diff --git a/scripts/ci/steps/05-print-packages.sh b/scripts/ci/steps/05-print-packages.sh deleted file mode 120000 index 4a3479a..0000000 --- a/scripts/ci/steps/05-print-packages.sh +++ /dev/null @@ -1 +0,0 @@ -../print-packages.sh \ No newline at end of file diff --git a/scripts/ci/steps/10-dependencies.sh b/scripts/ci/steps/10-dependencies.sh deleted file mode 100644 index 0d0254c..0000000 --- a/scripts/ci/steps/10-dependencies.sh +++ /dev/null @@ -1,3 +0,0 @@ -"$CI_SCRIPTS_DIR"/retry.sh cabal update -cabal --sandbox-config="$sandbox_config" sandbox init --sandbox="$sandbox" -cabal --sandbox-config="$sandbox_config" install --only-dependencies --enable-tests diff --git a/scripts/ci/steps/10-update.sh b/scripts/ci/steps/10-update.sh new file mode 100644 index 0000000..d6bed21 --- /dev/null +++ b/scripts/ci/steps/10-update.sh @@ -0,0 +1 @@ +"$CI_SCRIPTS_DIR"/retry.sh cabal update diff --git a/scripts/ci/steps/15-print-packages.sh b/scripts/ci/steps/15-print-packages.sh deleted file mode 120000 index 4a3479a..0000000 --- a/scripts/ci/steps/15-print-packages.sh +++ /dev/null @@ -1 +0,0 @@ -../print-packages.sh \ No newline at end of file diff --git a/scripts/ci/steps/20-sdist.sh b/scripts/ci/steps/20-sdist.sh index bd8fbe1..ab98061 100644 --- a/scripts/ci/steps/20-sdist.sh +++ b/scripts/ci/steps/20-sdist.sh @@ -1,6 +1,13 @@ mkdir -p "$source_dir" mkdir -p "$build_dir" -cabal --sandbox-config="$sandbox_config" sdist --builddir="$build_dir" --output-directory="$source_dir" +cabal act-as-setup -- sdist --output-directory="$source_dir" + +if [ -d cabal-plan/ ]; then + ( + cd cabal-plan/ + cabal act-as-setup -- sdist --output-directory="$source_dir/cabal-plan" + ) +fi cd "$source_dir" diff --git a/scripts/ci/steps/30-build.sh b/scripts/ci/steps/30-build.sh index 8e71aa3..6401223 100644 --- a/scripts/ci/steps/30-build.sh +++ b/scripts/ci/steps/30-build.sh @@ -1,4 +1,4 @@ # -fdev enables building the helper "main" exe directly and enables more warnings -cabal --sandbox-config="$sandbox_config" configure --builddir="$build_dir" --enable-tests -fdev -cabal --sandbox-config="$sandbox_config" build --builddir="$build_dir" -cabal --sandbox-config="$sandbox_config" haddock --builddir="$build_dir" +cabal new-configure --builddir="$build_dir" -fdev --enable-tests +cabal new-build --builddir="$build_dir" +cabal new-haddock --builddir="$build_dir" diff --git a/scripts/ci/steps/40-test.sh b/scripts/ci/steps/40-test.sh index cfdf05c..41ddc94 100644 --- a/scripts/ci/steps/40-test.sh +++ b/scripts/ci/steps/40-test.sh @@ -1,2 +1,4 @@ -cabal_helper_libexecdir="$build_dir"/build/cabal-helper-wrapper \ - cabal --sandbox-config="$sandbox_config" test --builddir="$build_dir" --show-details=streaming + +cabal --builddir="$build_dir" new-run ghc-session + +cabal --builddir="$build_dir" new-run compile-test -- cgit v1.2.3