From 11c1b2cc6c600c58ff9300ed42ab4375f06d2438 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Wed, 28 Jul 2021 17:42:10 +0200 Subject: [PATCH] Re-add travis --- .travis.yml | 25 +++++++++++++++++++++++++ .travis/build.sh | 28 ++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .travis.yml create mode 100755 .travis/build.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..cdc397f --- /dev/null +++ b/.travis.yml @@ -0,0 +1,25 @@ +jobs: + include: + - os: osx + osx_image: xcode10.1 + language: generic + env: ARTIFACT=x86_64-apple-darwin-10.13-ghcup + + - os: osx + osx_image: xcode11.3 + language: generic + env: ARTIFACT=x86_64-apple-darwin-10.14-ghcup + + +script: ".travis/build.sh" + +deploy: + provider: releases + api_key: + secure: "hT2od8Iy04tdFVuonPSWv0NX5hZDmv4al8Q0GbIWmviUetROuM7c6/MCHUcgyiw6H2L3pmH4F24GBYWpKBT3ZMbxrKXhZOZ3KPLXzlnuRlm1qymKqqwsJs3466bMftaiBr16rx1VpAuditN4A32oSmTFcQAJc84Bxn2WZ4t8hk9muS8YPyLhqg3/NxT6ob8dzNp9eS2cA0WODMb/fMzaMruRtepSK8JvuXb/SnTvaDcl9plmPzEa+eW54jwVsDps8ZpQMQlTtGIjYHIwTQ36/iLH4LoAvD7OEnB7qf753LOzmI/bvlB75xYGsLxe1qgpzPMjuG3AK0jb2KGSZCzyAyrbBFSQMIyC1gNKMtab3CohnA9WdQqAT1xrzPzA9zNw516G5Fn/z+t9Ek1f6L2OYO2hJfweNhWh+ChAIsOags2QBpqc0qjkwUS4wqxCWBdyVfgPTUoGelvjCfjQgypgIyLEHFvXt9rlj+kd97FY7nG3vxZrsvWTKKKT551OqUYX5zWTyvGR71jKyNst/p93Pg3DkRy31gHrGnG9zfNgN5tWxJqDd/suR/BAFTp0VtkFb8fR3ct7WMVeJXtE2+bKqxO5Fnocs1VjEm8pKPk7glnp0muu08kaO0h54wiSOCbk1RvO1KZtHue4wKWrHcI18dwW2WtzoBQ4P1lOSkS81UY=" + file: $ARTIFACT + on: + repo: hasufell/ghcup-hs + tags: true + skip_cleanup: true + draft: true diff --git a/.travis/build.sh b/.travis/build.sh new file mode 100755 index 0000000..ab1a940 --- /dev/null +++ b/.travis/build.sh @@ -0,0 +1,28 @@ +#!/bin/sh + +set -ex + +mkdir -p ~/.ghcup/bin +curl -sSfL https://downloads.haskell.org/~ghcup/x86_64-apple-darwin-ghcup > ~/.ghcup/bin/ghcup +chmod +x ~/.ghcup/bin/ghcup + +export PATH="$HOME/.ghcup/bin:$PATH" + +ghcup install 8.10.4 +ghcup install-cabal 3.4.0.0 +ghcup set 8.10.4 + + +## install ghcup + +cabal update + +( + cd /tmp + cabal install --installdir="$HOME"/.ghcup/bin hspec-discover +) + +cabal build --constraint="zlib +static" --constraint="lzma +static" -ftui +cp "$(cabal new-exec --verbose=0 --offline sh -- -c 'command -v ghcup')" . +strip ./ghcup +cp ghcup "./${ARTIFACT}"