mirror of
https://github.com/Haskell-Things/ImplicitCAD.git
synced 2024-09-17 16:08:01 +03:00
Update CI
This commit is contained in:
parent
2d026d39bd
commit
fc71167f51
18
.github/workflows/ci.dhall
vendored
18
.github/workflows/ci.dhall
vendored
@ -1,17 +1,7 @@
|
|||||||
let haskellCi = https://raw.githubusercontent.com/sorki/github-actions-dhall/pending/haskell-ci.dhall
|
let haskellCi =
|
||||||
|
https://raw.githubusercontent.com/sorki/github-actions-dhall/main/haskell-ci.dhall
|
||||||
|
|
||||||
in haskellCi.generalCi
|
in haskellCi.generalCi
|
||||||
haskellCi.matrixSteps
|
(haskellCi.withHlint haskellCi.defaultCabalSteps)
|
||||||
( Some
|
(haskellCi.DhallMatrix::{=} with ghc = haskellCi.defaultGHC3)
|
||||||
{ ghc =
|
|
||||||
[ haskellCi.GHC.GHC947
|
|
||||||
, haskellCi.GHC.GHC902
|
|
||||||
, haskellCi.GHC.GHC8107
|
|
||||||
]
|
|
||||||
, cabal = [ haskellCi.Cabal.Cabal310 ]
|
|
||||||
}
|
|
||||||
)
|
|
||||||
// { on = [ haskellCi.Event.push
|
|
||||||
, haskellCi.Event.pull_request ]
|
|
||||||
}
|
|
||||||
: haskellCi.CI.Type
|
: haskellCi.CI.Type
|
||||||
|
10
.github/workflows/ci.sh
vendored
10
.github/workflows/ci.sh
vendored
@ -1,10 +1,12 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
# Script by @fisx
|
||||||
|
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
|
# cd into the dir where this script is placed
|
||||||
cd "$( dirname "${BASH_SOURCE[0]}" )"
|
cd "$( dirname "${BASH_SOURCE[0]}" )"
|
||||||
|
|
||||||
echo "regenerating .github/workflows/ci.yaml..."
|
echo "regenerating .github/workflows/ci.yaml"
|
||||||
|
|
||||||
# based on https://github.com/vmchale/github-actions-dhall
|
which dhall-to-yaml-ng || cabal install dhall-yaml
|
||||||
which dhall-to-yaml || cabal install dhall-yaml
|
dhall-to-yaml-ng --generated-comment --file ci.dhall > ci.yaml
|
||||||
dhall-to-yaml --file ci.dhall > ci.yaml
|
|
||||||
|
87
.github/workflows/ci.yaml
vendored
87
.github/workflows/ci.yaml
vendored
@ -1,46 +1,57 @@
|
|||||||
|
# Code generated by dhall-to-yaml. DO NOT EDIT.
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
name: "GHC ${{ matrix.ghc }}, Cabal ${{ matrix.cabal }}, OS ${{ matrix.os }}"
|
||||||
|
"runs-on": "${{ matrix.os }}"
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v3"
|
- uses: "actions/checkout@v4"
|
||||||
- id: setup-haskell-cabal
|
with:
|
||||||
uses: "haskell-actions/setup@v2"
|
submodules: recursive
|
||||||
with:
|
- id: "setup-haskell-cabal"
|
||||||
cabal-version: "${{ matrix.cabal }}"
|
uses: "haskell-actions/setup@v2"
|
||||||
enable-stack: false
|
with:
|
||||||
ghc-version: "${{ matrix.ghc }}"
|
"cabal-version": "${{ matrix.cabal }}"
|
||||||
- name: Update Hackage repository
|
"ghc-version": "${{ matrix.ghc }}"
|
||||||
run: cabal update
|
- name: Update Hackage repository
|
||||||
- name: cabal.project.local.ci
|
run: cabal update
|
||||||
run: |
|
- name: cabal.project.local.ci
|
||||||
if [ -e cabal.project.local.ci ]; then
|
run: |
|
||||||
cp cabal.project.local.ci cabal.project.local
|
if [ -e cabal.project.local.ci ]; then
|
||||||
fi
|
cp cabal.project.local.ci cabal.project.local
|
||||||
- name: freeze
|
fi
|
||||||
run: cabal freeze --enable-tests --enable-benchmarks
|
- name: freeze
|
||||||
- uses: "actions/cache@v3"
|
run: "cabal freeze --enable-tests --enable-benchmarks"
|
||||||
with:
|
- uses: "actions/cache@v3"
|
||||||
key: "${{ runner.os }}-${{ matrix.ghc }}-cabal-${{ hashFiles('cabal.project.freeze') }}"
|
with:
|
||||||
path: |
|
key: "${{ matrix.os }}-${{ matrix.ghc }}-${{ matrix.cabal}}-${{ hashFiles('cabal.project.freeze') }}"
|
||||||
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
|
path: |
|
||||||
dist-newstyle
|
${{ steps.setup-haskell-cabal.outputs.cabal-store }}
|
||||||
- name: Install dependencies
|
dist-newstyle
|
||||||
run: cabal build all --enable-tests --enable-benchmarks --only-dependencies
|
- name: Install dependencies
|
||||||
- name: build all
|
run: "cabal build all --enable-tests --enable-benchmarks --only-dependencies"
|
||||||
run: cabal build all --enable-tests --enable-benchmarks
|
- name: build all
|
||||||
- name: test all
|
run: "cabal build all --enable-tests --enable-benchmarks"
|
||||||
run: cabal test all --enable-tests
|
- name: test all
|
||||||
- name: haddock all
|
run: "cabal test all --enable-tests"
|
||||||
run: cabal haddock all
|
- name: haddock all
|
||||||
|
run: cabal haddock all
|
||||||
|
- name: "Install and run hlint (optional)"
|
||||||
|
run: |
|
||||||
|
cabal install hlint
|
||||||
|
hlint -g --no-exit-code
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
cabal:
|
cabal:
|
||||||
- '3.10'
|
- '3.10'
|
||||||
ghc:
|
ghc:
|
||||||
- '9.4.7'
|
- '9.6.3'
|
||||||
- '9.0.2'
|
- '9.4.7'
|
||||||
- '8.10.7'
|
- '9.2.8'
|
||||||
|
os:
|
||||||
|
- "ubuntu-latest"
|
||||||
name: Haskell CI
|
name: Haskell CI
|
||||||
on:
|
'on':
|
||||||
- push
|
pull_request: {}
|
||||||
- pull_request
|
push: {}
|
||||||
|
schedule:
|
||||||
|
- cron: "4 20 10 * *"
|
||||||
|
Loading…
Reference in New Issue
Block a user