From de9316ae13415d2df53b665406faa6e0538a3589 Mon Sep 17 00:00:00 2001 From: "Carsten Csiky (csicar)" Date: Wed, 2 Sep 2020 00:59:51 +0200 Subject: [PATCH 1/6] CI --- .gitlab-ci.yml | 12 ++++++++++++ package.yaml | 29 ++++++++++++++++++++++++----- 2 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..7071dc71 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,12 @@ +image: haskell + +build: + script: + - stack build --copy-bins --flag purepur:static + artifacts: + paths: + - /root/.local/bin/purepur + +test: + script: + - stack build --test --no-run-tests --flag purepur:static --haddock --no-haddock-deps diff --git a/package.yaml b/package.yaml index 8be985c9..ff94b43d 100644 --- a/package.yaml +++ b/package.yaml @@ -2,7 +2,7 @@ name: purepur version: 0.1.0.0 github: "csicar/purescript-purepur" license: BSD3 -author: "csicar" +author: "cssicar" maintainer: "example@example.com" extra-source-files: @@ -10,6 +10,11 @@ extra-source-files: - stack.yaml - support/* +flags: + static: + manual: true + default: false + # Metadata used when publishing your package # synopsis: Short description of your package # category: Web @@ -73,10 +78,24 @@ executables: purepur: main: Main.hs source-dirs: app - ghc-options: - - -threaded - - -rtsopts - - -with-rtsopts=-N + when: + - condition: flag(static) + then: + ghc-options: + - -main-is Main + - -threaded + - -rtsopts + - -with-rtsopts=-N + - -static + - -O2 + cc-options: -static + ld-options: -static -pthread + else: + ghc-options: + - -main-is Main + - -threaded + - -rtsopts + - -with-rtsopts=-N dependencies: - purepur From 74de35e6426993221fb991233dd97ff37917e129 Mon Sep 17 00:00:00 2001 From: "Carsten Csiky (csicar)" Date: Wed, 2 Sep 2020 01:26:19 +0200 Subject: [PATCH 2/6] Update --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7071dc71..1e28047f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: haskell +image: haskell:8.6.5 build: script: From fa07ce192feddd63b795b7292cad174bedfe291d Mon Sep 17 00:00:00 2001 From: "Carsten Csiky (csicar)" Date: Wed, 2 Sep 2020 01:57:19 +0200 Subject: [PATCH 3/6] hContents fix --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1e28047f..09d683ae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,8 @@ -image: haskell:8.6.5 +image: haskell:8.6.5 build: script: + - LC_ALL=en_US.UTF-8 - stack build --copy-bins --flag purepur:static artifacts: paths: From 61c08621f336751abfea516e1219bacbce1a513c Mon Sep 17 00:00:00 2001 From: "Carsten Csiky (csicar)" Date: Wed, 2 Sep 2020 01:58:42 +0200 Subject: [PATCH 4/6] Use sutff from purty --- .gitlab-ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 09d683ae..4fbd95ec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,8 +1,17 @@ image: haskell:8.6.5 +cache: + key: purty-v1 + paths: + - .stack-root + - .stack-work + +variables: + LC_ALL: C.UTF-8 + STACK_ROOT: $CI_PROJECT_DIR/.stack-root + build: script: - - LC_ALL=en_US.UTF-8 - stack build --copy-bins --flag purepur:static artifacts: paths: From e1685678018f117f08f70139a72b84f6f6880b7c Mon Sep 17 00:00:00 2001 From: "Carsten Csiky (csicar)" Date: Wed, 2 Sep 2020 02:30:14 +0200 Subject: [PATCH 5/6] Version --- package.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.yaml b/package.yaml index ff94b43d..88df048a 100644 --- a/package.yaml +++ b/package.yaml @@ -2,7 +2,7 @@ name: purepur version: 0.1.0.0 github: "csicar/purescript-purepur" license: BSD3 -author: "cssicar" +author: "csicar" maintainer: "example@example.com" extra-source-files: @@ -27,7 +27,7 @@ description: Please see the README on Github at = 4.7 && < 5 - bytestring >= 0.10.8.2 && < 0.11 -- purescript -any +- purescript == 0.13.8 - base-compat >=0.6.0 - protolude >=0.1.6 - text From f721cfe041a909fa20279af4763ed7930d1f32bd Mon Sep 17 00:00:00 2001 From: "Carsten Csiky (csicar)" Date: Thu, 3 Sep 2020 18:34:00 +0200 Subject: [PATCH 6/6] Artifact --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4fbd95ec..0b954905 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,10 +12,10 @@ variables: build: script: - - stack build --copy-bins --flag purepur:static + - stack build --copy-bins --local-bin-path ./artifacts --flag purepur:static artifacts: paths: - - /root/.local/bin/purepur + - ./artifacts test: script: