From 307a32332c24585d75b53c9912173cf9037cf032 Mon Sep 17 00:00:00 2001 From: Sergey Vinokurov Date: Sat, 13 May 2023 13:23:10 +0100 Subject: [PATCH 1/5] Simpler CI than also runs on Windows and MacOS --- .github/workflows/haskell-ci-simple.yml | 83 +++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/haskell-ci-simple.yml diff --git a/.github/workflows/haskell-ci-simple.yml b/.github/workflows/haskell-ci-simple.yml new file mode 100644 index 0000000..05afdaa --- /dev/null +++ b/.github/workflows/haskell-ci-simple.yml @@ -0,0 +1,83 @@ +name: Build +on: + - push + - pull_request + +defaults: + run: + shell: bash + +jobs: + main: + name: GHC ${{ matrix.ghc }} on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macOS-latest, windows-latest] + ghc: + # - "8.0.2" + # - "8.2.2" + # - "8.4.4" + # - "8.6.5" + # - "8.8.4" + # - "8.10.7" + # - "9.0.2" + # - "9.2.7" + # - "9.4.5" + - "9.6.1" + steps: + - uses: actions/checkout@v3 + + - uses: haskell/actions/setup@v2.3.7 + id: setup-haskell-cabal + with: + ghc-version: ${{ matrix.ghc }} + cabal-version: "latest" + cabal-update: true + + - uses: actions/cache@v3 + name: Cache cabal stuff + with: + path: | + ${{ steps.setup-haskell-cabal.outputs.cabal-store }} + dist-newstyle + key: ${{ runner.os }}-${{ matrix.ghc }} + + - name: Versions + run: | + cabal --version + + - name: Install alex & happy + run: | + cd ../ + cabal install alex happy + + - name: Unpack + run: | + cp src/Parser.y src/Parser.y.boot + cp src/Scan.x src/Scan.x.boot + cabal sdist --ignore-project --output-directory . + cabal get alex-*.tar.gz + + - name: Build + run: | + cd alex-*/ + cabal build all --enable-tests --enable-benchmarks + + - name: Test + run: | + cd alex-*/ + export ALEX=$(cabal list-bin alex) + cabal run --enable-tests alex:test:tests + + - name: Haddock + run: | + cd alex-*/ + cabal haddock all + + - name: Cabal check + run: | + cd alex-*/ + cabal check + From 8245eb8bf2c7c73a33f8d2ec5330d01c8a779840 Mon Sep 17 00:00:00 2001 From: Sergey Vinokurov Date: Sat, 13 May 2023 15:07:59 +0100 Subject: [PATCH 2/5] More GHC versions --- .github/workflows/haskell-ci-simple.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/haskell-ci-simple.yml b/.github/workflows/haskell-ci-simple.yml index 05afdaa..5d41e30 100644 --- a/.github/workflows/haskell-ci-simple.yml +++ b/.github/workflows/haskell-ci-simple.yml @@ -16,15 +16,15 @@ jobs: matrix: os: [ubuntu-latest, macOS-latest, windows-latest] ghc: - # - "8.0.2" - # - "8.2.2" - # - "8.4.4" - # - "8.6.5" - # - "8.8.4" - # - "8.10.7" - # - "9.0.2" - # - "9.2.7" - # - "9.4.5" + - "8.0.2" + - "8.2.2" + - "8.4.4" + - "8.6.5" + - "8.8.4" + - "8.10.7" + - "9.0.2" + - "9.2.7" + - "9.4.5" - "9.6.1" steps: - uses: actions/checkout@v3 From 9ec03b4f39a08e3d3098c062b9668c7c0da5ebdb Mon Sep 17 00:00:00 2001 From: Sergey Vinokurov Date: Sat, 13 May 2023 15:38:11 +0100 Subject: [PATCH 3/5] =?UTF-8?q?Can=E2=80=99=20install=209.4.5=20on=20Windo?= =?UTF-8?q?ws?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/haskell-ci-simple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/haskell-ci-simple.yml b/.github/workflows/haskell-ci-simple.yml index 5d41e30..5a82a1a 100644 --- a/.github/workflows/haskell-ci-simple.yml +++ b/.github/workflows/haskell-ci-simple.yml @@ -24,7 +24,7 @@ jobs: - "8.10.7" - "9.0.2" - "9.2.7" - - "9.4.5" + - "9.4.4" - "9.6.1" steps: - uses: actions/checkout@v3 From a7291084470be0f06b4ff18f6674108a804e701d Mon Sep 17 00:00:00 2001 From: Sergey Vinokurov Date: Sun, 14 May 2023 01:28:53 +0100 Subject: [PATCH 4/5] Make haddock generate docs for executable --- .github/workflows/haskell-ci-simple.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/haskell-ci-simple.yml b/.github/workflows/haskell-ci-simple.yml index 5a82a1a..916f6f0 100644 --- a/.github/workflows/haskell-ci-simple.yml +++ b/.github/workflows/haskell-ci-simple.yml @@ -74,7 +74,7 @@ jobs: - name: Haddock run: | cd alex-*/ - cabal haddock all + cabal haddock --disable-documentation --haddock-all all - name: Cabal check run: | From 3fc85ed9805f754c8cb2afaa7252707a5a8cf275 Mon Sep 17 00:00:00 2001 From: Sergey Vinokurov Date: Sun, 14 May 2023 20:14:18 +0100 Subject: [PATCH 5/5] Set up GHC 9.4.5 --- .github/workflows/haskell-ci-simple.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/haskell-ci-simple.yml b/.github/workflows/haskell-ci-simple.yml index 916f6f0..1f98926 100644 --- a/.github/workflows/haskell-ci-simple.yml +++ b/.github/workflows/haskell-ci-simple.yml @@ -24,12 +24,12 @@ jobs: - "8.10.7" - "9.0.2" - "9.2.7" - - "9.4.4" + - "9.4.5" - "9.6.1" steps: - uses: actions/checkout@v3 - - uses: haskell/actions/setup@v2.3.7 + - uses: haskell-actions/setup@v2 id: setup-haskell-cabal with: ghc-version: ${{ matrix.ghc }}