mirror of
https://github.com/higherkindness/mu-haskell.git
synced 2024-10-26 15:49:00 +03:00
Add Stack to Github Actions CI 🧪 (lts-15) (#155)
Co-authored-by: Alejandro Serrano <trupill@gmail.com>
This commit is contained in:
parent
5954d26cb8
commit
a751271e8c
6
.github/workflows/deploy.yml
vendored
6
.github/workflows/deploy.yml
vendored
@ -9,6 +9,12 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: mstksg/setup-stack@v1
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.stack
|
||||
key: dot-stack-${{ hashFiles('stack.yaml') }}
|
||||
restore-keys: |
|
||||
dot-stack-
|
||||
- name: Get Standalone Haddock
|
||||
run: stack install standalone-haddock
|
||||
- name: Get rdkafka
|
||||
|
44
.github/workflows/haskell.yml
vendored
44
.github/workflows/haskell.yml
vendored
@ -5,38 +5,14 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: cachix/install-nix-action@v7
|
||||
- uses: cachix/cachix-action@v4
|
||||
- uses: mstksg/setup-stack@v1
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
name: 47deg
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
|
||||
test_stack_templates:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: mstksg/setup-stack@v1
|
||||
|
||||
- uses: actions/checkout@v1
|
||||
|
||||
- uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.stack
|
||||
key: dot-stack-${{ hashFiles('templates/*.hsfiles') }}
|
||||
restore-keys: |
|
||||
dot-stack-
|
||||
|
||||
- name: Generate Avro RPC server from Stack template
|
||||
run: stack new muhaskellavro https://raw.githubusercontent.com/higherkindness/mu-haskell/master/templates/grpc-server-avro.hsfiles -p "author-email:haskell.curry@47deg.com" -p "author-name:Haskell Curry"
|
||||
working-directory: /tmp
|
||||
|
||||
- name: Build the generated Avro RPC server
|
||||
run: stack build
|
||||
working-directory: /tmp/muhaskellavro
|
||||
|
||||
- name: Generate Protobuf RPC server from Stack template
|
||||
run: stack new muhaskellprotobuf https://raw.githubusercontent.com/higherkindness/mu-haskell/master/templates/grpc-server-protobuf.hsfiles -p "author-email:haskell.curry@47deg.com" -p "author-name:Haskell Curry"
|
||||
working-directory: /tmp
|
||||
|
||||
- name: Build the generated Protobuf RPC server
|
||||
run: stack build
|
||||
working-directory: /tmp/muhaskellprotobuf
|
||||
path: ~/.stack
|
||||
key: dot-stack-${{ hashFiles('stack.yaml') }}
|
||||
restore-keys: |
|
||||
dot-stack-
|
||||
- name: Get rdkafka
|
||||
run: sudo apt-get install librdkafka-dev
|
||||
- name: Compile with Stack
|
||||
run: stack build
|
||||
|
16
RELEASE.md
Normal file
16
RELEASE.md
Normal file
@ -0,0 +1,16 @@
|
||||
# Releasing a new version of Mu-Haskell
|
||||
|
||||
1. Run `./test-schema.sh` and check that no errors are found
|
||||
- If found, abort and open issue
|
||||
2. Run `./test-templates.sh` and check that no errors are found
|
||||
- If found, update templates in `templates` folder and open a PR
|
||||
3. Publish a new release in GitHub:
|
||||
- Tag by running `git tag -a vX.Y -m "Release X.Y"`
|
||||
- Push the tag `git push --tags`
|
||||
- Create a new release in [GitHub](https://github.com/higherkindness/mu-haskell/releases/new) for that tag, or if using [`hub`](https://hub.github.com/hub-release.1.html), run `hub release create vX.Y`
|
||||
5. For each package, run the following commands:
|
||||
- create the package: `cabal sdist package`
|
||||
- publish a candidate: `cabal upload route-to.tar.gz`, and check it
|
||||
- publish definitely: `cabal upload --publish route-to.tar.gz`
|
||||
- create the docs: `cabal v2-haddock --builddir="dist-newstyle" --haddock-for-hackage --enable-doc package`
|
||||
- publish docs: `cabal upload -d --publish route-to-docs.tar.gz`
|
@ -10,7 +10,6 @@ import Control.Concurrent.STM
|
||||
import Control.Monad.IO.Class (liftIO)
|
||||
import Data.Int
|
||||
import Data.List (find)
|
||||
import Data.Maybe (maybe)
|
||||
|
||||
import Mu.GRpc.Server
|
||||
import Mu.Server
|
||||
|
49
stack-14.yaml
Normal file
49
stack-14.yaml
Normal file
@ -0,0 +1,49 @@
|
||||
resolver: lts-14.27
|
||||
allow-newer: true
|
||||
|
||||
packages:
|
||||
- core/schema
|
||||
- core/rpc
|
||||
- core/optics
|
||||
- adapter/avro
|
||||
- adapter/protobuf
|
||||
- adapter/persistent
|
||||
- adapter/kafka
|
||||
- grpc/common
|
||||
- grpc/client
|
||||
- grpc/server
|
||||
- graphql
|
||||
- examples/health-check
|
||||
- examples/route-guide
|
||||
- examples/seed
|
||||
- examples/todolist
|
||||
- examples/with-persistent
|
||||
- compendium-client
|
||||
|
||||
extra-deps:
|
||||
- http2-client-0.9.0.0
|
||||
- http2-client-grpc-0.8.0.0
|
||||
- http2-grpc-proto3-wire-0.1.0.0
|
||||
- http2-grpc-types-0.5.0.0
|
||||
- proto3-wire-1.1.0
|
||||
- warp-grpc-0.4.0.0
|
||||
- hw-kafka-client-3.0.0
|
||||
- hw-kafka-conduit-2.6.0
|
||||
- git: https://github.com/hasura/graphql-parser-hs.git
|
||||
commit: 1380495a7b3269b70a7ab3081d745a5f54171a9c
|
||||
# missing in LTS 14.x
|
||||
- AC-Angle-1.0
|
||||
- avro-0.4.7.0
|
||||
- conduit-1.3.2
|
||||
- HasBigDecimal-0.1.1
|
||||
- indexed-profunctors-0.1
|
||||
- language-protobuf-1.0.1
|
||||
- language-avro-0.1.2.0
|
||||
- optics-core-0.2
|
||||
- primitive-0.7.0.0
|
||||
- primitive-extras-0.8
|
||||
- primitive-unlifted-0.1.2.0
|
||||
- regex-base-0.94.0.0
|
||||
- regex-tdfa-1.3.1.0
|
||||
- stm-hamt-1.2.0.4
|
||||
- stm-containers-1.1.0.4
|
@ -1,4 +1,4 @@
|
||||
resolver: nightly-2020-02-28
|
||||
resolver: nightly-2020-03-25
|
||||
allow-newer: true
|
||||
|
||||
packages:
|
||||
@ -21,21 +21,13 @@ packages:
|
||||
- compendium-client
|
||||
|
||||
extra-deps:
|
||||
- conduit-1.3.2
|
||||
- http2-client-0.9.0.0
|
||||
- http2-client-grpc-0.8.0.0
|
||||
- http2-grpc-proto3-wire-0.1.0.0
|
||||
- http2-grpc-types-0.5.0.0
|
||||
- proto3-wire-1.1.0
|
||||
- http2-grpc-proto3-wire-0.1.0.0
|
||||
- warp-grpc-0.4.0.0
|
||||
- http2-client-grpc-0.8.0.0
|
||||
- avro-0.4.7.0
|
||||
- language-protobuf-1.0.1
|
||||
- language-avro-0.1.2.0
|
||||
- hw-kafka-client-3.0.0
|
||||
- hw-kafka-conduit-2.6.0
|
||||
- HasBigDecimal-0.1.1
|
||||
- regex-tdfa-1.3.1.0
|
||||
- git: https://github.com/hasura/graphql-parser-hs.git
|
||||
commit: 1380495a7b3269b70a7ab3081d745a5f54171a9c
|
||||
- wai-route-1.0.0
|
||||
- pattern-trie-0.1.0
|
||||
|
25
stack.yaml
25
stack.yaml
@ -1,4 +1,4 @@
|
||||
resolver: lts-14.27
|
||||
resolver: lts-15.5
|
||||
allow-newer: true
|
||||
|
||||
packages:
|
||||
@ -21,32 +21,13 @@ packages:
|
||||
- compendium-client
|
||||
|
||||
extra-deps:
|
||||
- conduit-1.3.2
|
||||
- http2-client-0.9.0.0
|
||||
- http2-client-grpc-0.8.0.0
|
||||
- http2-grpc-proto3-wire-0.1.0.0
|
||||
- http2-grpc-types-0.5.0.0
|
||||
- proto3-wire-1.1.0
|
||||
- http2-grpc-proto3-wire-0.1.0.0
|
||||
- warp-grpc-0.4.0.0
|
||||
- http2-client-grpc-0.8.0.0
|
||||
- avro-0.4.7.0
|
||||
- language-protobuf-1.0.1
|
||||
- language-avro-0.1.2.0
|
||||
- hw-kafka-client-3.0.0
|
||||
- hw-kafka-conduit-2.6.0
|
||||
- HasBigDecimal-0.1.1
|
||||
- regex-base-0.94.0.0
|
||||
- regex-tdfa-1.3.1.0
|
||||
- git: https://github.com/hasura/graphql-parser-hs.git
|
||||
commit: 1380495a7b3269b70a7ab3081d745a5f54171a9c
|
||||
- wai-route-1.0.0
|
||||
- pattern-trie-0.1.0
|
||||
# missing in the current LTS
|
||||
- primitive-0.7.0.0
|
||||
- primitive-extras-0.8
|
||||
- primitive-unlifted-0.1.2.0
|
||||
- stm-hamt-1.2.0.4
|
||||
- stm-containers-1.1.0.4
|
||||
- AC-Angle-1.0
|
||||
- optics-core-0.2
|
||||
- indexed-profunctors-0.1
|
||||
|
||||
|
17
test-templates.sh
Executable file
17
test-templates.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir template-check
|
||||
cd template-check
|
||||
|
||||
stack new muavro https://raw.githubusercontent.com/higherkindness/mu-haskell/master/templates/grpc-server-avro.hsfiles -p "author-email:haskell.curry@47deg.com" -p "author-name:Haskell Curry"
|
||||
cd muavro
|
||||
stack build
|
||||
cd ..
|
||||
|
||||
stack new muprotobuf https://raw.githubusercontent.com/higherkindness/mu-haskell/master/templates/grpc-server-protobuf.hsfiles -p "author-email:haskell.curry@47deg.com" -p "author-name:Haskell Curry"
|
||||
cd muprotobuf
|
||||
stack build
|
||||
cd ..
|
||||
|
||||
cd ..
|
||||
rm -rf template-check
|
Loading…
Reference in New Issue
Block a user