git.iko.soy/typeable/pandoc
on master help sign in
Add nightly, move haskell.yml -> ci.yml.
369d348John MacFarlane
.github/workflows/haskell.yml → .github/workflows/ci.ymlrenamed+7−7
@@ -1,4 +1,4 @@
1−name: Haskell CI
1+name: CI tests
2
2
3on:
3on:
4 push:
4 push:
@@ -53,11 +53,11 @@ jobs:
53 run: |
53 run: |
54 export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
54 export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
55 cabal v2-update
55 cabal v2-update
56− cabal v2-build --dependencies-only --enable-tests
56+ cabal v2-build --dependencies-only --enable-tests --disable-optimization
57 - name: Build and test
57 - name: Build and test
58 run: |
58 run: |
59 export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
59 export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
60− cabal v2-install --enable-tests --run-tests 2>&1 | tee build.log
60+ cabal v2-install --enable-tests --run-tests --disable-optimization 2>&1 | tee build.log
61 # fail if warnings in local build
61 # fail if warnings in local build
62 ! grep -q "[Ww]arning:" build.log
62 ! grep -q "[Ww]arning:" build.log
63
63
@@ -89,11 +89,11 @@ jobs:
89 - name: Install dependencies
89 - name: Install dependencies
90 run: |
90 run: |
91 stack update
91 stack update
92− stack test --dependencies-only
92+ stack test --dependencies-only --fast
93 - name: Build and test
93 - name: Build and test
94 shell: cmd
94 shell: cmd
95 run: |
95 run: |
96− stack test
96+ stack test --fast
97
97
98 macos:
98 macos:
99
99
@@ -108,7 +108,7 @@ jobs:
108 - name: Install dependencies
108 - name: Install dependencies
109 run: |
109 run: |
110 ./stack update
110 ./stack update
111− ./stack test --dependencies-only
111+ ./stack test --dependencies-only --fast
112 - name: Build and test
112 - name: Build and test
113 run: |
113 run: |
114− ./stack test
114+ ./stack test --fast
.github/workflows/nightly.ymlnew file+101
@@ -0,0 +1,101 @@
1+name: Nightly
2+
3+on:
4+ schedule:
5+ - cron: '30 3 * * *'
6+
7+jobs:
8+ linux:
9+
10+ runs-on: ubuntu-latest
11+ steps:
12+ - uses: actions/checkout@v1
13+ - name: Install recent cabal/ghc
14+ run: |
15+ sudo add-apt-repository ppa:hvr/ghc
16+ sudo apt-get update
17+ sudo apt-get install ghc-8.6.5 cabal-install-2.4
18+ - name: Install dependencies
19+ run: |
20+ export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
21+ cabal v2-update
22+ cabal v2-build --dependencies-only --enable-tests . pandoc-citeproc
23+ - name: Build and test
24+ run: |
25+ export PATH=/opt/cabal/bin:/opt/ghc/bin:$PATH
26+ cabal v2-install --enable-tests --run-tests . pandoc-citeproc
27+ - name: Install artifact
28+ run: |
29+ export ARTIFACTS=./pandoc-nightly-linux-$(date +%Y-%m%-d)-${GITHUB_SHA}
30+ mkdir -p ${ARTIFACTS}
31+ for f in $(find dist-newstyle -name 'pandoc*' -type f -executable); do cp $f ${ARTIFACTS}/; done
32+ cp COPYRIGHT ${ARTIFACTS}/
33+ tar cvzf nightly-linux.tgz ${ARTIFACTS}
34+ - uses: actions/upload-artifact@master
35+ with:
36+ name: nightly-linux-x86_64
37+ path: nightly-linux-x86_64.tgz
38+
39+ windows:
40+
41+ runs-on: windows-latest
42+
43+ steps:
44+ - uses: actions/checkout@v1
45+ - name: Install stack
46+ shell: cmd
47+ run: |
48+ choco install haskell-stack
49+ - name: Install dependencies
50+ run: |
51+ stack update
52+ stack test --dependencies-only pandoc pandoc-citeproc
53+ - name: Build and test
54+ shell: cmd
55+ run: |
56+ stack install --test pandoc pandoc-citeproc
57+ - name: Install artifact
58+ run: |
59+ for /f "delims=" %%a in ('stack path --local-bin-path') do @set BINPATH=%%a
60+ set ARTIFACTS=pandoc-nightly-windows-$(date +%Y-%m%-d)-${GITHUB_SHA}
61+ mkdir %ARTIFACTS%
62+ copy %BINPATH%\pandoc.exe %ARTIFACTS%/
63+ copy %BINPATH%\pandoc-citeproc.exe %ARTIFACTS%/
64+ copy COPYRIGHT %ARTIFACTS%/COPYRIGHT.txt
65+ 7z a nightly-windows.zip %ARTIFACTS%
66+ - uses: actions/upload-artifact@master
67+ with:
68+ name: nightly-windows
69+ path: nightly-windows.tgz
70+
71+ macos:
72+
73+ runs-on: macOS-latest
74+
75+ steps:
76+ - uses: actions/checkout@v1
77+ - name: Install stack
78+ run: |
79+ curl -L https://get.haskellstack.org/stable/osx-x86_64.tar.gz -o stack.tar.gz
80+ tar xzvf stack.tar.gz --strip-components=1 'stack*/stack'
81+ - name: Install dependencies
82+ run: |
83+ ./stack update
84+ ./stack test --dependencies-only pandoc pandoc-citeproc
85+ - name: Build and test
86+ run: |
87+ ./stack install --test pandoc pandoc-citeproc
88+ - name: Install artifact
89+ run: |
90+ export ARTIFACTS=./pandoc-nightly-macos-$(date +%Y-%m%-d)-${GITHUB_SHA}
91+ mkdir -p ${ARTIFACTS}
92+ cp $HOME/.local/bin/pandoc ${ARTIFACTS}/
93+ cp $HOME/.local/bin/pandoc-citeproc ${ARTIFACTS}/
94+ cp COPYRIGHT ${ARTIFACTS}/
95+ for f in $(find dist-newstyle -name 'pandoc*' -type f -executable); do cp $f ${ARTIFACTS}/; done
96+ zip -r nightly-macos.zip ${ARTIFACTS}
97+ - uses: actions/upload-artifact@master
98+ with:
99+ name: nightly-macos
100+ path: nightly-macos.zip
101+