Skip to content

Make example app a little easier to run #9

Make example app a little easier to run

Make example app a little easier to run #9

name: servant-typescript
on:
pull_request:
push:
branches: [main]
jobs:
cabal:
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macOS-latest]
ghc:
# - "8.6.5"
# - "8.8.4"
# - "8.10.7"
- "9.0.2"
- "9.2.8"
- "9.4.8"
- "9.6.6"
- "9.8.4"
- "9.10.1"
exclude:
# These don't work on GitHub CI anymore because they need llvm@13, which became
# disabled on 12/31/2024
- os: macOS-latest
ghc: 9.0.2
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
id: setup-haskell-cabal
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: "latest"
- name: Freeze
run: |
cabal update
cabal configure --enable-tests
cabal freeze
- uses: actions/cache@v3
name: Cache ~/.cabal/store
with:
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}-key2
# Install TSC
# - uses: actions/setup-node@v2
# with:
# node-version: '12'
# - name: Install TSC
# run: |
# npm install -g typescript
- name: Build
run: |
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
cabal build all
# - name: Test
# run: |
# cabal test all
stack:
name: stack / ghc ${{ matrix.ghc }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ghc:
# - "8.8.4"
# - "8.10.7"
- "9.0.2"
steps:
- uses: actions/checkout@v4
- uses: haskell-actions/setup@v2
name: Setup Haskell Stack
with:
ghc-version: ${{ matrix.ghc }}
stack-version: "latest"
- uses: actions/cache/restore@v4
name: Cache restore ~/.stack
id: cache-restore
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-stack
# Install TSC
# - uses: actions/setup-node@v2
# with:
# node-version: '12'
# - name: Install TSC
# run: |
# npm install -g typescript
- name: Build
run: |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks
# - name: Test
# run: |
# stack test --system-ghc
- uses: actions/cache/save@v4
if: always() && steps.cache-restore.outputs.cache-hit != 'true'
with:
path: ~/.stack
key: ${{ runner.os }}-${{ matrix.ghc }}-stack