1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-17 11:51:42 +03:00
juvix/.github/workflows/ci.yml
janmasrovira 13ce663fe1
bump stackage version and remove allow-newer (#76)
* bump stackage version and remove allow-newer

* update ci

* [chore] Invalidate CI cache

Co-authored-by: Paul Cadman <git@paulcadman.dev>
2022-05-04 12:57:42 +02:00

111 lines
2.6 KiB
YAML

name: MiniJuvix CI
on:
push:
branches: [ main , dev ]
pull_request:
branches:
- main
- dev
jobs:
ormolu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: mrkkrp/ormolu-action@v5
with:
extra-args: >-
--ghc-opt -XDerivingStrategies
--ghc-opt -XImportQualifiedPost
--ghc-opt -XMultiParamTypeClasses
--ghc-opt -XStandaloneDeriving
--ghc-opt -XTemplateHaskell
--ghc-opt -XUnicodeSyntax
hlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Set up HLint'
uses: rwe/actions-hlint-setup@v1
with:
version: '3.1.6'
- name: 'Run HLint'
uses: rwe/actions-hlint-run@v2.0.1
with:
path: '["src/", "app/", "test/"]'
fail-on: warning
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest , macOS-latest ]
ghc: ["9.2.2"]
steps:
- uses: actions/cache@v3
name: Cache Stack
id: cache
env:
cache-name: cache-env
with:
path: |
~/.stack
main/.stack-work
main/.hie
key: ${{ runner.os }}-v1-build-${{ matrix.ghc }}-${{ hashFiles('main/src/**/*.hs', 'main/app/**/*.hs', 'main/test/**/*.hs', 'main/package.yaml', 'main/stack.yaml') }}
restore-keys: |
${{ runner.os }}-v1-build-${{ matrix.ghc }}-
${{ runner.os }}-v1-build-
${{ runner.os }}-v1-
- uses: haskell/actions/setup@v1
name: Setup Haskell
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: true
stack-version: 'latest'
- name: Checkout our repository
uses: actions/checkout@v2
with:
path: main
- name: Build Haskell Project
run: |
cd main
make build
- name: Download MiniJuvix-stdlib
run: |
cd main
make minijuvix-stdlib
test:
needs: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macOS-latest , ubuntu-latest ]
ghc: ["9.2.2"]
steps:
- uses: actions/cache@v3
id: cache-build
with:
path: |
~/.stack
main/.stack-work/
main/.hie
key: ${{ runner.os }}-v1-build-${{ matrix.ghc }}-
- name: Checkout the main repository
uses: actions/checkout@v2
with:
path: main
- name: Test suite
id: test
run: |
cd main
make test