blob: 9cc4c78a57304356cd20b133764b237d2b2b4aea [file] [log] [blame]
Davide Pesavento956ac312016-09-20 19:11:30 +02001#!/usr/bin/env bash
Davide Pesaventobd3642f2022-08-12 18:19:31 -04002set -eo pipefail
Davide Pesaventoa1a9d702020-03-29 00:58:15 -04003
Davide Pesaventod5c24472020-04-01 17:46:18 -04004if [[ -z $DISABLE_ASAN ]]; then
5 ASAN="--with-sanitizer=address"
6fi
Davide Pesavento0771dc52025-03-25 01:15:30 -04007if [[ $JOB_NAME == *code-coverage ]]; then
Davide Pesavento9a659d02018-01-10 02:55:43 -05008 COVERAGE="--with-coverage"
Davide Pesavento9a659d02018-01-10 02:55:43 -05009fi
10
Davide Pesaventobd3642f2022-08-12 18:19:31 -040011set -x
12
Davide Pesavento0771dc52025-03-25 01:15:30 -040013if [[ $JOB_NAME != *code-coverage && $JOB_NAME != *limited-build ]]; then
Davide Pesavento9fa6a782020-03-10 19:47:06 -040014 # Build in release mode with tests
15 ./waf --color=yes configure --with-tests
Davide Pesaventobd3642f2022-08-12 18:19:31 -040016 ./waf --color=yes build
Davide Pesavento956ac312016-09-20 19:11:30 +020017
Davide Pesavento9fa6a782020-03-10 19:47:06 -040018 # Cleanup
Davide Pesaventoa1a9d702020-03-29 00:58:15 -040019 ./waf --color=yes distclean
Davide Pesavento956ac312016-09-20 19:11:30 +020020
Davide Pesavento9fa6a782020-03-10 19:47:06 -040021 # Build in release mode without tests
22 ./waf --color=yes configure
Davide Pesaventobd3642f2022-08-12 18:19:31 -040023 ./waf --color=yes build
Davide Pesavento956ac312016-09-20 19:11:30 +020024
Davide Pesavento9fa6a782020-03-10 19:47:06 -040025 # Cleanup
Davide Pesaventoa1a9d702020-03-29 00:58:15 -040026 ./waf --color=yes distclean
Davide Pesavento956ac312016-09-20 19:11:30 +020027fi
28
Davide Pesavento9fa6a782020-03-10 19:47:06 -040029# Build in debug mode with tests
Davide Pesavento9a659d02018-01-10 02:55:43 -050030./waf --color=yes configure --debug --with-tests $ASAN $COVERAGE
Davide Pesaventobd3642f2022-08-12 18:19:31 -040031./waf --color=yes build
Davide Pesavento956ac312016-09-20 19:11:30 +020032
Davide Pesavento956ac312016-09-20 19:11:30 +020033# Install
Davide Pesaventobd3642f2022-08-12 18:19:31 -040034sudo ./waf --color=yes install