diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e34825f8b..c073062b1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -102,47 +102,37 @@ backend lint: retry: 2 interruptible: true -uniworx:lib:uniworx: +backend build: stage: build + cache: + - &stack-cache + key: default-stack + paths: + - .stack/ + - .stack-work/ + script: - - xzcat frontend.nar.xz | nix-store --import - - nix -L build -o result ".#uniworx:lib:uniworx" - - nix-store --export $(nix-store -qR result) | xz -T0 -2 > uniworx:lib:uniworx.nar.xz + - "nix shell .#gnumake --command -- make CI=1 backend-build" + - cp $(stack path --dist-dir)/build/hlint/hlint bin/test-hlint + - cp $(stack path --dist-dir)/build/yesod/yesod bin/test-yesod before_script: *nix-before needs: - job: node modules # transitive artifacts: false + - job: frontend lint # transitive + artifacts: false - job: frontend build artifacts: true + - job: backend lint # pipeline performance + artifacts: false artifacts: paths: - - uniworx:lib:uniworx.nar.xz - name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}" - expire_in: "1 day" - retry: 2 - interruptible: true - -uniworx:exe:uniworx: - stage: build - script: - - xzcat uniworx:lib:uniworx.nar.xz | nix-store --import - - nix -L build -o result ".#uniworx:exe:uniworx" - - nix-store --export $(nix-store -qR result) | xz -T0 -2 > uniworx:exe:uniworx.nar.xz - before_script: *nix-before - needs: - - job: node modules # transitive - artifacts: false - - job: frontend build # transitive - artifacts: false - - job: uniworx:lib:uniworx - artifacts: true - artifacts: - paths: - - uniworx:exe:uniworx.nar.xz + - bin/ name: "${CI_JOB_NAME}-${CI_COMMIT_SHORT_SHA}" expire_in: "1 day" retry: 2 interruptible: true + resource_group: ram uniworx:exe:uniworxdb: stage: build