diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2018-10-26 17:53:18 +0200 |
---|---|---|
committer | Daniel Gröber <dxld@darkboxed.org> | 2018-10-27 19:53:16 +0200 |
commit | 69e4efe5286e8955743c64034a2c7eb69e7e4a6a (patch) | |
tree | 1cb62a9b22c8682483fe06efadb872620c834247 /scripts | |
parent | 635ffcaad47847ac5a5837ad10123c8bea7f2917 (diff) |
Switch CI to v2-build
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/ci/steps/00-config.sh | 7 | ||||
l--------- | scripts/ci/steps/05-print-packages.sh | 1 | ||||
-rw-r--r-- | scripts/ci/steps/10-dependencies.sh | 3 | ||||
-rw-r--r-- | scripts/ci/steps/10-update.sh | 1 | ||||
l--------- | scripts/ci/steps/15-print-packages.sh | 1 | ||||
-rw-r--r-- | scripts/ci/steps/20-sdist.sh | 9 | ||||
-rw-r--r-- | scripts/ci/steps/30-build.sh | 6 | ||||
-rw-r--r-- | scripts/ci/steps/40-test.sh | 6 |
8 files changed, 16 insertions, 18 deletions
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 |