-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CircleCI setting to make document
- Loading branch information
Showing
1 changed file
with
150 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,115 +1,237 @@ | ||
version: 2.1 | ||
|
||
workflows: | ||
version: 2 | ||
test-and-gh-page: | ||
jobs: | ||
- haskell-install | ||
- haskell-build-and-test: | ||
requires: | ||
- haskell-install | ||
- haddock-build: | ||
requires: | ||
- haskell-install | ||
filters: | ||
branches: | ||
only: master | ||
- doxygen-build: | ||
filters: | ||
branches: | ||
only: master | ||
- gh-page-deploy: | ||
requires: | ||
- haskell-build-and-test | ||
- haddock-build | ||
- doxygen-build | ||
filters: | ||
branches: | ||
only: master | ||
|
||
jobs: | ||
build: | ||
haskell-install: | ||
executor: stack-minimal | ||
steps: | ||
- checkout | ||
- restore-all-haskell-caches | ||
- stack-setup | ||
- stack-build-deps | ||
- save-all-haskell-caches | ||
|
||
- restore-all-caches | ||
haskell-build-and-test: | ||
executor: stack-minimal | ||
steps: | ||
- checkout | ||
- restore-all-haskell-caches | ||
|
||
- stack-setup | ||
- stack-verify-all | ||
|
||
- save-all-caches | ||
haddock-build: | ||
executor: stack-minimal | ||
steps: | ||
- checkout | ||
- restore-all-haskell-caches | ||
|
||
- stack-haddock | ||
- run: "mv $(stack path --local-doc-root) ./haddock" | ||
- persist_to_workspace: | ||
root: "./" | ||
paths: | ||
- "./haddock/*" | ||
|
||
doxygen-build: | ||
executor: doxygen-minimal | ||
steps: | ||
- checkout | ||
|
||
- doxygen | ||
- run: mv runtime/doc doxygen | ||
- persist_to_workspace: | ||
root: "./" | ||
paths: | ||
- "./doxygen/*" | ||
|
||
gh-page-deploy: | ||
executor: node-minimal | ||
steps: | ||
- checkout | ||
- restore-all-node-caches | ||
- attach_workspace: | ||
at: "./doc/" | ||
|
||
- deploy-documents | ||
- save-all-node-caches | ||
|
||
executors: | ||
stack-minimal: | ||
docker: | ||
- image: fpco/stack-build-small:lts-13.27 | ||
doxygen-minimal: | ||
docker: | ||
- image: cutelang/doxygen-small:1.8.15 | ||
node-minimal: | ||
docker: | ||
- image: circleci/node:12 | ||
|
||
commands: | ||
stack-setup: | ||
description: "Setup haskell tool stack." | ||
steps: | ||
- run: stack setup -j2 | ||
stack-build-deps: | ||
description: "Build only dependencies with haskell tool stack." | ||
steps: | ||
- run: stack build --only-dependencies -j2 | ||
- run: stack test --only-dependencies -j2 | ||
- run: stack haddock --only-dependencies -j2 | ||
stack-test-all: | ||
description: "Test everything related with this repo with haskell tool stack." | ||
description: "Test everything related with the haskell codes in this repo with haskell tool stack." | ||
steps: | ||
- run: stack test -j2 | ||
stack-build-all: | ||
description: "Build everything related with this repo with haskell tool stack." | ||
description: "Build everything related with the haskell codes in this repo with haskell tool stack." | ||
steps: | ||
- run: stack build -j2 | ||
stack-verify-all: | ||
description: "Verify everything related with this repo with haskell tool stack." | ||
description: "Verify everything related with the haskell codes in this repo with haskell tool stack." | ||
steps: | ||
- stack-test-all | ||
- stack-build-all | ||
|
||
restore-all-caches: | ||
description: "Restore all cached parts in this project." | ||
stack-haddock: | ||
description: "Build haddock documents for the haskell codes in this repo." | ||
steps: | ||
- run: stack haddock -j2 | ||
|
||
doxygen: | ||
description: "Build doxygen documents for runtime." | ||
steps: | ||
- run: | | ||
cd runtime | ||
make html | ||
cd .. | ||
deploy-documents: | ||
description: "Deploy documents." | ||
steps: | ||
- add_ssh_keys: | ||
fingerprints: | ||
- "f4:d3:a7:2e:7a:2e:8f:a2:b6:72:35:cb:7f:82:9f:fd" | ||
- deploy: | ||
command: | | ||
git config user.email "miniCUTE-documents@github.com" | ||
git config user.name "miniCUTE-documents" | ||
npx gh-pages --dotfiles --message "Update to sync with ${CIRCLE_SHA1}" -d doc | ||
restore-all-haskell-caches: | ||
description: "Restore all cached parts of haskell packages." | ||
steps: | ||
- restore_cache: | ||
name: Restore Global Data | ||
keys: | ||
- circleci-minicute-global-v2-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "abstractify/package.yaml" }}-{{ checksum "base/package.yaml" }}-{{ checksum "codegenerator/package.yaml" }}-{{ checksum "minicute/package.yaml" }}-{{ checksum "parser/package.yaml" }} | ||
- circleci-minicute-global-v2-{{ arch }}-{{ checksum "stack.yaml" }} | ||
- circleci-minicute-global-v2-{{ arch }} | ||
- circleci-minicute-haskell-global-v3.0-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "abstractify/package.yaml" }}-{{ checksum "base/package.yaml" }}-{{ checksum "codegenerator/package.yaml" }}-{{ checksum "minicute/package.yaml" }}-{{ checksum "parser/package.yaml" }} | ||
- circleci-minicute-haskell-global-v3.0-{{ arch }}-{{ checksum "stack.yaml" }} | ||
- circleci-minicute-haskell-global-v3.0-{{ arch }} | ||
|
||
- restore_cache: | ||
name: Restore Project Local Data | ||
keys: | ||
- circleci-minicute-project-local-v2-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "abstractify/package.yaml" }}-{{ checksum "base/package.yaml" }}-{{ checksum "codegenerator/package.yaml" }}-{{ checksum "minicute/package.yaml" }}-{{ checksum "parser/package.yaml" }} | ||
- circleci-minicute-project-local-v3.0-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "abstractify/package.yaml" }}-{{ checksum "base/package.yaml" }}-{{ checksum "codegenerator/package.yaml" }}-{{ checksum "minicute/package.yaml" }}-{{ checksum "parser/package.yaml" }} | ||
|
||
- restore_cache: | ||
name: Restore Abstractify Local Data | ||
keys: | ||
- circleci-minicute-abstractify-local-v2-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "abstractify/package.yaml" }} | ||
- circleci-minicute-abstractify-local-v3.0-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "abstractify/package.yaml" }} | ||
- restore_cache: | ||
name: Restore Base Local Data | ||
keys: | ||
- circleci-minicute-base-local-v2-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "base/package.yaml" }} | ||
- circleci-minicute-base-local-v3.0-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "base/package.yaml" }} | ||
- restore_cache: | ||
name: Restore Codegenerator Local Data | ||
keys: | ||
- circleci-minicute-codegenerator-local-v2-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "codegenerator/package.yaml" }} | ||
- circleci-minicute-codegenerator-local-v3.0-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "codegenerator/package.yaml" }} | ||
- restore_cache: | ||
name: Restore Minicute Local Data | ||
keys: | ||
- circleci-minicute-minicute-local-v2-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "minicute/package.yaml" }} | ||
- circleci-minicute-minicute-local-v3.0-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "minicute/package.yaml" }} | ||
- restore_cache: | ||
name: Restore Parser Local Data | ||
keys: | ||
- circleci-minicute-parser-local-v2-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "parser/package.yaml" }} | ||
- circleci-minicute-parser-local-v3.0-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "parser/package.yaml" }} | ||
|
||
save-all-caches: | ||
description: "Save all cachable parts in this project." | ||
save-all-haskell-caches: | ||
description: "Save all cachable parts of haskell packages." | ||
steps: | ||
- save_cache: | ||
name: Cache Global Data | ||
key: circleci-minicute-global-v2-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "abstractify/package.yaml" }}-{{ checksum "base/package.yaml" }}-{{ checksum "codegenerator/package.yaml" }}-{{ checksum "minicute/package.yaml" }}-{{ checksum "parser/package.yaml" }} | ||
key: circleci-minicute-haskell-global-v3.0-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "abstractify/package.yaml" }}-{{ checksum "base/package.yaml" }}-{{ checksum "codegenerator/package.yaml" }}-{{ checksum "minicute/package.yaml" }}-{{ checksum "parser/package.yaml" }} | ||
paths: | ||
- "/root/.stack" | ||
- "~/.stack" | ||
|
||
- save_cache: | ||
name: Cache Project Local Data | ||
key: circleci-minicute-project-local-v2-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "abstractify/package.yaml" }}-{{ checksum "base/package.yaml" }}-{{ checksum "codegenerator/package.yaml" }}-{{ checksum "minicute/package.yaml" }}-{{ checksum "parser/package.yaml" }} | ||
key: circleci-minicute-project-local-v3.0-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "abstractify/package.yaml" }}-{{ checksum "base/package.yaml" }}-{{ checksum "codegenerator/package.yaml" }}-{{ checksum "minicute/package.yaml" }}-{{ checksum "parser/package.yaml" }} | ||
paths: | ||
- ".stack-work" | ||
|
||
- save_cache: | ||
name: Cache Abstractify Local Data | ||
key: circleci-minicute-abstractify-local-v2-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "abstractify/package.yaml" }} | ||
key: circleci-minicute-abstractify-local-v3.0-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "abstractify/package.yaml" }} | ||
paths: | ||
- "abstractify/.stack-work" | ||
- save_cache: | ||
name: Cache Base Local Data | ||
key: circleci-minicute-base-local-v2-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "base/package.yaml" }} | ||
key: circleci-minicute-base-local-v3.0-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "base/package.yaml" }} | ||
paths: | ||
- "base/.stack-work" | ||
- save_cache: | ||
name: Cache Codegenerator Local Data | ||
key: circleci-minicute-codegenerator-local-v2-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "codegenerator/package.yaml" }} | ||
key: circleci-minicute-codegenerator-local-v3.0-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "codegenerator/package.yaml" }} | ||
paths: | ||
- "codegenerator/.stack-work" | ||
- save_cache: | ||
name: Cache Minicute Local Data | ||
key: circleci-minicute-minicute-local-v2-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "minicute/package.yaml" }} | ||
key: circleci-minicute-minicute-local-v3.0-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "minicute/package.yaml" }} | ||
paths: | ||
- "minicute/.stack-work" | ||
- save_cache: | ||
name: Cache Parser Local Data | ||
key: circleci-minicute-parser-local-v2-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "parser/package.yaml" }} | ||
key: circleci-minicute-parser-local-v3.0-{{ arch }}-{{ checksum "stack.yaml" }}-{{ checksum "parser/package.yaml" }} | ||
paths: | ||
- "parser/.stack-work" | ||
|
||
restore-all-node-caches: | ||
description: "Restore all cached parts of node packages." | ||
steps: | ||
- restore_cache: | ||
name: Restore Global Data | ||
keys: | ||
- circleci-minicute-node-global-v3.0 | ||
|
||
save-all-node-caches: | ||
description: "Save all cachable parts of node packages." | ||
steps: | ||
- save_cache: | ||
name: Cache Global Data | ||
key: circleci-minicute-node-global-v3.0 | ||
paths: | ||
- "~/.npm" |