Skip to content

Commit

Permalink
BLD Enable a profiling build on gitlab - manually triggered
Browse files Browse the repository at this point in the history
  • Loading branch information
unode committed Feb 13, 2020
1 parent 84e6c4a commit b8827e8
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,42 @@ build-and-test-ubuntu-wsl:
- Modules/packages/
expire_in: 1 month

build-and-test-ubuntu-wsl-profiling:
image: registry.gitlab.com/ngless/ngless/ubuntu-ghc-stack:wsl
stage: build

before_script:
- apt update
- apt upgrade -y
- stack upgrade
- mkdir bin
# Workaround gitlab memory limits with a swapfile
- dd if=/dev/zero of=/var/tmp/swapfile bs=1M count=2048 && mkswap /var/tmp/swapfile && chmod 600 /var/tmp/swapfile && swapon /var/tmp/swapfile && free
# Needed for tests that print UTF8 characters such as motus
# Same issue as https://github.com/commercialhaskell/stack/issues/793

variables:
LC_ALL: "C.UTF-8"
STACKOPTS: "--system-ghc --ghc-options '-fPIC -fprof-auto -rtsopts' --flag NGLess:embed --executable-profiling --library-profiling"
retry: 1

script:
- make modules
- make install prefix=${PWD}
- PATH=${PWD}/bin:$PATH ./run-tests.sh

# Allow this to fail without failing the entire commit
allow_failure: true
# Don't run this step automatically, make it a manually triggered build
when: manual

artifacts:
when: on_success
paths:
- bin/ngless
- Modules/packages/
expire_in: 1 month

build-and-test-ubuntu-non-static:
image: registry.gitlab.com/ngless/ngless/ubuntu-ghc-stack:old
stage: build
Expand Down

0 comments on commit b8827e8

Please sign in to comment.