2019-09-17 19:01:09 +02:00
|
|
|
name: Nightly
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
2019-09-18 07:21:44 +02:00
|
|
|
- cron: '21 7 * * *'
|
2019-09-17 19:01:09 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
linux:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Install recent cabal/ghc
|
|
|
|
run: |
|
|
|
|
sudo add-apt-repository ppa:hvr/ghc
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install ghc-8.6.5 cabal-install-2.4
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
|
|
|
|
cabal v2-update
|
2019-09-18 06:05:04 +02:00
|
|
|
cabal v2-build --dependencies-only . pandoc-citeproc
|
|
|
|
- name: Build
|
2019-09-17 19:01:09 +02:00
|
|
|
run: |
|
|
|
|
export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
|
2019-09-18 06:05:04 +02:00
|
|
|
cabal v2-install . pandoc-citeproc
|
2019-09-17 19:01:09 +02:00
|
|
|
- name: Install artifact
|
|
|
|
run: |
|
|
|
|
export ARTIFACTS=./pandoc-nightly-linux-$(date +%Y-%m%-d)-${GITHUB_SHA}
|
|
|
|
mkdir -p ${ARTIFACTS}
|
|
|
|
for f in $(find dist-newstyle -name 'pandoc*' -type f -executable); do cp $f ${ARTIFACTS}/; done
|
|
|
|
cp COPYRIGHT ${ARTIFACTS}/
|
|
|
|
tar cvzf nightly-linux.tgz ${ARTIFACTS}
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
with:
|
2019-09-18 07:21:03 +02:00
|
|
|
name: nightly-linux
|
|
|
|
path: nightly-linux.tgz
|
2019-09-17 19:01:09 +02:00
|
|
|
|
|
|
|
windows:
|
|
|
|
|
|
|
|
runs-on: windows-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Install stack
|
|
|
|
shell: cmd
|
|
|
|
run: |
|
|
|
|
choco install haskell-stack
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
stack update
|
2019-09-18 06:05:04 +02:00
|
|
|
stack build --dependencies-only pandoc pandoc-citeproc
|
|
|
|
- name: Build artifacts
|
2019-09-17 19:01:09 +02:00
|
|
|
shell: cmd
|
|
|
|
run: |
|
|
|
|
set ARTIFACTS=pandoc-nightly-windows-$(date +%Y-%m%-d)-${GITHUB_SHA}
|
|
|
|
mkdir %ARTIFACTS%
|
2019-09-18 06:05:04 +02:00
|
|
|
stack install --local-bin-path %ARTIFACTS% pandoc pandoc-citeproc
|
2019-09-17 19:01:09 +02:00
|
|
|
copy COPYRIGHT %ARTIFACTS%/COPYRIGHT.txt
|
|
|
|
7z a nightly-windows.zip %ARTIFACTS%
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
with:
|
|
|
|
name: nightly-windows
|
|
|
|
path: nightly-windows.tgz
|
|
|
|
|
|
|
|
macos:
|
|
|
|
|
|
|
|
runs-on: macOS-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Install stack
|
|
|
|
run: |
|
|
|
|
curl -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz -o stack.tar.gz
|
|
|
|
tar xzvf stack.tar.gz --strip-components=1 'stack*/stack'
|
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
./stack update
|
2019-09-18 06:05:04 +02:00
|
|
|
./stack build --dependencies-only pandoc pandoc-citeproc
|
|
|
|
- name: Build artifacts
|
2019-09-17 19:01:09 +02:00
|
|
|
run: |
|
|
|
|
export ARTIFACTS=./pandoc-nightly-macos-$(date +%Y-%m%-d)-${GITHUB_SHA}
|
|
|
|
mkdir -p ${ARTIFACTS}
|
2019-09-18 06:05:04 +02:00
|
|
|
./stack install --local-bin-path ${ARTIFACTS}/ pandoc pandoc-citeproc
|
2019-09-17 19:01:09 +02:00
|
|
|
cp COPYRIGHT ${ARTIFACTS}/
|
|
|
|
zip -r nightly-macos.zip ${ARTIFACTS}
|
|
|
|
- uses: actions/upload-artifact@master
|
|
|
|
with:
|
|
|
|
name: nightly-macos
|
|
|
|
path: nightly-macos.zip
|
|
|
|
|