Skip to content

Commit

Permalink
Merge pull request #491 from merwan/circleci-documentation
Browse files Browse the repository at this point in the history
Add CircleCI example configuration
  • Loading branch information
jeremyjh committed Apr 18, 2023
2 parents fedbe91 + adfb635 commit 94c3b42
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ end

### Example CI Configs

- [CircleCI](./docs/circleci.md)
- [GitHub Actions](./docs/github_actions.md)
- [GitLab CI](./docs/gitlab_ci.md)

Expand Down
40 changes: 40 additions & 0 deletions docs/circleci.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# CircleCI

```yaml
---
version: 2

jobs:
build:
docker:
- image: cimg/elixir:1.14

steps:
- checkout

# Compile steps omitted for simplicity

# Don't cache PLTs based on mix.lock hash, as Dialyzer can incrementally update even old ones
# Cache key based on Elixir & Erlang version (also useful when running in matrix)
- run:
name: "Save Elixir and Erlang version for PLT caching"
command: echo "$ELIXIR_VERSION $ERLANG_VERSION" > .elixir_otp_version

- restore_cache:
name: "Restore PLT cache"
keys:
- {{ arch }}-{{ checksum ".elixir_otp_version" }}-plt

- run:
name: "Create PLTs"
command: mix dialyzer --plt

- save_cache:
name: "Save PLT cache"
key: {{ arch }}-{{ checksum ".elixir_otp_version" }}-plt
paths: "priv/plts"

- run:
name: "Run dialyzer"
command: mix dialyzer
```

0 comments on commit 94c3b42

Please sign in to comment.