Merge pull request #84 from LNIS-Projects/dev
Add compiler compatibility tests to Travis CI
This commit is contained in:
commit
bcbc583593
70
.travis.yml
70
.travis.yml
|
@ -15,7 +15,7 @@ cache:
|
||||||
|
|
||||||
# Supported Operating systems
|
# Supported Operating systems
|
||||||
dist: bionic
|
dist: bionic
|
||||||
compiler: g++-8
|
#compiler: g++-8
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
|
@ -33,8 +33,6 @@ addons:
|
||||||
- doxygen
|
- doxygen
|
||||||
- flex
|
- flex
|
||||||
- fontconfig
|
- fontconfig
|
||||||
- g++-8
|
|
||||||
- gcc-8
|
|
||||||
- gdb
|
- gdb
|
||||||
- git
|
- git
|
||||||
- gperf
|
- gperf
|
||||||
|
@ -56,6 +54,19 @@ addons:
|
||||||
- zip
|
- zip
|
||||||
- qt5-default
|
- qt5-default
|
||||||
- clang-format-7
|
- clang-format-7
|
||||||
|
# Add all the supported compilers
|
||||||
|
- g++-5
|
||||||
|
- gcc-5
|
||||||
|
- g++-6
|
||||||
|
- gcc-6
|
||||||
|
- g++-7
|
||||||
|
- gcc-7
|
||||||
|
- g++-8
|
||||||
|
- gcc-8
|
||||||
|
- g++-9
|
||||||
|
- gcc-9
|
||||||
|
- clang-6.0
|
||||||
|
- clang-8
|
||||||
#- os: osx
|
#- os: osx
|
||||||
# osx_image: xcode10.2 # we target latest MacOS Mojave
|
# osx_image: xcode10.2 # we target latest MacOS Mojave
|
||||||
# sudo: true
|
# sudo: true
|
||||||
|
@ -76,6 +87,10 @@ addons:
|
||||||
# - libxml++
|
# - libxml++
|
||||||
# - qt5
|
# - qt5
|
||||||
|
|
||||||
|
# Use gcc-8 as default compiler
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- source .travis/common.sh
|
- source .travis/common.sh
|
||||||
- source .travis/install.sh
|
- source .travis/install.sh
|
||||||
|
@ -116,6 +131,55 @@ jobs:
|
||||||
- source .travis/build.sh
|
- source .travis/build.sh
|
||||||
- source .travis/fpga_spice_reg_test.sh
|
- source .travis/fpga_spice_reg_test.sh
|
||||||
|
|
||||||
|
- stage: Test
|
||||||
|
name: "Build Compatibility: GCC-5 (Ubuntu Bionic 18.04)"
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CC=gcc-5 && CXX=g++-5"
|
||||||
|
script:
|
||||||
|
- source .travis/build.sh
|
||||||
|
|
||||||
|
- stage: Test
|
||||||
|
name: "Build Compatibility: GCC-6 (Ubuntu Bionic 18.04)"
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
|
||||||
|
script:
|
||||||
|
- source .travis/build.sh
|
||||||
|
|
||||||
|
- stage: Test
|
||||||
|
name: "Build Compatibility: GCC-7 (Ubuntu Bionic 18.04)"
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
|
||||||
|
script:
|
||||||
|
- source .travis/build.sh
|
||||||
|
|
||||||
|
- stage: Test
|
||||||
|
name: "Build Compatibility: GCC-8 (Ubuntu Bionic 18.04)"
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"
|
||||||
|
script:
|
||||||
|
- source .travis/build.sh
|
||||||
|
|
||||||
|
- stage: Test
|
||||||
|
name: "Build Compatibility: GCC-9 (Ubuntu Bionic 18.04)"
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CC=gcc-9 && CXX=g++-9"
|
||||||
|
script:
|
||||||
|
- source .travis/build.sh
|
||||||
|
|
||||||
|
- stage: Test
|
||||||
|
name: "Build Compatibility: Clang-6 (Ubuntu Bionic 18.04)"
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
|
||||||
|
script:
|
||||||
|
- source .travis/build.sh
|
||||||
|
|
||||||
|
- stage: Test
|
||||||
|
name: "Build Compatibility: Clang-8 (Ubuntu Bionic 18.04)"
|
||||||
|
env:
|
||||||
|
- MATRIX_EVAL="CC=clang-8 && CXX=clang++-8"
|
||||||
|
script:
|
||||||
|
- source .travis/build.sh
|
||||||
|
|
||||||
#after_failure:
|
#after_failure:
|
||||||
# - .travis/after_failure.sh
|
# - .travis/after_failure.sh
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,9 @@ if [[ $TRAVIS_OS_NAME == 'osx' ]]; then
|
||||||
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / -allowUntrusted
|
sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / -allowUntrusted
|
||||||
else
|
else
|
||||||
# For linux, we use g++-8 and gcc-8 as default compilers
|
# For linux, we use g++-8 and gcc-8 as default compilers
|
||||||
export CC=gcc-8
|
eval "${MATRIX_EVAL}"
|
||||||
export CXX=g++-8
|
export "CC=$CC"
|
||||||
|
export "CXX=$CXX"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -459,7 +459,7 @@ void read_xml_output_mask(pugi::xml_node& xml_port,
|
||||||
if (circuit_lib.port_size(port) != mask_vector.size()) {
|
if (circuit_lib.port_size(port) != mask_vector.size()) {
|
||||||
archfpga_throw(loc_data.filename_c_str(), loc_data.line(xml_port),
|
archfpga_throw(loc_data.filename_c_str(), loc_data.line(xml_port),
|
||||||
"Invalid lut_output_mask attribute '%s'! It must match the port size (=%lu)\n",
|
"Invalid lut_output_mask attribute '%s'! It must match the port size (=%lu)\n",
|
||||||
output_mask_attr, circuit_lib.port_size(port));
|
output_mask_attr.c_str(), circuit_lib.port_size(port));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
/* By default, we give a mask vector covering each pin of the port */
|
/* By default, we give a mask vector covering each pin of the port */
|
||||||
|
|
|
@ -67,7 +67,7 @@ bool parse_command(const std::vector<std::string>& argv,
|
||||||
/* Validate that the command name matches argv[0] */
|
/* Validate that the command name matches argv[0] */
|
||||||
if (argv[0] != cmd.name()) {
|
if (argv[0] != cmd.name()) {
|
||||||
VTR_LOG("Unexpected command name '%s'!\n",
|
VTR_LOG("Unexpected command name '%s'!\n",
|
||||||
argv[0]);
|
argv[0].c_str());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
* Include header files that are required by function declaration
|
* Include header files that are required by function declaration
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
|
#include <stddef.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
|
|
|
@ -140,7 +140,7 @@ float string_to_unit(const std::string& scale) {
|
||||||
/* Invalid unit report error */
|
/* Invalid unit report error */
|
||||||
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
||||||
"Invalid unit %s!\nAcceptable units are [a|f|p|n|u|k|M|B|T] or empty\n",
|
"Invalid unit %s!\nAcceptable units are [a|f|p|n|u|k|M|B|T] or empty\n",
|
||||||
scale);
|
scale.c_str());
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -153,13 +153,13 @@ float string_to_time_unit(const std::string& scale) {
|
||||||
&& (2 != scale.length()) ) {
|
&& (2 != scale.length()) ) {
|
||||||
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
||||||
"Time unit (='%s') must contain only one or two characters!\n",
|
"Time unit (='%s') must contain only one or two characters!\n",
|
||||||
scale);
|
scale.c_str());
|
||||||
}
|
}
|
||||||
/* The last character must be 's' */
|
/* The last character must be 's' */
|
||||||
if ('s' != scale.back()) {
|
if ('s' != scale.back()) {
|
||||||
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
VTR_LOGF_ERROR(__FILE__, __LINE__,
|
||||||
"Time unit (='%s') must end with 's'!\n",
|
"Time unit (='%s') must end with 's'!\n",
|
||||||
scale);
|
scale.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
float unit = 1.;
|
float unit = 1.;
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
* Include header files required by the data structure definition
|
* Include header files required by the data structure definition
|
||||||
*******************************************************************/
|
*******************************************************************/
|
||||||
|
#include <stddef.h>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
/* Begin namespace openfpga */
|
/* Begin namespace openfpga */
|
||||||
|
|
Loading…
Reference in New Issue