Skip to content

Commit

Permalink
Add closure allocations check to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mihails-strasuns-sociomantic authored and Gavin Norman committed May 25, 2018
1 parent 5609890 commit 984bb15
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ jobs:
env: DMD=2.070.2.s* F=devel

# Additional stages
#
- stage: Closure allocation check
env: DMD=2.070.2.s* F=devel
install: beaver dlang install
script: ci/closures.sh

- stage: D2 Release
if: tag IS present AND NOT tag =~ \+d2$
Expand Down
12 changes: 12 additions & 0 deletions ci/closures.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh
set -xe

# Enables printing of all potential GC allocation sources to stdout
export DFLAGS=-vgc

# Prepare sources
beaver dlang make d2conv

# Ensure that there are no lines about closure allocations in the output
# Filters away errors from submodules to focus on swarm own code only
! beaver dlang make fasttest 2>&1 | grep "\./src/.*\<closure\>"

0 comments on commit 984bb15

Please sign in to comment.