mirror of
https://github.com/github/semantic.git
synced 2024-11-29 21:52:59 +03:00
75 lines
2.7 KiB
YAML
75 lines
2.7 KiB
YAML
name: Haskell CI
|
|
|
|
on:
|
|
# Trigger the workflow on push or pull request,
|
|
# but only for the master branch
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
name: ghc ${{ matrix.ghc }}
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
ghc: ["8.8.1"]
|
|
cabal: ["3.0"]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
|
|
|
|
- uses: actions/setup-haskell@v1
|
|
name: Setup Haskell
|
|
with:
|
|
ghc-version: ${{ matrix.ghc }}
|
|
cabal-version: ${{ matrix.cabal }}
|
|
|
|
- uses: actions/cache@v1
|
|
name: Cache ~/.cabal/packages
|
|
with:
|
|
path: ~/.cabal/packages
|
|
key: ${{ runner.os }}-${{ matrix.ghc }}-v1-cabal-packages
|
|
|
|
- uses: actions/cache@v1
|
|
name: Cache ~/.cabal/store
|
|
with:
|
|
path: ~/.cabal/store
|
|
key: ${{ runner.os }}-${{ matrix.ghc }}-v11-cabal-store
|
|
|
|
- uses: actions/cache@v1
|
|
name: Cache dist-newstyle
|
|
with:
|
|
path: dist-newstyle
|
|
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ matrix.cabal }}-v1-semantic-dist
|
|
|
|
# - name: hlint
|
|
# run: |
|
|
# test -f dist-newstyle/hlint || cabal install hlint --installdir=dist-newstyle
|
|
# dist-newstyle/hlint src semantic-python
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
cabal v2-update
|
|
cabal v2-configure --project-file=cabal.project.ci --disable-optimization --enable-benchmarks --enable-tests --write-ghc-environment-files=always -j2
|
|
cabal v2-build --project-file=cabal.project.ci all --only-dependencies
|
|
|
|
- name: Build & test
|
|
run: |
|
|
cabal v2-build --project-file=cabal.project.ci
|
|
cabal v2-run --project-file=cabal.project.ci semantic:test
|
|
cabal v2-run --project-file=cabal.project.ci semantic-core:test
|
|
cabal v2-run --project-file=cabal.project.ci semantic-go:test
|
|
cabal v2-run --project-file=cabal.project.ci semantic-java:test
|
|
cabal v2-run --project-file=cabal.project.ci semantic-json:test
|
|
cabal v2-run --project-file=cabal.project.ci semantic-python:test
|
|
cabal v2-run --project-file=cabal.project.ci semantic-python:test:compiling
|
|
cabal v2-run --project-file=cabal.project.ci semantic-python:test:graphing
|
|
cabal v2-run --project-file=cabal.project.ci semantic-ruby:test
|
|
cabal v2-run --project-file=cabal.project.ci semantic-tsx:test
|
|
cabal v2-run --project-file=cabal.project.ci semantic-typescript:test
|
|
cd semantic-source; cabal v2-run --project-file=cabal.project.ci semantic-source:test; cd ..
|
|
cd semantic-source; cabal v2-run --project-file=cabal.project.ci semantic-source:doctest -- src; cd ..
|