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.
This commit is contained in:
parent
214f2f08e4
commit
42d02aa347
1 changed files with 57 additions and 0 deletions
57
.travis.yml
Normal file
57
.travis.yml
Normal file
|
@ -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=
|
Loading…
Add table
Reference in a new issue