aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2020-06-20 09:00:13 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2020-06-20 09:12:51 +0200
commitb907d25fe43e2b7b9ecfe50c65b2d1f85c079d52 (patch)
tree1ebe5af1b04ad022b358f0809926937fe2442bf8 /.github
parent112e98def6baf3433e99fbaa3e7280cad16f5422 (diff)
downloadpandoc-b907d25fe43e2b7b9ecfe50c65b2d1f85c079d52.tar.gz
CI: use GitHub workflow command to set system path
This way, the PATH environment variable does not have to be set repeatedly in each step.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml5
1 files changed, 3 insertions, 2 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 6742b0298..a94d42e7d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -68,6 +68,9 @@ jobs:
sudo apt-get update
sudo apt-get install ghc-${{ matrix.versions.ghc }} cabal-install-${{ matrix.versions.cabal }}
fi
+ # Use a GitHub workflow command to add folders to PATH.
+ echo "::add-path::/opt/ghc/${{ matrix.versions.ghc }}/bin"
+ echo "::add-path::/opt/cabal/${{ matrix.versions.cabal }}/bin"
# declare/restore cached things
# caching doesn't work for scheduled runs yet
@@ -89,12 +92,10 @@ jobs:
- name: Install dependencies
run: |
- export PATH=/opt/cabal/${{ matrix.versions.cabal }}/bin:/opt/ghc/${{ matrix.versions.ghc }}/bin:$PATH
cabal v2-update
cabal v2-build --dependencies-only --enable-tests --disable-optimization
- name: Build and test
run: |
- export PATH=/opt/cabal/${{ matrix.versions.cabal }}/bin:/opt/ghc/${{ matrix.versions.ghc }}/bin:$PATH
cabal v2-build --enable-tests --disable-optimization 2>&1 | tee build.log
# fail if warnings in local build
! grep -q ": *[Ww]arning:" build.log || exit 1