From 42d02aa3474cfb094913f0f169e3a6da4f803470 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 25 Aug 2020 10:17:53 -0700 Subject: Add .travis.yml for macos release candidate build. We need to build the release candidate on Travis rather than GitHub actions, because GH has macos 10.15, and binaries compiled on that OS will not work with 10.13. See #6622. This build is only triggered on rc/ branches. --- .travis.yml | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..92c6eff75 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,57 @@ +os: osx +language: generic +cache: + timeout: 1000 + directories: + - "$HOME/.stack/" + - ".stack-work/" +branches: + only: + - /rc\/.*/ +install: +- set -e +- ulimit -n 4096 +- brew install haskell-stack +- which stack +- stack --version +- stack setup +- stack exec -- ghc --version +- | + export VERSION=$(grep '^[Vv]ersion:' pandoc.cabal | awk '{print $$2;}') + export BASEDIR=$(pwd) + export ARTIFACTS=${BASEDIR}/macos-release-candidate + export RESOURCES=${ARTIFACTS}/Resources + export ROOT=${ARTIFACTS}/pandoc + export DEST=${ROOT}/usr/local + export ME=$(whoami) + export BASE=pandoc-$VERSION + mkdir -p ${ARTIFACTS} + mkdir -p ${RESOURCES} + mkdir -p ${DEST}/bin + mkdir -p ${DEST}/share/man/man1 + stack build --dependencies-only pandoc pandoc-citeproc + stack build pandoc pandoc-citeproc + for f in $(find .stack-work/install -name 'pandoc*' -perm +001 -type f); do cp $f ${DEST}/bin/; done + strip ${DEST}/bin/pandoc + strip ${DEST}/bin/pandoc-citeproc + cp man/pandoc.1 ${DEST}/share/man/man1/pandoc.1 + ${DEST}/bin/pandoc-citeproc --man > \ + $DEST/share/man/man1/pandoc-citeproc.1 + ${DEST}/bin/pandoc -t html5 -s COPYING.md -Vpagetitle=License \ + -o ${RESOURCES}/license.html + chown -R $ME:staff ${ROOT} + sed -e "s/PANDOCVERSION/${VERSION}/" macos/distribution.xml.in > ${ARTIFACTS}/distribution.xml + cp macos/Makefile ${ARTIFACTS}/ + echo ${VERSION} > ${ARTIFACTS}/version.txt +deploy: + on: + branch: travis + provider: s3 + bucket: travis-jgm-pandoc + region: us-west-1 + edge: true + local_dir: macos-release-candidate + access_key_id: + secure: ohEst8EP8Z3r/bPMlYgPATo3B/ye48Z0aGp4W1pEhDZjqufLUVTFBIoicvPApCkTrbKMNTdG+KmasrO/leHpju0uFKYQHDtJmHZe3avIOIdbGnOqn97+mmLZBN5skiJWNtrxnN/TuAM+wlePz1dQpohPt6J3S70ct8DsOdZOaGI= + secret_access_key: + secure: qZ2RN4Bx4WRcVz9H8ae4S6a3AA85kcca0RdMimIREdGSx4ewMYa8lSdcKDvRbPwXRy8H3SeviqL2tTZw3+ej1jccAHowMj8Zvde5EJwX0+qO4Sr0zdWjnsvMeUmx9pO1oL3L/09KTWiMTT+d4XNpE8eqiY08qN8oMj0EPeR/AS4= -- cgit v1.2.3