Skip to content
This repository was archived by the owner on Dec 6, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
693 commits
Select commit Hold shift + click to select a range
c92acea
make initialization more consistent
hroederld Mar 19, 2019
3d6d563
free tmp in error case
hroederld Mar 19, 2019
b062e8e
free events that may exist if check prereqs fails
hroederld Mar 19, 2019
61713c3
free tmp on error cases in most of event construction
hroederld Mar 19, 2019
db266da
add missing cleanup of tmp in error case
hroederld Mar 19, 2019
1ce7825
move va_list to own line
hroederld Mar 19, 2019
ac5a81f
replace free with LDFree
hroederld Mar 19, 2019
539c8e0
remove deadcode typedefs
hroederld Mar 19, 2019
ccd32df
make assertion style more consistent
hroederld Mar 19, 2019
fe6d9ff
fix leaks in error conditions of summary generation
hroederld Mar 19, 2019
85f3e09
made assertion style more consistent
hroederld Mar 19, 2019
e3cda84
fix differences in README usage example
hroederld Mar 19, 2019
d44342f
fix typo in config header, move LDStoreInit to store header
hroederld Mar 19, 2019
38600fa
cleanup new entry and flagcontext in failure cases
hroederld Mar 19, 2019
02ac3a6
make main more like working demo app, going to delete and move to own…
hroederld Mar 19, 2019
326e76e
indentation style fix
hroederld Mar 19, 2019
6725c86
replace free with LDFree
hroederld Mar 19, 2019
ac5d41d
fix memory leak and deadlock in error cases of memoryAll
hroederld Mar 19, 2019
6b72743
cleanup tmp vars during error conditions in memoryDelet
hroederld Mar 19, 2019
783243f
check errors for setting key in upsert
hroederld Mar 19, 2019
18e599d
misc error condition cleanup for user serialization
hroederld Mar 19, 2019
b3c8554
more error condition cleanup in lduser
hroederld Mar 19, 2019
dd294e7
more error condition cleanup in lduser
hroederld Mar 19, 2019
af0ff70
don't free events that are about to be used
hroederld Mar 19, 2019
24966e3
more cleanup in error conditions
hroederld Mar 19, 2019
65a6ae3
replace get size with iter check
hroederld Mar 19, 2019
cd33a07
optimize key text a bit
hroederld Mar 19, 2019
edd6911
initialize keytext to NULL
hroederld Mar 19, 2019
c8e4344
replace extra check of if flag is object with assert that could be tu…
hroederld Mar 19, 2019
a406171
optimize keyText
hroederld Mar 19, 2019
beaddcb
allow for null rule id
hroederld Mar 19, 2019
ddd4db7
remove extra newline
hroederld Mar 19, 2019
95ee9a5
replace locally ensured variationNumJSON check with assertion
hroederld Mar 19, 2019
308b2d2
free segment data in case of deleted segment
hroederld Mar 19, 2019
13c8cdf
remove main executable
hroederld Mar 19, 2019
f371967
remove any success check for segmentMatch
hroederld Mar 19, 2019
1027800
clauseMatcheNoUserSegments stop allowing object in attributeValue
hroederld Mar 19, 2019
6dc26b1
handle case where 'bucketBy' is JSON null
hroederld Mar 19, 2019
c92502d
don't return feature if it is deleted at store layer, also fix deadlo…
hroederld Mar 19, 2019
3ed1540
update tests for store contract change
hroederld Mar 19, 2019
8050063
don't free json in test if it does not exist
hroederld Mar 19, 2019
0765dc0
fix memory leak of bucketable in error case
hroederld Mar 19, 2019
f55fbd4
remove explicit deletion checks across codebase
hroederld Mar 19, 2019
3292363
fix brace line
hroederld Mar 19, 2019
594b7e0
remove user key checks that are done at a higher level
hroederld Mar 19, 2019
a6cd125
add explanation struct (not used) and switch to dedicated events para…
hroederld Mar 20, 2019
d6c5f65
partially convert to use struct instead of json for explanations
hroederld Mar 20, 2019
41bad40
partially convert eval tests to new struct system
hroederld Mar 20, 2019
2a646d0
convert rest of evaluation tests
hroederld Mar 20, 2019
8bdb274
fix double free of eval value in allFlags
hroederld Mar 20, 2019
89b936c
convert offline tests to new api
hroederld Mar 20, 2019
4998767
passing all unit tests
hroederld Mar 20, 2019
cddb5ca
add detail related enums to static string conversion routines
hroederld Mar 20, 2019
9d68175
add routine to convert explanations to json
hroederld Mar 20, 2019
332c509
fix schema in reason serialization
hroederld Mar 20, 2019
fb40108
convert details to json to reason to json and integrate into event se…
hroederld Mar 20, 2019
6024f5e
don't assert on value in ldevents
hroederld Mar 21, 2019
0b91219
don't add variation to event if not requested
hroederld Mar 21, 2019
b34b07c
precheck for miss
hroederld Mar 21, 2019
76a6d8b
misplaced freeflag
hroederld Mar 21, 2019
267c006
swap key and user parameters of track to make more consistent with ot…
hroederld Mar 21, 2019
64abe97
prepare replacement event and summary counter storage allocation befo…
hroederld Mar 21, 2019
cddc61e
make test declaration styling more consistent
hroederld Mar 21, 2019
9f4e07e
make test styling more consistent
hroederld Mar 21, 2019
5411768
finish up making test declaration styling consistent
hroederld Mar 21, 2019
b1d6c5d
merge fallback and error goto blocks in internal variation handler as…
hroederld Mar 21, 2019
67559f4
remove assert on client in internal variation as null client is handl…
hroederld Mar 21, 2019
cc4c081
rename object to clause in maybeNegate
hroederld Mar 21, 2019
59b782b
update add event to not allocate
hroederld Mar 21, 2019
50f4672
ensure events are not leaked after being added
hroederld Mar 21, 2019
8947420
ensure array holding events is not leaked (event objects themselves w…
hroederld Mar 21, 2019
a77d5f4
assign event to null after ownership transfer to ensure not freed
hroederld Mar 21, 2019
1a07a50
rename to ldserverapidynamic
hroederld Mar 21, 2019
6268367
update circle config for new library names
hroederld Mar 21, 2019
83407a3
forgot to save for last commit
hroederld Mar 21, 2019
2e4ad86
assert on client and remove client null eval error case
hroederld Mar 21, 2019
4bed1a2
reduce memory allocation and convert getIndexForVariationOrRollout to…
hroederld Mar 21, 2019
f3398d4
replace hasId with NULL string
hroederld Mar 21, 2019
df6f51a
remove extra check of iterator
hroederld Mar 21, 2019
ef8b997
rename kind to reason
hroederld Mar 21, 2019
5a7d31f
free rule id on detail clear if rule type
hroederld Mar 21, 2019
8f03e9c
ensure sub events correctly skip reasons
hroederld Mar 21, 2019
ba34b2e
check events capacity with >= instead of >
hroederld Mar 21, 2019
0c58aa3
operatorInFn simplification, add LD_SDK_VERSION #define
hroederld Mar 21, 2019
69e74c6
remove duplicate line
hroederld Mar 22, 2019
62c84a5
add mutex support (unused)
hroederld Mar 22, 2019
cf07cee
partial convert to use reference counting
hroederld Mar 22, 2019
ecfd9fc
update streaming tests
hroederld Mar 22, 2019
047085a
fix memoryInit (currently unsafe handling of error state)
hroederld Mar 22, 2019
6d16aca
add uthash dep
hroederld Mar 22, 2019
d9c900b
convert rest of tests to new api
hroederld Mar 22, 2019
0358617
replace segment free with segment rc decrement
hroederld Mar 22, 2019
656c245
convert allFlags store api to use reference counting
hroederld Mar 22, 2019
c98ed20
ensure prequisiteKey gets freed in details cleanup, simplify evaluati…
hroederld Mar 22, 2019
bae2e2e
fix reference count decrement
hroederld Mar 22, 2019
82f80ec
ensure subevents always get freed
hroederld Mar 22, 2019
4553f10
cleanup leaks in error conditions and generally reduce allocations
hroederld Mar 22, 2019
e7c620f
remove allocation from parse path
hroederld Mar 22, 2019
ae83d78
use new detach function instead of duplicate
hroederld Mar 22, 2019
814378b
rename FeatureCollection to FeatureCollectionItem
hroederld Mar 25, 2019
10db64a
convert ldstore interface to use static strings instead of enum
hroederld Mar 25, 2019
c7b70de
update streaming to rename flags to features
hroederld Mar 25, 2019
600733b
replace two instance of free with LDFree
hroederld Mar 25, 2019
88c7ca9
replace two unrelated instances of malloc with LDAlloc
hroederld Mar 25, 2019
3b184f8
rename flags to features in polling update
hroederld Mar 25, 2019
1effcdb
DRY up with featureKindToString
hroederld Mar 25, 2019
f7973c6
more logically organize ldstore
hroederld Mar 25, 2019
b5c88d6
update doxygen header for RC related functions
hroederld Mar 25, 2019
3bee424
correctly return NULL when RC lock construction fails
hroederld Mar 25, 2019
115e145
add sanity check assertion that current reference count is > 0 when d…
hroederld Mar 25, 2019
c686b9a
make some routines static and some parameters const
hroederld Mar 25, 2019
ea51017
replace free with LDFree in store destroy
hroederld Mar 25, 2019
7e50771
add const to ptr for addHidden
hroederld Mar 26, 2019
f64845a
rename and make jsonrc destruction static
hroederld Mar 26, 2019
2ac8b08
makeFeatureCollection -> makeFeatureCollectionItem, replacementcollec…
hroederld Mar 26, 2019
39ca5e3
Merge pull request #7 from launchdarkly/hr/refcount
hroederld Mar 27, 2019
359d26d
1.0.0 beta.1 (#8)
hroederld Mar 27, 2019
a08df4f
Merge github.com:launchdarkly/c-client-server-side
hroederld Mar 28, 2019
aef0203
update readme to refer to better distinguish between server-side and …
bwoskow-ld Mar 28, 2019
0cdb5dd
Merge pull request #10 from launchdarkly/bw/readme-updates
bwoskow-ld Mar 28, 2019
1a7c009
Merge github.com:launchdarkly/c-client-server-side
hroederld Mar 28, 2019
97bac37
Add jitter to networking backoff (#9)
hroederld Mar 28, 2019
ad113ab
Remove GMP dep (#12)
hroederld Apr 1, 2019
9f60af9
Add support for debugEventsUntilDate (#11)
hroederld Apr 2, 2019
5c93f25
Windows C++ compatibility (#13)
hroederld Apr 3, 2019
9cfae31
Window specific time parsing (#14)
hroederld Apr 4, 2019
ac06b3a
Windows CI (#15)
hroederld Apr 5, 2019
9d46358
Dynamic library symbol hygiene (#16)
hroederld Apr 5, 2019
618bb3b
Prepare 1.0.0 beta.2 (#17)
hroederld Apr 5, 2019
584a375
Merge branch 'master' of github.com:launchdarkly/c-client-server-side
hroederld Apr 5, 2019
9924f89
add back ifdef cplusplus (#18)
hroederld Apr 5, 2019
c92c603
Merge branch 'master' of github.com:launchdarkly/c-client-server-side
hroederld Apr 5, 2019
202e531
Extra build documentation (#19)
hroederld Apr 8, 2019
8b47c0c
Merge branch 'master' of github.com:launchdarkly/c-client-server-side
hroederld Apr 8, 2019
8f4e101
reorganize headers (#21)
hroederld Apr 26, 2019
061e5aa
Fix doxygen and add docgen infra (#22)
hroederld Apr 30, 2019
34da394
cmake cleanup (#24)
hroederld May 3, 2019
a68ed94
Complete doxygen coverage (#23)
hroederld May 3, 2019
9d07f90
applying markdown templates (#25)
bwoskow-ld May 13, 2019
3759bc8
bump version and update changelog (#26)
hroederld May 17, 2019
61aed0c
free subevents as append does not transfer ownership (#27)
hroederld Jun 11, 2019
d6fd94e
bump version and add memory leak info to changelog (#28)
hroederld Jun 11, 2019
a6c21b4
merge in public
hroederld Jun 11, 2019
0e73f2a
Merge branch 'master' of github.com:launchdarkly/c-server-sdk
hroederld Jun 11, 2019
e063402
Update to handle index events (#29)
hroederld Jun 25, 2019
7ae5129
switch to using milliseconds everywhere internally (#30)
hroederld Jun 26, 2019
c56eac1
adding a circleci badge to the readme (#31)
bwoskow-ld Jun 27, 2019
8a5f961
switch from checking for header end within size (usually one) to tota…
hroederld Jul 5, 2019
5c793f2
bump version constant, document changes, remove beta warning (#33)
hroederld Jul 5, 2019
c479a06
Merge github.com:launchdarkly/c-server-sdk
hroederld Jul 5, 2019
2fbdbd0
add /usr/local/include for osx (#34)
hroederld Jul 11, 2019
1ec7b98
bump version, append changelog (#35)
hroederld Jul 11, 2019
d1bbf58
Merge github.com:launchdarkly/c-server-sdk
hroederld Jul 11, 2019
0a555ce
Merge branch 'master' of github.com:launchdarkly/c-server-sdk
bwoskow-ld Jul 18, 2019
1f7569a
memset time struct (#36)
hroederld Jul 26, 2019
2616be0
bump version, document changes (#37)
hroederld Jul 26, 2019
b9bbca4
Merge github.com:launchdarkly/c-server-sdk
hroederld Jul 26, 2019
58012df
update type comparison to work with object OR array detection (#38)
hroederld Sep 6, 2019
981412d
Experimention track metric (#40)
hroederld Sep 25, 2019
323fda8
prepare 1.1.0
hroederld Sep 26, 2019
e4ebf0a
bump changelog date before release
hroederld Sep 26, 2019
7abce0b
Fix rule match explanation encoding (#42)
hroederld Sep 26, 2019
bb8773c
Merge github.com:launchdarkly/c-server-sdk
hroederld Sep 26, 2019
2e7c85a
Merge branch 'master' of github.com:launchdarkly/c-server-sdk
bwoskow-ld Oct 11, 2019
6bfe2de
Double to int variation tests, and document behavior. (#43)
hroederld Oct 22, 2019
d1804af
Merge github.com:launchdarkly/c-server-sdk
hroederld Oct 23, 2019
93937e7
Merge branch 'master' of github.com:launchdarkly/c-server-sdk
bwoskow-ld Nov 7, 2019
7228635
[ch49806] redis store (#44)
hroederld Nov 15, 2019
a6db075
[ch58854] Update cJSON to 1.7.12
hroederld Dec 11, 2019
fe02635
[ch57214] Store API v2 (#46)
hroederld Dec 23, 2019
7939622
[ch55939] add Releaser scripts, CircleCI Windows build, use custom Do…
eli-darkly Dec 23, 2019
46c1778
[ch59994] add code coverage flag
hroederld Dec 23, 2019
51fcfbb
[ch43307] put user in last bucket for a bucketing fallthrough
hroederld Dec 26, 2019
7cad004
[ch60038] dont assert on polling put failure
hroederld Dec 26, 2019
74b2f13
[ch54986] old osx clock gettime (#51)
hroederld Dec 26, 2019
e1cf4ee
[ch60053] fix redis race detection
hroederld Dec 30, 2019
79eefbc
[ch61092] Event payload ID. (#54)
hroederld Jan 14, 2020
07bbf01
[ch60589] Cache external store values (#53)
hroederld Jan 16, 2020
1aa97e9
[ch61935] Releaser for redis (#55)
hroederld Jan 17, 2020
575ff0c
merge from public after release
LaunchDarklyCI Jan 22, 2020
81f10f3
Merge github.com:launchdarkly/c-server-sdk
hroederld Feb 26, 2020
5c65559
[ch69694] reconnect consistency (#57)
hroederld Mar 25, 2020
c10b08f
[ch69694] streaming status codes (#58)
hroederld Mar 27, 2020
cdf8fbc
merge from public after release
LaunchDarklyCI Mar 31, 2020
78b1184
[ch71379] create more ideal concurrency h (#59)
hroederld Apr 1, 2020
5fc1f5a
[ch72167] api level assert (#61)
hroederld Apr 3, 2020
1721d82
[ch72078] remove higher stack assertions for system ops (#60)
hroederld Apr 3, 2020
c5a8350
[ch72307] optional asserts compilation (#62)
hroederld Apr 5, 2020
f29d338
[ch72310] cmake cleanup (#63)
hroederld Apr 5, 2020
f29e0e8
[ch72310] cleanup redis cmake
hroederld Apr 5, 2020
75f20be
[ch72763] correct find package (#65)
hroederld Apr 8, 2020
3722ccb
[ch72838] detangle headers (#66)
hroederld Apr 8, 2020
5cf420b
[ch73235] enable mock concurrency (#68)
hroederld Apr 13, 2020
e871222
[ch72863] event processing cleanup and optimization (#67)
hroederld Apr 14, 2020
aad652e
[ch73704] dedup test utils (#69)
hroederld Apr 15, 2020
42d546a
[ch73828] null user key ban (#70)
hroederld Apr 15, 2020
83d00b9
[ch73828] null user key fix (#71)
hroederld Apr 15, 2020
8f706a5
[ch73236] detach sse (#72)
hroederld Apr 17, 2020
d88c3db
[ch73698] mock backend server and polling test (#73)
hroederld Apr 21, 2020
2a27aa5
[ch74213] release bundle (#75)
hroederld Apr 26, 2020
99f0605
[ch73853] start of defensive mode (#74)
hroederld Apr 26, 2020
15826b6
[ch75034] enable and fix more warnings (#76)
hroederld Apr 26, 2020
782d374
[ch73853] add logging to existing defensive checks (#77)
hroederld Apr 26, 2020
df9e6c3
[ch75137] double for large milliseconds (#85)
hroederld Apr 28, 2020
9fffd98
[ch75136] c89 fix for loop initialization
hroederld Apr 28, 2020
f4e0cdd
[ch75131] add time.h on posix
hroederld Apr 28, 2020
ae23499
[ch75126] Fix event generation for NULL fallback
hroederld Apr 28, 2020
16b0e91
[ch73853] remove extra error channels
hroederld Apr 28, 2020
70becd6
[ch73853] Defensive JSON (#78)
hroederld Apr 28, 2020
ac1422e
[ch73853] enable defensive api by default (#81)
hroederld Apr 28, 2020
f4918da
[ch75201] custom bool type for public api (#86)
hroederld Apr 28, 2020
4932e47
[ch74995] null fallback tests (#87)
hroederld Apr 29, 2020
e61e2cb
[ch74995] basic stream mock (#88)
hroederld Apr 29, 2020
4ff7688
undelete docs directory (#91)
hroederld Apr 30, 2020
8c2fd44
Merge github.com:launchdarkly/c-server-sdk
hroederld Apr 30, 2020
3067628
Merge branch 'master' of github.com:launchdarkly/c-server-sdk-private
hroederld Apr 30, 2020
6c0e202
merge from public after release
LaunchDarklyCI Apr 30, 2020
b6aae2a
[ch76282] wrapper metadata config (#92)
hroederld May 12, 2020
77dc800
merge from public after release
LaunchDarklyCI May 12, 2020
d3d0ff4
[ch78853] Add 32 bit linux CI (#93)
hroederld Jun 5, 2020
9d29115
[ch80280] usleep error (#94)
hroederld Jun 18, 2020
2979e35
merge from public after release
LaunchDarklyCI Jun 18, 2020
460b3ed
[ch80280] skip sleep on EINTR
hroederld Jun 19, 2020
236af00
merge from public after release
LaunchDarklyCI Jun 19, 2020
8c1fc5b
[ch80617] c sdk common (#96)
hroederld Jun 22, 2020
3b51258
[ch80617] add common headers to doxygen
hroederld Jun 22, 2020
78de393
[ch81023] accept header (#98)
hroederld Jun 25, 2020
9d43c96
merge from public after release
LaunchDarklyCI Jun 25, 2020
14accbb
[ch81049] add common/include to public header export
hroederld Jun 30, 2020
94dd087
[ch81355] fix experimentation events (#100)
hroederld Jul 1, 2020
038dec6
merge from public after release
LaunchDarklyCI Jul 2, 2020
006b5ce
[ch94759] bump xcode to next circleci supported version
hroederld Nov 17, 2020
28efd98
[ch94757] cleanup staticGetValue after use in test #101
hroederld Nov 17, 2020
b58a9fb
[ch94758] run valgrind memcheck in linux ci (#103)
hroederld Nov 17, 2020
c1a53ad
[ch94776] fix helgrind warning #104
hroederld Nov 18, 2020
c5272e4
[ch94759] releaser upgrade xcode version #105
hroederld Nov 18, 2020
4344aa4
[ch95201] Update to use LDBasicLoggerThreadSafe in tests (#106)
hroederld Nov 23, 2020
fa6e7b0
merge from public after release
LaunchDarklyCI Nov 24, 2020
6bbc2ee
[ch97247] more coverage and bug fixes (#107)
hroederld Jan 8, 2021
57837a6
[ch97472] use Findhiredis (#108)
hroederld Jan 13, 2021
65acae2
merge from public after release
LaunchDarklyCI Jan 14, 2021
6c204a5
[ch99403] Add Alias method (#110)
hroederld Jan 27, 2021
d37fa42
merge from public after release
LaunchDarklyCI Jan 28, 2021
9d13969
[ch99260] Add O3 build and cleanup warnings (#109)
hroederld Jan 29, 2021
77b20b3
Update c-sdk-common (#111)
hroederld Jan 31, 2021
d66fa39
Removed the guides link
bwoskow-ld Feb 3, 2021
1e391f1
[ch100420] Hook in c-sdk-common LDUser (#112)
hroederld Feb 7, 2021
a37819e
run clang format (#113)
hroederld Feb 7, 2021
c97e586
Forgotten clang-format and C standard audit. (#114)
hroederld Feb 8, 2021
f501486
minor merge conflict in public contribution
hroederld May 13, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ workflows:
build_and_test_all:
jobs:
- build-test-linux
- build-test-linux-optimized
- build-test-linux-32bit
- build-test-osx
- build-test-windows
Expand All @@ -33,6 +34,26 @@ jobs:
cd build
ctest -T memcheck

build-test-linux-optimized:
docker:
- image: ldcircleci/ld-c-sdk-ubuntu # defined in sdks-ci-docker project
- image: redis
environment:
CTEST_OUTPUT_ON_FAILURE: 1
steps:
- checkout
- run:
name: Build
command: |
mkdir build && cd build
cmake -D CMAKE_BUILD_TYPE=Release -D REDIS_STORE=ON ..
cmake --build .
- run:
name: Unit test
command: |
cd build
make test

build-test-linux-32bit:
docker:
- image: i386/ubuntu:18.04
Expand Down
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,11 @@ else()
-pedantic
-Wall
-Wextra
-Werror
-Wstrict-prototypes
-Wmissing-prototypes
-Wmissing-declarations
-std=c89
)
endif(MSVC)

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ We encourage pull requests and other contributions from the community. Check out
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
* [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
* [blog.launchdarkly.com](https://blog.launchdarkly.com/ "LaunchDarkly Blog Documentation") for the latest product updates
* [Feature Flagging Guide](https://github.com/launchdarkly/featureflags/ "Feature Flagging Guide") for best practices and strategies
47 changes: 42 additions & 5 deletions c-sdk-common/.circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
version: 2.1

orbs:
win: circleci/windows@1.0.0

workflows:
version: 2
build_and_test_all:
jobs:
- build-test-linux
- build-test-osx
- build-test-windows

jobs:
build-test-linux:
docker:
Expand All @@ -13,8 +19,39 @@ jobs:
- checkout
- run:
name: Build
command: |
mkdir -p build
cd build
cmake ..
make
command: mkdir -p build && cd build && cmake .. && make
- run:
name: Test
command: cd build && make test

build-test-osx:
macos:
xcode: "9.4.1"
environment:
CTEST_OUTPUT_ON_FAILURE: 1
steps:
- checkout
- run:
name: Install prerequisites
command: HOMEBREW_NO_AUTO_UPDATE=1 brew install cmake
- run:
name: Build
command: mkdir -p build && cd build && cmake .. && make
- run:
name: Test
command: cd build && make test

build-test-windows:
executor:
name: win/vs2019
shell: powershell.exe
environment:
CTEST_OUTPUT_ON_FAILURE: 1
steps:
- checkout
- run:
name: build
command: ./scripts/build.ps1
- run:
name: Test
command: ./scripts/test.ps1
29 changes: 29 additions & 0 deletions c-sdk-common/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
ColumnLimit: 80
IndentWidth: 4

AllowShortBlocksOnASingleLine: Never
AllowShortFunctionsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortIfStatementsOnASingleLine: Never

BinPackArguments: false
BinPackParameters: false

AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakAfterReturnType: All

AlignConsecutiveAssignments: true
AlignAfterOpenBracket: AlwaysBreak
AlignConsecutiveDeclarations: true
AllowAllArgumentsOnNextLine: true
AllowAllParametersOfDeclarationOnNextLine: true

BreakStringLiterals: true
BreakBeforeBraces: Custom
BraceWrapping:
AfterEnum: true
AfterStruct: true
SplitEmptyFunction: true
AfterFunction: true
AfterControlStatement: MultiLine
Loading