Skip to content

Commit

Permalink
Github Actions in CI to check both ghc-8.6.5 and ghc-8.10.2 builds on…
Browse files Browse the repository at this point in the history
… Windows
  • Loading branch information
newhoggy committed Oct 27, 2020
1 parent 9e95b50 commit 42f0d26
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ jobs:
fail-fast: false
matrix:
ghc: ["8.6.5", "8.10.2"]
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- os: windows-latest
ghc: 8.6.5

steps:
- uses: actions/checkout@v1
Expand Down Expand Up @@ -44,7 +47,7 @@ jobs:
curl -Ls https://download.libsodium.org/libsodium/releases/libsodium-1.0.18-mingw.tar.gz -o libsodium-1.0.18-mingw.tar.gz
tar zxvf libsodium-1.0.18-mingw.tar.gz
sed -i "s|/d/a/1/s/|D:/a/cardano-node/cardano-node/|g" libsodium-win64/lib/pkgconfig/libsodium.pc
sed -i "s|/d/a/1/s/|D:/a/cardano-base/cardano-base/|g" libsodium-win64/lib/pkgconfig/libsodium.pc
export PKG_CONFIG_PATH="$(readlink -f libsodium-win64/lib/pkgconfig)"
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
Expand All @@ -62,9 +65,11 @@ jobs:
- name: Patch GHC 8.10.2 linker
if: matrix.os == 'windows-latest'
run: |
sed -i \
's|C:/GitLabRunner/builds/2WeHDSFP/0/ghc/ghc/inplace/mingw/bin/ld.exe|C:/ProgramData/chocolatey/lib/ghc.8.10.2/tools/ghc-8.10.2/mingw/bin/ld.exe|g' \
C:/ProgramData/chocolatey/lib/ghc.8.10.2/tools/ghc-8.10.2/lib/settings
if [ -f /c/ProgramData/chocolatey/lib/ghc.8.10.2/tools/ghc-8.10.2/lib/settings ]; then
sed -i \
's|C:/GitLabRunner/builds/2WeHDSFP/0/ghc/ghc/inplace/mingw/bin/ld.exe|C:/ProgramData/chocolatey/lib/ghc.8.10.2/tools/ghc-8.10.2/mingw/bin/ld.exe|g' \
/c/ProgramData/chocolatey/lib/ghc.8.10.2/tools/ghc-8.10.2/lib/settings
fi
- name: Configure to use libsodium
run: |
Expand All @@ -83,17 +88,15 @@ jobs:
if: matrix.os != 'macos-latest'
name: Cache cabal store
with:
path: |
${{ steps.setup-haskell.outputs.cabal-store }}
dist
key: cache-${{ runner.os }}-${{ matrix.ghc }}-v1-${{ hashFiles('cabal-cache.cabal') }}-${{ github.sha }}
restore-keys: cache-${{ runner.os }}-${{ matrix.ghc }}-v1-${{ hashFiles('cabal-cache.cabal') }}-
path: ${{ steps.setup-haskell.outputs.cabal-store }}
key: cache-5e43c04-${{ runner.os }}-${{ matrix.ghc }}-v1-${{ hashFiles('cabal-cache.cabal') }}-${{ github.sha }}
restore-keys: cache-5e43c04-${{ runner.os }}-${{ matrix.ghc }}-v1-${{ hashFiles('cabal-cache.cabal') }}-

- name: Install dependencies
run: cabal build all --builddir="$CABAL_BUILDDIR" --only-dependencies

- name: Build
run: cabal build all -v3 --builddir="$CABAL_BUILDDIR"
run: cabal build all --builddir="$CABAL_BUILDDIR"

- name: Git clone
run: git clone https://github.com/input-output-hk/cardano-mainnet-mirror
Expand Down

0 comments on commit 42f0d26

Please sign in to comment.