Skip to content

Commit

Permalink
Small changes to travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
Morten Houmøller Nygaard committed Sep 24, 2020
1 parent 721e06a commit 8bc1228
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 18 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Expand Up @@ -3,14 +3,15 @@ build/
log/
doc/
html/
generated/
conf/*.json
!conf/fuzzingclient.json
!conf/autobahn.debug.json
!conf/autobahn.json
!conf/wss.json
*.bak
reports/autobahn-*/*
scripts/
scripts/*
!scripts/travis.sh
!scripts/bump.sh

# Created by https://www.gitignore.io/api/c,vim,linux,macos
Expand Down
23 changes: 9 additions & 14 deletions .travis.yml
@@ -1,42 +1,37 @@
language: c
os: linux
dist: focal

# Blacklist
branches:
only:
- master

services:
- docker

compiler:
- gcc

before_install:
- echo "deb http://ppa.launchpad.net/snaipewastaken/ppa/ubuntu cosmic main" | sudo tee -a ${TRAVIS_ROOT}/etc/apt/sources.list >/dev/null
- sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com CE6500E9003E6E24
- sudo apt-get -q update
- sudo apt-get -y install pkg-config doxygen openssl zlib1g-dev build-essential criterion-dev gcovr graphviz


- docker build -t wsserver/autobahn -f Dockerfile .
stages:
- generate
- deploy
jobs:
include:
-stage: generate
script:
- make test
- make autobahn
- make docs
-stage: deploy
- stage: generate
- script: ./scripts/travis.sh
- script: make test
- script: make autobahn
- script: make jobs
- stage: deploy
deploy:
strategy: git
provider: pages
skip_cleanup: true
local_dir: generated
keep_history: true
github_token: $GH_REPO_TOKEN
keep_history: true
project_name: WSServer
on:
branch: master
6 changes: 6 additions & 0 deletions Makefile
Expand Up @@ -125,6 +125,7 @@ log:
if [[ ! -e $(LOG_FOLDER) ]]; then mkdir -p $(LOG_FOLDER); fi

docs: $(SRC)
rm -rf $(GEN_FOLDER)/documentation
mkdir -p $(GEN_FOLDER)/documentation
doxygen $(CONF_FOLDER)/doxyfile.conf

Expand Down Expand Up @@ -236,6 +237,7 @@ count:

#make autobahn
autobahn: release
rm -rf $(GEN_FOLDER)/autobahn
if [[ ! -e $(GEN_FOLDER) ]]; then mkdir -p $(GEN_FOLDER); fi
$(BIN_FOLDER)/$(NAME) -c $(CONF_FOLDER)/autobahn.json &
sleep 1
Expand All @@ -251,6 +253,7 @@ autobahn: release

#make autobahn
autobahn_debug: debug
rm -rf $(GEN_FOLDER)/autobahn
if [[ ! -e $(GEN_FOLDER) ]]; then mkdir -p $(GEN_FOLDER); fi
valgrind -v --leak-check=full --log-file="$(LOG_FOLDER)/valgrind.log" --track-origins=yes \
--show-reachable=yes $(BIN_FOLDER)/$(NAME) -c $(CONF_FOLDER)/autobahn.debug.json &
Expand All @@ -267,6 +270,7 @@ autobahn_debug: debug

#make autobahn_call
autobahn_call: profiling
rm -rf $(GEN_FOLDER)/autobahn
if [[ ! -e $(GEN_FOLDER) ]]; then mkdir -p $(GEN_FOLDER); fi
valgrind --tool=callgrind --simulate-cache=yes --branch-sim=yes --callgrind-out-file=$(LOG_FOLDER)/$(NAME).callgrind.log $(BIN_FOLDER)/$(NAME) -c $(CONF_FOLDER)/autobahn.debug.json &
sleep 1
Expand All @@ -282,6 +286,7 @@ autobahn_call: profiling

#make autobahn_cache
autobahn_cache: profiling
rm -rf $(GEN_FOLDER)/autobahn
if [[ ! -e $(GEN_FOLDER) ]]; then mkdir -p $(GEN_FOLDER); fi
valgrind --tool=cachegrind --trace-children=yes --cachegrind-out-file=$(LOG_FOLDER)/$(NAME).callgrind.log $(BIN_FOLDER)/$(NAME) -c $(CONF_FOLDER)/autobahn.debug.json &
sleep 1
Expand All @@ -300,6 +305,7 @@ criterion:

#make test
test: criterion subprotocols extensions $(TEST_NAMES) ${addprefix run_,${TEST_NAMES}}
rm -rf $(GEN_FOLDER)/gcov
mkdir -p $(GEN_FOLDER)/gcov
gcovr --object-directory $(BUILD_FOLDER) -r . --html --html-details --html-title $(NAME) -o $(GEN_FOLDER)/gcov/index.html

Expand Down
4 changes: 2 additions & 2 deletions conf/doxyfile.conf
Expand Up @@ -58,7 +58,7 @@ PROJECT_LOGO = resources/logo.doxygen.png
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY = generated/documentation
OUTPUT_DIRECTORY = generated

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
Expand Down Expand Up @@ -1141,7 +1141,7 @@ GENERATE_HTML = YES
# The default directory is: html.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_OUTPUT = html
HTML_OUTPUT = documentation

# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
# generated HTML page (for example: .htm, .php, .asp).
Expand Down
6 changes: 6 additions & 0 deletions scripts/travis.sh
@@ -0,0 +1,6 @@
#!/bin/bash
set -e # Exit with nonzero exit code if anything fails

REPO=`git config remote.origin.url`

git clone $REPO generated

0 comments on commit 8bc1228

Please sign in to comment.