2018-11-25 16:34:28 +03:00
|
|
|
version: 2
|
2019-05-27 23:20:09 +03:00
|
|
|
|
2018-11-25 16:34:28 +03:00
|
|
|
jobs:
|
2019-08-28 15:15:35 +03:00
|
|
|
build:
|
2018-11-25 16:34:28 +03:00
|
|
|
docker:
|
2019-05-27 23:20:09 +03:00
|
|
|
- image: nixos/nix:2.1.3
|
2018-11-25 16:34:28 +03:00
|
|
|
steps:
|
|
|
|
- checkout
|
2019-05-31 16:50:43 +03:00
|
|
|
- run:
|
|
|
|
name: Add ca-certificates
|
|
|
|
command: |
|
|
|
|
apk --no-progress update
|
|
|
|
apk --no-progress add ca-certificates
|
2019-05-27 23:20:09 +03:00
|
|
|
- run:
|
|
|
|
name: Setup Cachix
|
|
|
|
command: |
|
2019-08-28 15:15:35 +03:00
|
|
|
nix-env -iA cachix -f https://cachix.org/api/v1/install
|
2019-05-27 23:20:09 +03:00
|
|
|
USER=dummy cachix use tweag
|
|
|
|
- run:
|
|
|
|
name: Build environment
|
|
|
|
command: |
|
|
|
|
nix-shell --pure --run :
|
|
|
|
- run:
|
|
|
|
name: Push Cachix
|
|
|
|
command: |
|
2019-06-05 20:43:07 +03:00
|
|
|
if [ -n "$CACHIX_SIGNING_KEY" ];
|
|
|
|
then nix-store -qR --include-outputs $(nix-instantiate default.nix) | cachix push tweag;
|
|
|
|
fi
|
2019-05-27 23:20:09 +03:00
|
|
|
- run:
|
|
|
|
name: Build the package (includes running the tests)
|
2019-08-30 05:43:38 +03:00
|
|
|
command: nix-build --keep-going
|
2019-05-31 16:50:43 +03:00
|
|
|
- run:
|
|
|
|
name: Generate Haddocks
|
2019-06-19 23:48:47 +03:00
|
|
|
command: nix-build --attr ormolu.doc
|
2019-05-31 16:50:43 +03:00
|
|
|
- store_artifacts:
|
|
|
|
path: result-doc/share/doc
|
|
|
|
destination: haddock
|
2018-11-25 16:34:28 +03:00
|
|
|
|
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
build:
|
|
|
|
jobs:
|
2019-08-28 15:15:35 +03:00
|
|
|
- build:
|
2019-05-27 23:20:09 +03:00
|
|
|
context: org-global
|