From 89575107b7924440092d2ad8e23403ec2d02360a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Laurent?= Date: Sat, 18 Feb 2023 09:35:15 +0100 Subject: [PATCH] Github actions --- .github/workflows/Stack-lts.yml | 39 +++++++++++++++++++++++++++++ .github/workflows/Stack-nightly.yml | 33 ++++++++++++++++++++++++ .hlint.yaml | 5 ++++ README.md | 6 +++++ stack.yaml | 2 +- stack.yaml.lock | 7 ++++++ 6 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/Stack-lts.yml create mode 100644 .github/workflows/Stack-nightly.yml create mode 100644 .hlint.yaml diff --git a/.github/workflows/Stack-lts.yml b/.github/workflows/Stack-lts.yml new file mode 100644 index 0000000..c710cda --- /dev/null +++ b/.github/workflows/Stack-lts.yml @@ -0,0 +1,39 @@ +name: Stack-lts + +on: + pull_request: + push: + branches: [main, master] + +jobs: + test: + strategy: + matrix: + runner: + - ubuntu-latest + - macOS-latest + - windows-latest + + resolver: + - lts # ghc-9.2 (as of writing) + - lts-20.11 # ghc-9.2 + - lts-19.33 # ghc-9.0 + - lts-18.28 # ghc-8.10 + + fail-fast: false + + runs-on: ${{ matrix.runner }} + + steps: + - uses: actions/checkout@v3 + - uses: freckle/stack-action@v3 + + - id: stack + uses: freckle/stack-action@v3 + with: + stack-arguments: --resolver ${{ matrix.resolver }} --copy-bins --coverage + + - uses: actions/upload-artifact@v2 + with: + name: coverage-report + path: ${{ steps.stack.outputs.local-hpc-root }} \ No newline at end of file diff --git a/.github/workflows/Stack-nightly.yml b/.github/workflows/Stack-nightly.yml new file mode 100644 index 0000000..e02e7f6 --- /dev/null +++ b/.github/workflows/Stack-nightly.yml @@ -0,0 +1,33 @@ +name: Stack-nightly + +on: + pull_request: + push: + branches: [main, master] + +jobs: + test: + strategy: + matrix: + runner: + - ubuntu-latest + - macOS-latest + - windows-latest + + fail-fast: false + + runs-on: ${{ matrix.runner }} + + steps: + - uses: actions/checkout@v3 + - uses: freckle/stack-action@v3 + + - id: stack + uses: freckle/stack-action@v3 + with: + stack-arguments: --resolver nightly --copy-bins --coverage + + - uses: actions/upload-artifact@v2 + with: + name: coverage-report + path: ${{ steps.stack.outputs.local-hpc-root }} \ No newline at end of file diff --git a/.hlint.yaml b/.hlint.yaml new file mode 100644 index 0000000..e7b8a95 --- /dev/null +++ b/.hlint.yaml @@ -0,0 +1,5 @@ +## https://github.com/ndmitchell/hlint/blob/master/.hlint.yaml#L59 +## https://github.com/commercialhaskell/stack/blob/master/.hlint.yaml +- ignore: {name: "Use head"} +- ignore: {name: "Use camelCase"} + diff --git a/README.md b/README.md index 980accb..45542ef 100644 --- a/README.md +++ b/README.md @@ -1 +1,7 @@ # jacobi-elliptic + + +[![Stack-lts](https://github.com/stla/jacobi-elliptic/actions/workflows/Stack-lts.yml/badge.svg)](https://github.com/stla/jacobi-elliptic/actions/workflows/Stack-lts.yml) +[![Stack-nightly](https://github.com/stla/jacobi-elliptic/actions/workflows/Stack-nightly.yml/badge.svg)](https://github.com/stla/jacobi-elliptic/actions/workflows/Stack-nightly.yml) + + diff --git a/stack.yaml b/stack.yaml index cc26a58..69e309a 100644 --- a/stack.yaml +++ b/stack.yaml @@ -30,7 +30,6 @@ resolver: lts-20.11 # - wai packages: - . -- ../jacobi-theta # Dependency packages to be pulled from upstream that are not in the resolver. # These entries can reference officially published versions as well as @@ -43,6 +42,7 @@ packages: # extra-deps: - elliptic-integrals-0.1.0.0 +- jacobi-theta-0.1.0.0 # Override default flag values for local packages and extra-deps # flags: {} diff --git a/stack.yaml.lock b/stack.yaml.lock index f58722e..b12f8ce 100644 --- a/stack.yaml.lock +++ b/stack.yaml.lock @@ -11,6 +11,13 @@ packages: size: 674 original: hackage: elliptic-integrals-0.1.0.0 +- completed: + hackage: jacobi-theta-0.1.0.0@sha256:32e17e4ad80b4db818510c120af85cd571112b608c1b5ccc75462236aac08e36,1533 + pantry-tree: + sha256: 1a336247149a646189ea90afdcd9281c3cf3801280d4b088c54aeed22ef08efc + size: 427 + original: + hackage: jacobi-theta-0.1.0.0 snapshots: - completed: sha256: adbc602422dde10cc330175da7de8609e70afc41449a7e2d6e8b1827aa0e5008