Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .github/workflows/build-and-test-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
--ghc-options="-Werror"
- name: Check that .cabal file has not changed except hpack comment
run: |
CABAL_FILE=jbeam-edit.cabal
CABAL_FILE=$(find . -maxdepth 1 -name '*.cabal' | head -n 1)
TMP_DIR=$(mktemp -d)
git show HEAD:$CABAL_FILE > $TMP_DIR/committed.cabal
cp $CABAL_FILE $TMP_DIR/current.cabal
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ghc: [9.4.7, 9.6.6, latest]
ghc: [9.4.7, 9.6.6]
env:
MATRIX_GHC: ${{ matrix.ghc }}
steps:
Expand All @@ -78,7 +78,7 @@ jobs:
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: latest
cabal-update: true
cabal-update: false
- name: Log GHC and Cabal outputs
run: |
echo "GHC Version: ${{ steps.setup-ghc.outputs.ghc-version }}"
Expand All @@ -98,6 +98,8 @@ jobs:
}}
restore-keys: |
${{ runner.os }}-cabal-${{ steps.setup-ghc.outputs.ghc-version }}-
- name: Update Cabal package index
run: cabal update
- name: Configure project
run: |
FLAGS=""
Expand All @@ -106,6 +108,6 @@ jobs:
fi
cabal configure --enable-tests --flags=dump-ast $FLAGS --ghc-options="-Werror"
- name: Build project (GHC ${{ steps.setup-ghc.outputs.ghc-version }})
run: cabal build
run: cabal build all
- name: Run tests (GHC ${{ steps.setup-ghc.outputs.ghc-version }})
run: cabal test --test-show-details=direct
run: cabal test --test-show-details=direct all
42 changes: 3 additions & 39 deletions .github/workflows/build-and-test-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,13 @@ on:
push:
branches: [master]
pull_request:
schedule:
- cron: 0 5 * * 0 # every sunday 05:00 UTC

jobs:
build-with-stack-windows:
name: Build and test with Stack
if: github.event_name != 'schedule'
runs-on: windows-latest
steps:
- name: Checkout code
Expand Down Expand Up @@ -36,42 +39,3 @@ jobs:
--ghc-options="-Werror"
- name: Run tests
run: stack test --fast
build-with-cabal-windows:
name: Build and test with Cabal (GHC latest, future-proof)
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up GHC latest and Cabal
id: setup-ghc
uses: haskell-actions/setup@v2.8.0
with:
ghc-version: latest
cabal-version: latest
cabal-update: true
- name: Log GHC and Cabal outputs
run: |
echo "GHC Version: ${{ steps.setup-ghc.outputs.ghc-version }}"
echo "Cabal Store Path: ${{ steps.setup-ghc.outputs.cabal-store }}"
- name: Cache GHC, Cabal store, and build artifacts
uses: actions/cache@v4.2.3
with:
path: |
dist-newstyle
${{ steps.setup-ghc.outputs.cabal-store }}
key: >-
${{ runner.os }}-cabal-${{
steps.setup-ghc.outputs.ghc-version
}}-${{
hashFiles('**/package.yaml')
}}
restore-keys: |
${{ runner.os }}-cabal-${{ steps.setup-ghc.outputs.ghc-version }}-
- name: Configure project
shell: pwsh
run: |
cabal configure --enable-tests --flags=dump-ast --allow-newer=base --ghc-options="-Werror"
- name: Build project (GHC latest)
run: cabal build
- name: Run tests (GHC latest)
run: cabal test --test-show-details=direct
52 changes: 52 additions & 0 deletions .github/workflows/future-proofing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
on:
push:
branches: [master]
pull_request:
schedule:
- cron: 0 5 * * 0 # every sunday 05:00 UTC

jobs:
build-with-latest-ghc:
name: Build and test with Cabal (GHC latest) on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up GHC latest and Cabal
id: setup-ghc
uses: haskell-actions/setup@v2.8.0
with:
ghc-version: latest
cabal-version: latest
cabal-update: false
- name: Log GHC and Cabal outputs
run: |
echo "GHC Version: ${{ steps.setup-ghc.outputs.ghc-version }}"
echo "Cabal Store Path: ${{ steps.setup-ghc.outputs.cabal-store }}"
- name: Cache GHC, Cabal store, and build artifacts
uses: actions/cache@v4.2.3
with:
path: |
dist-newstyle
${{ steps.setup-ghc.outputs.cabal-store }}
key: >-
${{ runner.os }}-cabal-${{
steps.setup-ghc.outputs.ghc-version
}}-${{
hashFiles('**/package.yaml')
}}
restore-keys: |
${{ runner.os }}-cabal-${{ steps.setup-ghc.outputs.ghc-version }}-
- name: Update Cabal package index
run: cabal update
- name: Configure project
shell: bash
run: |
cabal configure --enable-tests --flags=dump-ast --allow-newer=base --ghc-options="-Werror"
- name: Build project (GHC latest)
run: cabal build all
- name: Run tests (GHC latest)
run: cabal test --test-show-details=direct all
Loading