pandoc/.github/workflows/nightly.yml

92 lines
2.7 KiB
YAML
Raw Normal View History

name: Nightly
on:
schedule:
2019-09-18 06:05:04 +02:00
- cron: '21 4 * * *'
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
run: |
export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
2019-09-18 06:05:04 +02:00
cabal v2-install . pandoc-citeproc
- 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:
name: nightly-linux-x86_64
path: nightly-linux-x86_64.tgz
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
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
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
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
cp COPYRIGHT ${ARTIFACTS}/
zip -r nightly-macos.zip ${ARTIFACTS}
- uses: actions/upload-artifact@master
with:
name: nightly-macos
path: nightly-macos.zip