aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-09-17 10:01:09 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-09-17 10:01:09 -0700
commit369d348a9bd884b22e3be2a3d6c470668e29991d (patch)
tree159f0d608595922be7a839da3f431eb410f59a10 /.github/workflows
parent0360d92800bd6156013b2888c6a341c13ce8311f (diff)
downloadpandoc-369d348a9bd884b22e3be2a3d6c470668e29991d.tar.gz
Add nightly, move haskell.yml -> ci.yml.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml (renamed from .github/workflows/haskell.yml)14
-rw-r--r--.github/workflows/nightly.yml101
2 files changed, 108 insertions, 7 deletions
diff --git a/.github/workflows/haskell.yml b/.github/workflows/ci.yml
index c8b98bdf4..b68e3e043 100644
--- a/.github/workflows/haskell.yml
+++ b/.github/workflows/ci.yml
@@ -1,4 +1,4 @@
-name: Haskell CI
+name: CI tests
on:
push:
@@ -53,11 +53,11 @@ jobs:
run: |
export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
cabal v2-update
- cabal v2-build --dependencies-only --enable-tests
+ cabal v2-build --dependencies-only --enable-tests --disable-optimization
- name: Build and test
run: |
export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
- cabal v2-install --enable-tests --run-tests 2>&1 | tee build.log
+ cabal v2-install --enable-tests --run-tests --disable-optimization 2>&1 | tee build.log
# fail if warnings in local build
! grep -q "[Ww]arning:" build.log
@@ -89,11 +89,11 @@ jobs:
- name: Install dependencies
run: |
stack update
- stack test --dependencies-only
+ stack test --dependencies-only --fast
- name: Build and test
shell: cmd
run: |
- stack test
+ stack test --fast
macos:
@@ -108,7 +108,7 @@ jobs:
- name: Install dependencies
run: |
./stack update
- ./stack test --dependencies-only
+ ./stack test --dependencies-only --fast
- name: Build and test
run: |
- ./stack test
+ ./stack test --fast
diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml
new file mode 100644
index 000000000..483df45a4
--- /dev/null
+++ b/.github/workflows/nightly.yml
@@ -0,0 +1,101 @@
+name: Nightly
+
+on:
+ schedule:
+ - cron: '30 3 * * *'
+
+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
+ cabal v2-build --dependencies-only --enable-tests . pandoc-citeproc
+ - name: Build and test
+ run: |
+ export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
+ cabal v2-install --enable-tests --run-tests . 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
+ stack test --dependencies-only pandoc pandoc-citeproc
+ - name: Build and test
+ shell: cmd
+ run: |
+ stack install --test pandoc pandoc-citeproc
+ - name: Install artifact
+ run: |
+ for /f "delims=" %%a in ('stack path --local-bin-path') do @set BINPATH=%%a
+ set ARTIFACTS=pandoc-nightly-windows-$(date +%Y-%m%-d)-${GITHUB_SHA}
+ mkdir %ARTIFACTS%
+ copy %BINPATH%\pandoc.exe %ARTIFACTS%/
+ copy %BINPATH%\pandoc-citeproc.exe %ARTIFACTS%/
+ 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
+ ./stack test --dependencies-only pandoc pandoc-citeproc
+ - name: Build and test
+ run: |
+ ./stack install --test pandoc pandoc-citeproc
+ - name: Install artifact
+ run: |
+ export ARTIFACTS=./pandoc-nightly-macos-$(date +%Y-%m%-d)-${GITHUB_SHA}
+ mkdir -p ${ARTIFACTS}
+ cp $HOME/.local/bin/pandoc ${ARTIFACTS}/
+ cp $HOME/.local/bin/pandoc-citeproc ${ARTIFACTS}/
+ cp COPYRIGHT ${ARTIFACTS}/
+ for f in $(find dist-newstyle -name 'pandoc*' -type f -executable); do cp $f ${ARTIFACTS}/; done
+ zip -r nightly-macos.zip ${ARTIFACTS}
+ - uses: actions/upload-artifact@master
+ with:
+ name: nightly-macos
+ path: nightly-macos.zip
+