mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-19 01:03:04 +00:00
CI: add GCC 10 and Clang 10
* .travis.yml: Here. * tests/input.at, tests/regression.at: Beware of clang's -Wdocumentation.
This commit is contained in:
96
.travis.yml
96
.travis.yml
@@ -69,53 +69,53 @@ jobs:
|
|||||||
|
|
||||||
# Start with three completely different environments, to get errors asap.
|
# Start with three completely different environments, to get errors asap.
|
||||||
|
|
||||||
- name: "GCC 9 -O3"
|
- name: "GCC 10 -O3"
|
||||||
stage: check
|
stage: check
|
||||||
os: linux
|
os: linux
|
||||||
dist: bionic
|
dist: bionic
|
||||||
addons: &gcc9
|
addons: &gcc10
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
# See https://github.com/travis-ci/apt-source-safelist/issues/410.
|
# See https://github.com/travis-ci/apt-source-safelist/issues/410.
|
||||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||||
packages: g++-9
|
packages: g++-10
|
||||||
env:
|
env:
|
||||||
- CC=gcc-9
|
- CC=gcc-10
|
||||||
- CXX=g++-9
|
- CXX=g++-10
|
||||||
- CONFIGUREFLAGS='CPPFLAGS=-DNDEBUG CFLAGS=-O3 CXXFLAGS=-O3'
|
- CONFIGUREFLAGS='CPPFLAGS=-DNDEBUG CFLAGS=-O3 CXXFLAGS=-O3'
|
||||||
|
|
||||||
# ASAN is time consuming, and we timeout the 50min granted by
|
# ASAN is time consuming, and we timeout the 50min granted by
|
||||||
# Travis if we run all the tests in one go. Run in two parts.
|
# Travis if we run all the tests in one go. Run in two parts.
|
||||||
- name: "Clang 9 libc++ and ASAN part 1"
|
- name: "Clang 10 libc++ and ASAN part 1"
|
||||||
stage: check
|
stage: check
|
||||||
os: linux
|
os: linux
|
||||||
dist: bionic
|
dist: bionic
|
||||||
addons: &clang9
|
addons: &clang10
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
# See https://github.com/travis-ci/apt-source-safelist/issues/410.
|
# See https://github.com/travis-ci/apt-source-safelist/issues/410.
|
||||||
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||||
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
|
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main'
|
||||||
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||||
packages:
|
packages:
|
||||||
- clang-9
|
- clang-10
|
||||||
- libc++-9-dev
|
- libc++-10-dev
|
||||||
- libc++abi-9-dev
|
- libc++abi-10-dev
|
||||||
env:
|
env:
|
||||||
# Do not use ASAN with ubuntu's libc++: https://bugs.llvm.org/show_bug.cgi?id=17379
|
# Do not use ASAN with ubuntu's libc++: https://bugs.llvm.org/show_bug.cgi?id=17379
|
||||||
- CC='clang-9 -fsanitize=address'
|
- CC='clang-10 -fsanitize=address'
|
||||||
- CXX='clang++-9 -fsanitize=address -stdlib=libc++'
|
- CXX='clang++-10 -fsanitize=address -stdlib=libc++'
|
||||||
- PART=1
|
- PART=1
|
||||||
|
|
||||||
- name: "Clang 9 libc++ and ASAN part 2"
|
- name: "Clang 10 libc++ and ASAN part 2"
|
||||||
stage: check
|
stage: check
|
||||||
os: linux
|
os: linux
|
||||||
dist: bionic
|
dist: bionic
|
||||||
addons: *clang9
|
addons: *clang10
|
||||||
env:
|
env:
|
||||||
# Do not use ASAN with ubuntu's libc++: https://bugs.llvm.org/show_bug.cgi?id=17379
|
# Do not use ASAN with ubuntu's libc++: https://bugs.llvm.org/show_bug.cgi?id=17379
|
||||||
- CC='clang-9 -fsanitize=address'
|
- CC='clang-10 -fsanitize=address'
|
||||||
- CXX='clang++-9 -fsanitize=address -stdlib=libc++'
|
- CXX='clang++-10 -fsanitize=address -stdlib=libc++'
|
||||||
- PART=2
|
- PART=2
|
||||||
|
|
||||||
- name: "ICC"
|
- name: "ICC"
|
||||||
@@ -135,46 +135,41 @@ jobs:
|
|||||||
packages:
|
packages:
|
||||||
- intel-oneapi-icc
|
- intel-oneapi-icc
|
||||||
|
|
||||||
## ------- ##
|
- name: "ARM64: GCC 10 -O3 part 1"
|
||||||
## First. ##
|
|
||||||
## ------- ##
|
|
||||||
|
|
||||||
# Start with three completely different environments, to get
|
|
||||||
# errors asap.
|
|
||||||
|
|
||||||
- name: "ARM64: GCC 9 -O3 part 1"
|
|
||||||
stage: check
|
stage: check
|
||||||
os: linux
|
os: linux
|
||||||
arch: arm64
|
arch: arm64
|
||||||
dist: bionic
|
dist: bionic
|
||||||
addons: *gcc9
|
addons: *gcc10
|
||||||
env:
|
env:
|
||||||
- CC=gcc-9
|
- CC=gcc-10
|
||||||
- CXX=g++-9
|
- CXX=g++-10
|
||||||
- CONFIGUREFLAGS='CPPFLAGS=-DNDEBUG CFLAGS=-O3 CXXFLAGS=-O3'
|
- CONFIGUREFLAGS='CPPFLAGS=-DNDEBUG CFLAGS=-O3 CXXFLAGS=-O3'
|
||||||
- PART=1
|
- PART=1
|
||||||
|
|
||||||
|
# GCC10 on PPC seems to be buggy.
|
||||||
|
# E.g., https://travis-ci.org/github/akimd/bison/jobs/687812428.
|
||||||
- name: "PPC64le: GCC 9 part 1"
|
- name: "PPC64le: GCC 9 part 1"
|
||||||
stage: check
|
stage: check
|
||||||
os: linux
|
os: linux
|
||||||
arch: ppc64le
|
arch: ppc64le
|
||||||
dist: bionic
|
dist: bionic
|
||||||
addons: *gcc9
|
addons: *gcc10
|
||||||
env:
|
env:
|
||||||
- CC=gcc-9
|
- CC=gcc-9
|
||||||
- CXX=g++-9
|
- CXX=g++-9
|
||||||
- CONFIGUREFLAGS='CFLAGS=-O3 CXXFLAGS=-O3'
|
- CONFIGUREFLAGS='CFLAGS=-O3 CXXFLAGS=-O3'
|
||||||
- PART=1
|
- PART=1
|
||||||
|
|
||||||
- name: "s390x: GCC 9 part 1"
|
- name: "s390x: GCC 10 part 1"
|
||||||
stage: check
|
stage: check
|
||||||
os: linux
|
os: linux
|
||||||
arch: s390x
|
arch: s390x
|
||||||
dist: bionic
|
dist: bionic
|
||||||
addons: *gcc9
|
addons: *gcc10
|
||||||
env:
|
env:
|
||||||
- CC=gcc-9
|
- CC=gcc-10
|
||||||
- CXX=g++-9
|
- CXX=g++-10
|
||||||
- CONFIGUREFLAGS='CFLAGS=-O3 CXXFLAGS=-O3'
|
- CONFIGUREFLAGS='CFLAGS=-O3 CXXFLAGS=-O3'
|
||||||
- PART=1
|
- PART=1
|
||||||
|
|
||||||
@@ -182,15 +177,19 @@ jobs:
|
|||||||
## GCC. ##
|
## GCC. ##
|
||||||
## ----- ##
|
## ----- ##
|
||||||
|
|
||||||
- name: "GCC 8 with sanitizers part 1"
|
- name: "GCC 9 with sanitizers part 1"
|
||||||
|
stage: check
|
||||||
os: linux
|
os: linux
|
||||||
dist: bionic
|
dist: bionic
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages: g++-8
|
sources:
|
||||||
|
# See https://github.com/travis-ci/apt-source-safelist/issues/410.
|
||||||
|
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||||
|
packages: g++-9
|
||||||
env:
|
env:
|
||||||
- CC='gcc-8 -fsanitize=undefined,address -fno-omit-frame-pointer'
|
- CC='gcc-9 -fsanitize=undefined,address -fno-omit-frame-pointer'
|
||||||
- CXX='g++-8 -fsanitize=undefined,address -fno-omit-frame-pointer'
|
- CXX='g++-9 -fsanitize=undefined,address -fno-omit-frame-pointer'
|
||||||
- CONFIGUREFLAGS='CFLAGS=-O1 CXXFLAGS=-O1'
|
- CONFIGUREFLAGS='CFLAGS=-O1 CXXFLAGS=-O1'
|
||||||
- PART=1
|
- PART=1
|
||||||
|
|
||||||
@@ -292,7 +291,27 @@ jobs:
|
|||||||
## Clang. ##
|
## Clang. ##
|
||||||
## ------- ##
|
## ------- ##
|
||||||
|
|
||||||
- name: "Clang 8 -O3"
|
- name: "Clang 9 -O3"
|
||||||
|
stage: check
|
||||||
|
os: linux
|
||||||
|
dist: bionic
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
sources:
|
||||||
|
# See https://github.com/travis-ci/apt-source-safelist/issues/410.
|
||||||
|
- sourceline: 'ppa:ubuntu-toolchain-r/test'
|
||||||
|
- sourceline: 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main'
|
||||||
|
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
|
||||||
|
packages:
|
||||||
|
- clang-9
|
||||||
|
- libc++-9-dev
|
||||||
|
- libc++abi-9-dev
|
||||||
|
env:
|
||||||
|
- CC='clang-9'
|
||||||
|
- CXX='clang++-9 -stdlib=libc++'
|
||||||
|
- CONFIGUREFLAGS='CPPFLAGS=-DNDEBUG CFLAGS=-O3 CXXFLAGS=-O3'
|
||||||
|
|
||||||
|
- name: "Clang 8"
|
||||||
stage: check
|
stage: check
|
||||||
os: linux
|
os: linux
|
||||||
dist: bionic
|
dist: bionic
|
||||||
@@ -305,7 +324,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
- CC=clang-8
|
- CC=clang-8
|
||||||
- CXX='clang++-8 -stdlib=libc++'
|
- CXX='clang++-8 -stdlib=libc++'
|
||||||
- CONFIGUREFLAGS='CPPFLAGS=-DNDEBUG CFLAGS=-O3 CXXFLAGS=-O3'
|
|
||||||
|
|
||||||
- name: "Clang 7"
|
- name: "Clang 7"
|
||||||
stage: check
|
stage: check
|
||||||
|
|||||||
@@ -127,3 +127,7 @@ gen-ChangeLog:
|
|||||||
--since=$(gen_start_date) > $$cl.tmp && \
|
--since=$(gen_start_date) > $$cl.tmp && \
|
||||||
mv -f $$cl.tmp $$cl; \
|
mv -f $$cl.tmp $$cl; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Useful to debug.
|
||||||
|
.c.i:
|
||||||
|
$(CC) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -o $@ -E $<
|
||||||
|
|||||||
@@ -1352,8 +1352,20 @@ AT_BISON_CHECK([-fcaret input.y], [1], [],
|
|||||||
]])
|
]])
|
||||||
|
|
||||||
|
|
||||||
|
# Clang chokes on some of our comments, because it tries to "parse"
|
||||||
|
# some documentation directives in the comments:
|
||||||
|
#
|
||||||
|
# input.c:166:50: error: '\a' command does not have a valid word argument [-Werror,-Wdocumentation]
|
||||||
|
# FAKE = 258 /* "fake [] \a\b\f\n\r\t\v\"'?\\[\\ ??!??'??(??)??-??/??<??=??> \001\001" */
|
||||||
|
# ~~^
|
||||||
AT_DATA_GRAMMAR([input.y],
|
AT_DATA_GRAMMAR([input.y],
|
||||||
[[%{
|
[[%code requires {
|
||||||
|
#if defined __clang__ && 10 <= __clang_major__
|
||||||
|
# pragma clang diagnostic ignored "-Wdocumentation"
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
%{
|
||||||
/* This is seen in GCC: a %{ and %} in middle of a comment. */
|
/* This is seen in GCC: a %{ and %} in middle of a comment. */
|
||||||
const char *foo = "So %{ and %} can be here too.";
|
const char *foo = "So %{ and %} can be here too.";
|
||||||
|
|
||||||
|
|||||||
@@ -372,8 +372,19 @@ m4_pushdef([AT_TEST],
|
|||||||
|
|
||||||
AT_BISON_OPTION_PUSHDEFS([$1])
|
AT_BISON_OPTION_PUSHDEFS([$1])
|
||||||
|
|
||||||
|
|
||||||
|
# Clang chokes on some of our comments, because it tries to "parse"
|
||||||
|
# some documentation directives in the comments:
|
||||||
|
#
|
||||||
|
# input.c:131:48: error: '\a' command does not have a valid word argument [-Werror,-Wdocumentation]
|
||||||
|
# SPECIAL = 261 /* "\\'?\"\a\b\f\n\r\t\v\001\201\001\201??!" */
|
||||||
|
# ~~^
|
||||||
AT_DATA_GRAMMAR([input.y],
|
AT_DATA_GRAMMAR([input.y],
|
||||||
[%{
|
[%{
|
||||||
|
#if defined __clang__ && 10 <= __clang_major__
|
||||||
|
# pragma clang diagnostic ignored "-Wdocumentation"
|
||||||
|
#endif
|
||||||
|
|
||||||
]AT_YYERROR_DECLARE[
|
]AT_YYERROR_DECLARE[
|
||||||
]AT_YYLEX_DECLARE[
|
]AT_YYLEX_DECLARE[
|
||||||
%}
|
%}
|
||||||
@@ -398,14 +409,14 @@ exp: ]AT_ERROR_VERBOSE_IF(["\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!"], ["
|
|||||||
# C-string literal. Also notice that unnecessary escaping, such as "\?", from
|
# C-string literal. Also notice that unnecessary escaping, such as "\?", from
|
||||||
# the user specification is eliminated.
|
# the user specification is eliminated.
|
||||||
AT_BISON_CHECK([-fcaret -o input.c input.y], [[0]], [[]],
|
AT_BISON_CHECK([-fcaret -o input.c input.y], [[0]], [[]],
|
||||||
[[input.y:22.8-14: warning: symbol SPECIAL redeclared [-Wother]
|
[[input.y:26.8-14: warning: symbol SPECIAL redeclared [-Wother]
|
||||||
22 | %token SPECIAL "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!"
|
26 | %token SPECIAL "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!"
|
||||||
| ^~~~~~~
|
| ^~~~~~~
|
||||||
input.y:21.8-14: note: previous declaration
|
input.y:25.8-14: note: previous declaration
|
||||||
21 | %token SPECIAL "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!"
|
25 | %token SPECIAL "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!"
|
||||||
| ^~~~~~~
|
| ^~~~~~~
|
||||||
input.y:22.16-63: warning: symbol "\\'?\"\a\b\f\n\r\t\v\001\201\001\201??!" used more than once as a literal string [-Wother]
|
input.y:26.16-63: warning: symbol "\\'?\"\a\b\f\n\r\t\v\001\201\001\201??!" used more than once as a literal string [-Wother]
|
||||||
22 | %token SPECIAL "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!"
|
26 | %token SPECIAL "\\\'\?\"\a\b\f\n\r\t\v\001\201\x001\x000081??!"
|
||||||
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
]])
|
]])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user