Bump to support text 2.1 #77
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://kodimensional.dev/github-actions but all bugs are mine. | |
# Mine, I tell ya. | |
# | |
# Use https://raw.githubusercontent.com/kowainik/.github/main/workflow-templates/ci.yml | |
# as the basis. | |
# | |
# I am hoping to adjust this to support "multiple" repositories in the | |
# same account (or, at least, just run hvega through CI). It would be | |
# nice to only run hvega changes for hvega-related changes, but given the | |
# set up how would you automate that? | |
# | |
name: hvega-CI | |
# Trigger the workflow on push or pull request, but only for the main branch | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
jobs: | |
cabal: | |
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
cabal: ["latest"] | |
os: [ubuntu-latest] | |
ghc-version: ["9.6", "9.4", "9.2", "9.0", "8.10"] | |
include: | |
- os: macOS-latest | |
ghc-version: '9.4' | |
- os: windows-latest | |
ghc-version: '9.4' | |
steps: | |
- uses: actions/checkout@v3 | |
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' | |
- uses: haskell/actions/setup@v2 | |
id: setup-haskell-cabal | |
name: Setup Haskell | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: ${{ matrix.cabal }} | |
- name: Configure | |
working-directory: ./hvega | |
run: | | |
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct | |
- name: Freeze | |
working-directory: ./hvega | |
run: | | |
cabal freeze | |
- uses: actions/[email protected] | |
name: Cache ~/.cabal/store | |
with: | |
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }} | |
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }} | |
- name: Install dependencies | |
working-directory: ./hvega | |
run: | | |
cabal build all --only-dependencies | |
- name: Build | |
working-directory: ./hvega | |
run: | | |
cabal build all | |
- name: List - non Windows | |
working-directory: ./hvega | |
shell: bash | |
run: | | |
if [ "$RUNNER_OS" != "Windows" ]; then | |
egrep 'any.aeson|any.base|any.bytestring|any.containers|any.filepath|any.tasty|any.text|any.unordered-containers' ../cabal.project.freeze | |
fi | |
- name: Test | |
working-directory: ./hvega | |
run: | | |
cabal test all | |
# test the hvega/stack.yaml setup (so need to keep the versions up to date) | |
stack: | |
name: stack / ghc ${{ matrix.ghc }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
stack: ["latest"] | |
ghc: ["9.4"] | |
steps: | |
- uses: actions/checkout@v3 | |
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main' | |
- uses: haskell/actions/setup@v2 | |
name: Setup Haskell Stack | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
enable-stack: true | |
stack-version: ${{ matrix.stack }} | |
- uses: actions/[email protected] | |
name: Cache ~/.stack | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-${{ matrix.ghc }}-stack | |
- name: Install dependencies | |
working-directory: ./hvega | |
run: | | |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks --only-dependencies | |
- name: Build | |
working-directory: ./hvega | |
run: | | |
stack build --system-ghc --test --bench --no-run-tests --no-run-benchmarks | |
- name: List | |
working-directory: ./hvega | |
run: | | |
stack list aeson | |
stack list aeson-pretty | |
stack list base | |
stack list bytestring | |
stack list containers | |
stack list filepath | |
stack list tasty | |
stack list tasty-golden | |
stack list text | |
stack list unordered-containers | |
- name: Test | |
working-directory: ./hvega | |
run: | | |
stack test --system-ghc |