From 5a38d35c59ab7a8818087d8092abd853d3ccdb5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yves=20Par=C3=A8s?= Date: Tue, 8 Oct 2019 18:27:47 +0200 Subject: [PATCH 1/3] Updated funflow tag --- default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default.nix b/default.nix index f510f65d..5eae91d2 100644 --- a/default.nix +++ b/default.nix @@ -63,7 +63,7 @@ overlayHaskell = _:pkgs: owner = "tweag"; repo = "funflow"; rev = "v1.5.0"; - sha256 = "05k4icz3lls135aasvf7f7riniw5cmyg8y6phcz4qiikhswlbs0x"; + sha256 = "1bldpi1fcr6l7qcr7kkwycvp1i9jgpd6b8m4190z9lsiddz0pkav"; }; monadBayesSource = pkgs.fetchFromGitHub { owner = "tweag"; # Using our fork until https://github.com/adscib/monad-bayes/pull/54 is merged From 85f38fba2430d3b721d071b07a03bd706f5cf68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yves=20Par=C3=A8s?= Date: Tue, 8 Oct 2019 18:40:46 +0200 Subject: [PATCH 2/3] Changed ci cache key to force rebuild --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7b677892..bc4b7ae2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,7 +11,7 @@ jobs: find . -name "*.cabal" -o -name "stack.yaml" -type f | sort | xargs cat > /tmp/stack-deps - restore_cache: keys: - - porcupine-stack-deps-{{arch}}-{{checksum "/tmp/stack-deps"}} + - porcupine-stack-{{arch}}-{{checksum "/tmp/stack-deps"}} - run: name: Setup build toolchain command: stack setup From 74feee98964bc1d0f347c430913f8ddff1316f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yves=20Par=C3=A8s?= Date: Tue, 8 Oct 2019 18:44:59 +0200 Subject: [PATCH 3/3] Switching the CI to using the nix config --- .circleci/config.yml | 37 ++++++++++++++++--------------------- 1 file changed, 16 insertions(+), 21 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bc4b7ae2..2e98b3c4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,32 +2,27 @@ version: 2 jobs: build: docker: - - image: fpco/stack-build + - image: nixos/nix:2.3 steps: - checkout - run: - name: Compute cache key + name: Setup Cachix command: | - find . -name "*.cabal" -o -name "stack.yaml" -type f | sort | xargs cat > /tmp/stack-deps - - restore_cache: - keys: - - porcupine-stack-{{arch}}-{{checksum "/tmp/stack-deps"}} - - run: - name: Setup build toolchain - command: stack setup - - run: - name: Building dependencies - command: stack test -j1 --only-snapshot --prefetch - - save_cache: - paths: - - "~/.stack" - key: porcupine-stack-deps-{{arch}}-{{checksum "/tmp/stack-deps"}} + apk --no-progress update + apk --no-progress add ca-certificates + nix-channel --update + # Install cachix and activate project cache + nix-env -iA cachix -f https://github.com/NixOS/nixpkgs/tarball/1d4de0d552ae9aa66a5b8dee5fb0650a4372d148 + USER=dummy cachix use tweag - run: name: Building - command: stack build --pedantic - - run: - name: Building tests - command: stack test --pedantic --no-run-tests + command: nix-shell --run 'cabal new-build all' | cachix push tweag - run: name: Running tests - command: stack test + command: nix-shell --run 'cabal new-test all' | cachix push tweag +workflows: + version: 2 + build: + jobs: + - build: + context: org-global