mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 08:02:15 +03:00
Combine oss and pro server configuration
https://github.com/hasura/graphql-engine-mono/pull/1983 GitOrigin-RevId: 91069bd5d1f9c5a166eae2317cf4435220b472b0
This commit is contained in:
parent
7b863a1b3b
commit
046da3caca
@ -234,15 +234,15 @@ jobs:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- cabal-store-v3-{{ checksum "server/cabal.project" }}-{{ checksum "server/graphql-engine.cabal" }}-{{ checksum "server/cabal.project.freeze" }}
|
||||
- cabal-store-v3-{{ checksum "server/cabal.project" }}-{{ checksum "server/graphql-engine.cabal" }}-
|
||||
- cabal-store-v3-{{ checksum "server/cabal.project" }}-
|
||||
- cabal-store-v3-{{ checksum "cabal.project" }}-{{ checksum "server/graphql-engine.cabal" }}-{{ checksum "cabal.project.freeze" }}
|
||||
- cabal-store-v3-{{ checksum "cabal.project" }}-{{ checksum "server/graphql-engine.cabal" }}-
|
||||
- cabal-store-v3-{{ checksum "cabal.project" }}-
|
||||
- cabal-store-v3-
|
||||
- restore_cache:
|
||||
keys:
|
||||
- cabal-packages-v3-{{ checksum "server/cabal.project" }}-{{ checksum "server/graphql-engine.cabal" }}-{{ checksum "server/cabal.project.freeze" }}
|
||||
- cabal-packages-v3-{{ checksum "server/cabal.project" }}-{{ checksum "server/graphql-engine.cabal" }}-
|
||||
- cabal-packages-v3-{{ checksum "server/cabal.project" }}-
|
||||
- cabal-packages-v3-{{ checksum "cabal.project" }}-{{ checksum "server/graphql-engine.cabal" }}-{{ checksum "cabal.project.freeze" }}
|
||||
- cabal-packages-v3-{{ checksum "cabal.project" }}-{{ checksum "server/graphql-engine.cabal" }}-
|
||||
- cabal-packages-v3-{{ checksum "cabal.project" }}-
|
||||
- cabal-packages-v3-
|
||||
- run:
|
||||
name: Build the binary
|
||||
@ -254,11 +254,11 @@ jobs:
|
||||
# options that have performance implications.
|
||||
make ci-build
|
||||
- save_cache:
|
||||
key: cabal-packages-v3-{{ checksum "server/cabal.project" }}-{{ checksum "server/graphql-engine.cabal" }}-{{ checksum "server/cabal.project.freeze" }}
|
||||
key: cabal-packages-v3-{{ checksum "cabal.project" }}-{{ checksum "server/graphql-engine.cabal" }}-{{ checksum "cabal.project.freeze" }}
|
||||
paths:
|
||||
- ~/.cabal/packages
|
||||
- save_cache:
|
||||
key: cabal-store-v3-{{ checksum "server/cabal.project" }}-{{ checksum "server/graphql-engine.cabal" }}-{{ checksum "server/cabal.project.freeze" }}
|
||||
key: cabal-store-v3-{{ checksum "cabal.project" }}-{{ checksum "server/graphql-engine.cabal" }}-{{ checksum "cabal.project.freeze" }}
|
||||
paths:
|
||||
- ~/.cabal/store
|
||||
- store_artifacts:
|
||||
|
@ -12,20 +12,14 @@
|
||||
-- $ cabal new-build --project-file=cabal.project.myconfig
|
||||
--
|
||||
-- See: https://www.haskell.org/cabal/users-guide/nix-local-build.html#configuring-builds-with-cabal-project
|
||||
packages: .
|
||||
|
||||
packages: server
|
||||
|
||||
constraints:
|
||||
-- ensure we don't end up with a freeze file that forces an incompatible
|
||||
-- version in CI for Setup.hs scripts.
|
||||
-- Ensure we don't end up with a freeze file that forces an incompatible
|
||||
-- version in CI for `Setup.hs` scripts.
|
||||
setup.Cabal <3.4
|
||||
|
||||
allow-newer:
|
||||
-- dependent-map depends on constraints-extras, but its bounds have not yet
|
||||
-- been relaxed for GHC 8.10.
|
||||
constraints-extras-0.3.0.2:base,
|
||||
constraints-extras-0.3.0.2:constraints,
|
||||
constraints-extras-0.3.0.2:template-haskell
|
||||
|
||||
package *
|
||||
optimization: 2
|
||||
-- For tooling, e.g. 'weeder', and IDE-like stuff:
|
||||
@ -82,3 +76,4 @@ source-repository-package
|
||||
type: git
|
||||
location: https://github.com/hasura/ekg-json.git
|
||||
tag: 098e3a5951c4991c823815706f1f58f608bb6ec3
|
||||
|
@ -18,3 +18,4 @@ package graphql-engine
|
||||
optimization: 0
|
||||
documentation: false
|
||||
flags: +developer
|
||||
|
@ -15,8 +15,8 @@ package *
|
||||
|
||||
package graphql-engine
|
||||
-- NOTE: this seems to work so long as there is no 'ghc-options: -O2' in the cabal file,
|
||||
-- but new-build will report 'Build profile: -O1' for some reason.
|
||||
-- See:https://github.com/haskell/cabal/issues/6221
|
||||
-- but new-build will report 'Build profile: -O1' for some reason.
|
||||
-- See:https://github.com/haskell/cabal/issues/6221
|
||||
optimization: 0
|
||||
documentation: false
|
||||
flags: +developer
|
||||
@ -36,3 +36,4 @@ package graphql-engine
|
||||
-- which substentially improves compilation time.
|
||||
executable-dynamic: True
|
||||
library-vanilla: False
|
||||
|
@ -1,6 +1,8 @@
|
||||
active-repositories: hackage.haskell.org:merge
|
||||
constraints: any.Cabal ==3.2.0.0,
|
||||
any.Glob ==0.10.1,
|
||||
any.HTTP ==4000.3.15,
|
||||
HTTP -conduit10 -mtl1 +network-uri -warn-as-error -warp-tests,
|
||||
any.HUnit ==1.6.2.0,
|
||||
any.Only ==0.1,
|
||||
any.QuickCheck ==2.14.2,
|
||||
@ -29,7 +31,8 @@ constraints: any.Cabal ==3.2.0.0,
|
||||
any.assoc ==1.0.2,
|
||||
any.async ==2.2.2,
|
||||
async -bench,
|
||||
any.atomic-primops == 0.8.4,
|
||||
any.atomic-primops ==0.8.4,
|
||||
atomic-primops -debug,
|
||||
any.attoparsec ==0.13.2.5,
|
||||
attoparsec -developer,
|
||||
any.attoparsec-iso8601 ==1.0.2.0,
|
||||
@ -59,6 +62,7 @@ constraints: any.Cabal ==3.2.0.0,
|
||||
any.bytestring ==0.10.10.0,
|
||||
any.bytestring-builder ==0.10.8.2.0,
|
||||
bytestring-builder +bytestring_has_builder,
|
||||
any.bytestring-lexing ==0.5.0.2,
|
||||
any.bytestring-strict-builder ==0.4.5.3,
|
||||
any.cabal-doctest ==1.0.8,
|
||||
any.call-stack ==0.3.0,
|
||||
@ -129,16 +133,21 @@ constraints: any.Cabal ==3.2.0.0,
|
||||
double-conversion -developer,
|
||||
any.easy-file ==0.2.2,
|
||||
any.either ==5.0.1.1,
|
||||
any.ekg ==0.4.0.16,
|
||||
any.ekg-core ==0.1.1.7,
|
||||
any.ekg-json ==0.1.0.7,
|
||||
any.ekg-statsd ==0.2.5.0,
|
||||
any.entropy ==0.4.1.6,
|
||||
entropy -halvm,
|
||||
any.envy ==2.1.0.0,
|
||||
any.erf ==2.0.0.0,
|
||||
any.errors ==2.3.0,
|
||||
any.exceptions ==0.10.4,
|
||||
any.fail ==4.9.0.0,
|
||||
any.fast-logger ==3.0.2,
|
||||
any.file-embed ==0.0.13.0,
|
||||
any.filepath ==1.4.2.1,
|
||||
any.flush-queue ==1.0.0,
|
||||
any.focus ==1.0.2,
|
||||
any.foldl ==1.4.10,
|
||||
any.formatting ==7.1.1,
|
||||
@ -152,17 +161,20 @@ constraints: any.Cabal ==3.2.0.0,
|
||||
ghc-heap-view -prim-supports-any,
|
||||
any.ghc-prim ==0.6.1,
|
||||
any.ghci ==8.10.2,
|
||||
graphql-engine -profiling,
|
||||
any.graphql-parser ==0.2.0.0,
|
||||
any.groom ==0.1.2.1,
|
||||
any.happy ==1.20.0,
|
||||
any.hashable ==1.3.0.0,
|
||||
hashable -examples +integer-gmp +sse2 -sse41,
|
||||
any.hashable-time ==0.2.0.2,
|
||||
any.hashable-time ==0.2.1,
|
||||
hashable-time -old-locale,
|
||||
any.hashtables ==1.2.4.1,
|
||||
hashtables -bounds-checking -debug -detailed-profiling -portable -sse42 +unsafe-tricks,
|
||||
any.haskell-lexer ==1.1,
|
||||
any.haskell-src-exts ==1.23.1,
|
||||
any.hedgehog ==1.0.4,
|
||||
any.hedis ==0.14.2,
|
||||
hedis -dev,
|
||||
any.hourglass ==0.2.12,
|
||||
any.hpc ==0.6.1.0,
|
||||
any.hsc2hs ==0.68.7,
|
||||
@ -193,6 +205,9 @@ constraints: any.Cabal ==3.2.0.0,
|
||||
any.integer-logarithms ==1.0.3.1,
|
||||
integer-logarithms -check-bounds +integer-gmp,
|
||||
any.invariant ==0.5.4,
|
||||
any.io-streams ==1.5.2.1,
|
||||
io-streams +network -nointeractivetests +zlib,
|
||||
any.io-streams-haproxy ==1.0.1.0,
|
||||
any.iproute ==1.7.10,
|
||||
any.jose ==0.8.4,
|
||||
jose -demos,
|
||||
@ -209,6 +224,7 @@ constraints: any.Cabal ==3.2.0.0,
|
||||
any.lifted-base ==0.2.3.12,
|
||||
any.list-t ==1.0.4,
|
||||
any.loch-th ==0.2.2,
|
||||
any.logict ==0.7.0.3,
|
||||
any.math-functions ==0.3.4.1,
|
||||
math-functions +system-erf +system-expm1,
|
||||
any.memory ==0.15.0,
|
||||
@ -249,6 +265,7 @@ constraints: any.Cabal ==3.2.0.0,
|
||||
any.optics-extra ==0.3,
|
||||
any.optparse-applicative ==0.16.1.0,
|
||||
optparse-applicative +process,
|
||||
any.optparse-generic ==1.4.4,
|
||||
any.parallel ==3.2.2.0,
|
||||
any.parsec ==3.1.14.0,
|
||||
any.parsers ==0.12.10,
|
||||
@ -277,9 +294,12 @@ constraints: any.Cabal ==3.2.0.0,
|
||||
quickcheck-instances -bytestring-builder,
|
||||
any.quickcheck-io ==0.2.0,
|
||||
any.random ==1.1,
|
||||
any.readable ==0.3.1,
|
||||
any.reflection ==2.1.6,
|
||||
reflection -slow +template-haskell,
|
||||
any.regex-base ==0.94.0.0,
|
||||
any.regex-posix ==0.96.0.0,
|
||||
regex-posix -_regex-posix-clib,
|
||||
any.regex-tdfa ==1.3.1.0,
|
||||
regex-tdfa -force-o2,
|
||||
any.reroute ==0.6.0.0,
|
||||
@ -290,7 +310,8 @@ constraints: any.Cabal ==3.2.0.0,
|
||||
retry -lib-werror,
|
||||
any.rts ==1.0,
|
||||
any.safe ==0.3.19,
|
||||
any.safe-exceptions ==0.1.7.1,
|
||||
any.safe-exceptions ==0.1.7.2,
|
||||
any.scanner ==0.3.1,
|
||||
any.scientific ==0.3.6.2,
|
||||
scientific -bytestring-builder -integer-simple,
|
||||
any.semialign ==1.1.0.1,
|
||||
@ -305,6 +326,11 @@ constraints: any.Cabal ==3.2.0.0,
|
||||
shakespeare -test_coffee -test_export -test_roy,
|
||||
any.simple-sendfile ==0.2.30,
|
||||
simple-sendfile +allow-bsd,
|
||||
any.smallcheck ==1.2.1,
|
||||
any.snap-core ==1.0.4.2,
|
||||
snap-core -debug +network-uri -portable,
|
||||
any.snap-server ==1.1.2.0,
|
||||
snap-server -build-pong -build-testserver -debug -openssl -portable,
|
||||
any.socks ==0.6.1,
|
||||
any.some ==1.0.1,
|
||||
some +newtype-unsafe,
|
||||
@ -320,11 +346,20 @@ constraints: any.Cabal ==3.2.0.0,
|
||||
any.strict ==0.4.0.1,
|
||||
strict +assoc,
|
||||
any.superbuffer ==0.3.1.1,
|
||||
any.system-filepath ==0.4.14,
|
||||
any.tagged ==0.8.6.1,
|
||||
tagged +deepseq +transformers,
|
||||
any.tasty ==1.4.1,
|
||||
tasty +clock +unix,
|
||||
any.tasty-golden ==2.3.4,
|
||||
tasty-golden -build-example,
|
||||
any.tasty-hspec ==1.1.6,
|
||||
any.tasty-quickcheck ==0.10.1.2,
|
||||
any.tasty-smallcheck ==0.8.2,
|
||||
any.template-haskell ==2.16.0.0,
|
||||
any.terminal-size ==0.3.2.1,
|
||||
any.temporary ==1.3,
|
||||
any.terminfo ==0.4.1.4,
|
||||
any.terminal-size ==0.3.2.1,
|
||||
any.text ==1.2.3.2,
|
||||
any.text-builder ==0.6.6.1,
|
||||
any.text-conversions ==0.3.1,
|
||||
@ -355,6 +390,7 @@ constraints: any.Cabal ==3.2.0.0,
|
||||
any.type-equality ==1,
|
||||
any.type-hint ==0.1,
|
||||
any.typed-process ==0.2.6.0,
|
||||
any.unbounded-delays ==0.1.1.1,
|
||||
any.unix ==2.7.2.2,
|
||||
any.unix-compat ==0.5.3,
|
||||
unix-compat -old-time,
|
||||
@ -386,6 +422,8 @@ constraints: any.Cabal ==3.2.0.0,
|
||||
any.wai-logger ==2.3.6,
|
||||
any.warp ==3.3.14,
|
||||
warp +allow-sendfilefd -network-bytestring -warp-debug,
|
||||
any.wcwidth ==0.0.2,
|
||||
wcwidth -cli +split-base,
|
||||
any.websockets ==0.12.7.2,
|
||||
websockets -example,
|
||||
any.wl-pprint-annotated ==0.1.0.1,
|
||||
@ -399,5 +437,6 @@ constraints: any.Cabal ==3.2.0.0,
|
||||
any.yaml ==0.11.5.0,
|
||||
yaml +no-examples +no-exe,
|
||||
any.zlib ==0.6.2.2,
|
||||
zlib -bundled-c-zlib -non-blocking-ffi -pkg-config
|
||||
zlib -bundled-c-zlib -non-blocking-ffi -pkg-config,
|
||||
any.zlib-bindings ==0.1.1.5
|
||||
index-state: 2021-07-09T20:23:17Z
|
11
sample.hie.yaml
Normal file
11
sample.hie.yaml
Normal file
@ -0,0 +1,11 @@
|
||||
cradle:
|
||||
cabal:
|
||||
- path: "./server/src-lib"
|
||||
component: "graphql-engine:lib:graphql-engine"
|
||||
- path: "./server/src-exec"
|
||||
component: "graphql-engine:exe:graphql-engine"
|
||||
- path: "./server/src-test"
|
||||
component: "graphql-engine:test:graphql-engine-tests"
|
||||
- path: "./server/src-bench-cache"
|
||||
component: "graphql-engine:bench:cache"
|
||||
|
@ -243,7 +243,7 @@ function start_dbs() {
|
||||
#################################
|
||||
|
||||
if [ "$MODE" = "graphql-engine" ]; then
|
||||
cd "$PROJECT_ROOT/server"
|
||||
cd "$PROJECT_ROOT"
|
||||
# Existing tix files for a different hge binary will cause issues:
|
||||
rm -f graphql-engine.tix
|
||||
|
||||
@ -429,7 +429,7 @@ elif [ "$MODE" = "test" ]; then
|
||||
########################################
|
||||
### Integration / unit tests ###
|
||||
########################################
|
||||
cd "$PROJECT_ROOT/server"
|
||||
cd "$PROJECT_ROOT"
|
||||
|
||||
# Until we can use a real webserver for TestEventFlood, limit concurrency
|
||||
export HASURA_GRAPHQL_EVENTS_HTTP_POOL_SIZE=8
|
||||
|
@ -45,10 +45,9 @@ After making your changes
|
||||
|
||||
...and the server:
|
||||
|
||||
$ cd server
|
||||
$ ln -s cabal.project.dev cabal.project.local
|
||||
$ cabal new-update
|
||||
$ cabal new-build
|
||||
$ cabal new-build graphql-engine
|
||||
|
||||
To set up the project configuration to coincide with the testing scripts below, thus avoiding recompilation when testing locally, rather use `cabal.project.dev-sh.local` instead of `cabal.project.dev`:
|
||||
|
||||
@ -110,7 +109,7 @@ The following command can be used to build and launch a local `graphql-engine` i
|
||||
```
|
||||
cabal new-run -- exe:graphql-engine \
|
||||
--database-url='postgres://<user>:<password>@<host>:<port>/<dbname>' \
|
||||
serve --enable-console --console-assets-dir=../console/static/dist
|
||||
serve --enable-console --console-assets-dir=console/static/dist
|
||||
```
|
||||
|
||||
This will launch a server on port 8080, and it will serve the console assets if they were built with `npm run server-build` as mentioned above.
|
||||
|
@ -18,24 +18,24 @@ build_output := /build/_server_output
|
||||
# This glob is a pretty heavy hammer designed to work regardless of `cabal-install` version (see the
|
||||
# aforementioned link for why that’s tricky). If `cabal v2-*` ever gets a better way to do this,
|
||||
# please replace this with something less hacky.
|
||||
executables_glob := dist-newstyle/build/*/*/graphql-engine-*/**/opt/build/{graphql-engine/graphql-engine,graphql-engine-tests/graphql-engine-tests}
|
||||
executables_glob := ../dist-newstyle/build/*/*/graphql-engine-*/**/opt/build/{graphql-engine/graphql-engine,graphql-engine-tests/graphql-engine-tests}
|
||||
|
||||
# These are the directories where `cabal v2-build --enable-coverage` sticks .mix files. It would be
|
||||
# much better if cabal-install supported something like stack’s `stack hpc report`, which passes the
|
||||
# right `--hpcdir` options automatically.
|
||||
mix_dirs_glob := dist-newstyle/**/hpc/vanilla/mix/**/{graphql-engine-1.0.0,graphql-engine}/
|
||||
mix_dirs_glob := ../dist-newstyle/**/hpc/vanilla/mix/**/{graphql-engine-1.0.0,graphql-engine}/
|
||||
|
||||
# assumes this is built in circleci
|
||||
ci-build:
|
||||
## configure
|
||||
cp cabal.project.ci cabal.project.local
|
||||
cp cabal.project.ci ../cabal.project.local
|
||||
# Passing `--enable-coverage` to `cabal v2-build` appears to enable coverage for all packages, not
|
||||
# just local packages (at least as of cabal-install-2.4.1.0), so add `coverage: true` to the
|
||||
# `cabal.project.local` file in the appropriate package stanza.
|
||||
#
|
||||
# NOTE: enable_coverage is now unused, at time of this writing
|
||||
if [[ -n '$(enable_coverage)' ]]; then \
|
||||
printf '\npackage graphql-engine\n coverage: true\n' >> cabal.project.local; \
|
||||
printf '\npackage graphql-engine\n coverage: true\n' >> ../cabal.project.local; \
|
||||
fi
|
||||
cabal v2-update
|
||||
## build
|
||||
|
@ -1,10 +0,0 @@
|
||||
cradle:
|
||||
cabal:
|
||||
- path: "./src-lib"
|
||||
component: "lib:graphql-engine"
|
||||
- path: "./src-exec"
|
||||
component: "exe:graphql-engine"
|
||||
- path: "./src-test"
|
||||
component: "test:graphql-engine-tests"
|
||||
- path: "./src-bench-cache"
|
||||
component: "bench:cache"
|
Loading…
Reference in New Issue
Block a user