From 85b908811b7c88db13c483ee8f5f4c2e08709fe8 Mon Sep 17 00:00:00 2001 From: Sebastian Nagel Date: Mon, 9 Mar 2020 21:30:08 +0100 Subject: [PATCH 1/4] Setup a basic github action --- .github/workflows/haskell.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/haskell.yml diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml new file mode 100644 index 0000000..2ea0dca --- /dev/null +++ b/.github/workflows/haskell.yml @@ -0,0 +1,29 @@ +name: Haskell CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: [linux,macos,windows] + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-haskell@v1 + with: + ghc-version: '8.8.2' + cabal-version: '3.0' + - name: Install dependencies + run: | + cabal update + cabal install --only-dependencies --enable-tests + - name: Build + run: | + cabal configure --enable-tests + cabal build + - name: Run tests + run: cabal test From c11d082fd75a8d3de3ad86331ef04e28be48daa0 Mon Sep 17 00:00:00 2001 From: Sebastian Nagel Date: Mon, 9 Mar 2020 21:31:43 +0100 Subject: [PATCH 2/4] Update 'runs-on' --- .github/workflows/haskell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 2ea0dca..8a36a22 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -9,7 +9,7 @@ on: jobs: build: - runs-on: [linux,macos,windows] + runs-on: [linux] steps: - uses: actions/checkout@v2 From 6247fecd12087c16e28f766ab5f62839f123ac1d Mon Sep 17 00:00:00 2001 From: Sebastian Nagel Date: Mon, 9 Mar 2020 21:32:57 +0100 Subject: [PATCH 3/4] Another try on the 'runs-on' --- .github/workflows/haskell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index 8a36a22..f6cd710 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -9,7 +9,7 @@ on: jobs: build: - runs-on: [linux] + runs-on: [ubuntu-latest] steps: - uses: actions/checkout@v2 From 53f53e57c8a4ddfb2d626a306b585916011d718a Mon Sep 17 00:00:00 2001 From: Sebastian Nagel Date: Mon, 9 Mar 2020 22:07:15 +0100 Subject: [PATCH 4/4] Use cabal build instead of install Because new-style install of Cabal 3.0.0 is not intended to install / build only dependencies (libraries) --- .github/workflows/haskell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/haskell.yml b/.github/workflows/haskell.yml index f6cd710..db8e3c1 100644 --- a/.github/workflows/haskell.yml +++ b/.github/workflows/haskell.yml @@ -20,7 +20,7 @@ jobs: - name: Install dependencies run: | cabal update - cabal install --only-dependencies --enable-tests + cabal build --only-dependencies --enable-tests - name: Build run: | cabal configure --enable-tests