aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-08-25 10:17:53 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2020-08-27 18:09:49 -0700
commit42d02aa3474cfb094913f0f169e3a6da4f803470 (patch)
tree874577d0da2f8417a7b4f611aeb651c613fa7b0e
parent214f2f08e40aed660d2dc76c809ba035656e827f (diff)
downloadpandoc-42d02aa3474cfb094913f0f169e3a6da4f803470.tar.gz
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.
-rw-r--r--.travis.yml57
1 files changed, 57 insertions, 0 deletions
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=