This repository has been archived by the owner on Jul 31, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LOG_INFO macro usage fix on earlier OTPs (#144)
* on pre otp-21 LOG_INFO macro requires 2 arguments * run circleci testsagainst otp 18 19 20 and 21 * run tests on 20 and 21 * fix path to covertool file * add iolist_to_binary for otp 20 support of integer to string * b3 span id can onlybe 16 chars
- Loading branch information
1 parent
b3ab781
commit 5e697cd
Showing
3 changed files
with
51 additions
and
126 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,127 +1,51 @@ | ||
defaults: &defaults | ||
shell: /bin/sh | ||
working_directory: /home/circleci/census | ||
docker: | ||
- image: erlang:21.2-alpine | ||
cmd: ["/bin/sh"] | ||
version: 2.1 | ||
|
||
version: 2 | ||
jobs: | ||
build: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
|
||
- restore_cache: | ||
keys: | ||
- census-{{ checksum "rebar.lock" }} | ||
- census-hex-packages | ||
|
||
- run: | ||
command: rebar3 compile | ||
|
||
- store_artifacts: | ||
path: /home/circleci/census/rebar3.crashdump | ||
destination: rebar3_crashdump.txt | ||
when: on_fail | ||
|
||
- save-cache: | ||
key: census-{{ checksum "rebar.lock" }} | ||
paths: | ||
- /home/circleci/census/_build/default/lib | ||
- /home/circleci/census/_build/default/plugins | ||
|
||
- save-cache: | ||
key: census-hex-packages | ||
paths: | ||
- /root/.cache/rebar3/hex/default/packages | ||
orbs: | ||
rebar3: tsloughter/rebar3@0.6.3 | ||
codecov: codecov/codecov@1.0.4 | ||
|
||
dialyzer: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
|
||
- restore_cache: | ||
keys: | ||
- erlang-plt-21.2 | ||
|
||
- restore_cache: | ||
keys: | ||
- census-{{ checksum "rebar.lock" }} | ||
- census-hex-packages | ||
|
||
- run: | ||
command: rebar3 dialyzer | ||
|
||
- save-cache: | ||
key: erlang-plt-21.2 | ||
paths: | ||
- /root/.cache/rebar3/rebar3_21.2_plt | ||
xref: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
|
||
- restore_cache: | ||
keys: | ||
- census-{{ checksum "rebar.lock" }} | ||
- census-hex-packages | ||
|
||
- run: | ||
command: rebar3 xref | ||
|
||
lint: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
|
||
- restore_cache: | ||
keys: | ||
- census-{{ checksum "rebar.lock" }} | ||
- census-hex-packages | ||
|
||
- run: | ||
command: rebar3 lint | ||
|
||
tests: | ||
<<: *defaults | ||
jobs: | ||
build_and_test: | ||
parameters: | ||
tag: | ||
description: The Erlang/OTP docker image tag to use | ||
type: string | ||
codecov_flag: | ||
description: String the coverage reports are grouped by | ||
type: string | ||
executor: | ||
name: rebar3/erlang | ||
tag: <<parameters.tag>> | ||
steps: | ||
- checkout | ||
|
||
- restore_cache: | ||
keys: | ||
- census-{{ checksum "rebar.lock" }} | ||
- census-hex-packages | ||
|
||
- run: | ||
command: | | ||
set -eux | ||
rebar3 do ct, cover | ||
rebar3 covertool generate | ||
apk add --update python python-dev py-pip | ||
pip install codecov && codecov -f _build/test/covertool/opencensus.covertool.xml | ||
- store_test_results: | ||
path: /home/circleci/census/_build/test/logs/ | ||
|
||
- store_artifacts: | ||
path: /home/circleci/census/_build/test/logs | ||
destination: common_test | ||
- rebar3/with_deps_cache: | ||
cache_key_postfix: -<<parameters.tag>> | ||
steps: | ||
- rebar3/compile | ||
- rebar3/dialyzer | ||
- run: rebar3 as test xref | ||
- rebar3/ct | ||
|
||
- store_test_results: | ||
path: ~/project/_build/test/logs/ | ||
- store_artifacts: | ||
path: ~/project/_build/test/logs | ||
destination: common_test | ||
|
||
- rebar3/cover | ||
- run: rebar3 as test covertool generate | ||
- codecov/upload: | ||
file: _build/test/covertool/opencensus.covertool.xml | ||
flags: <<parameters.codecov_flag>> | ||
|
||
workflows: | ||
version: 2 | ||
build_and_test: | ||
run_all: | ||
jobs: | ||
- build | ||
- dialyzer: | ||
requires: | ||
- build | ||
- xref: | ||
requires: | ||
- build | ||
- lint: | ||
requires: | ||
- build | ||
- tests: | ||
requires: | ||
- build | ||
- build_and_test: | ||
name: "otp-21" | ||
tag: "21.2" | ||
codecov_flag: "otp21" | ||
- build_and_test: | ||
name: "otp-20" | ||
tag: "20" | ||
codecov_flag: "otp20" |
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
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