diff --git a/.circleci/config.yml b/.circleci/config.yml index 7b677892..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-deps-{{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 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