Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous integration testing on GCC and Clang #16

Open
potswa opened this issue Nov 10, 2018 · 6 comments
Open

Continuous integration testing on GCC and Clang #16

potswa opened this issue Nov 10, 2018 · 6 comments

Comments

@potswa
Copy link
Owner

potswa commented Nov 10, 2018

Currently this project runs AppVeyor CI checking MSVC compatibility. My laptop has GCC 5.1 and Clang 3.6 which are quite old. Everything else is checked ad-hoc on an online compiler. It would be nice to test many compiler + version + standard library + language flag combinations using a proper CI service.

One thing that was significant in 2015 (when I created this) was that Linux used the GCC library even with Clang. If that's still the case, then mind the coverage.

@jbcoe
Copy link

jbcoe commented Nov 10, 2018

I could try to introduce travis CI for clang and gcc on Linux and macOS based on https://github.com/jbcoe/polymorphic_value/blob/master/.travis.yml

@potswa
Copy link
Owner Author

potswa commented Nov 10, 2018

That would be great! Let me know how it goes.

@jbcoe
Copy link

jbcoe commented Nov 10, 2018

Do you have a link to the AppVeyor CI project?

@potswa
Copy link
Owner Author

potswa commented Nov 10, 2018

https://ci.appveyor.com/project/potswa/cxx-function/ (it fails on one testcase)

If it helps, here's my local test script:

GCCINC=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/

failures=''

for testcase in $*; do
    echo "== $testcase =="
    for lang in c++11 c++14; do
        echo clang $lang && clang++ -std=$lang -I . -Wall -Wextra $TESTOPTS -o check $testcase && ./check || failures="$failures $testcase clang, "
        echo gcc $lang && /baseline/usr/local/bin/g++ -std=$lang -isystem $GCCINC -I . -Wall -Wextra $TESTOPTS -o check $testcase && DYLD_LIBRARY_PATH=/baseline/usr/local/lib ./check || failures="$failures $testcase gcc, "
        echo clang+libstdc++ && clang++ $testcase -o check -I . -nostdlib -isystem /baseline/usr/local/include/c++/5.1.0/ -isystem /baseline/usr/local/include/c++/5.1.0/x86_64-apple-darwin14.3.0/ -lc /baseline/usr/local/lib/libsupc++.a /baseline/usr/local/lib/libstdc++.a -std=c++11 /baseline/usr/local/lib/gcc/x86_64-apple-darwin14.3.0/5.1.0/libgcc_eh.a $TESTOPTS -w || failures="$failures $testcase clang+libstdc++, "
    done
done

if [ "$failures" ]; then
    echo FAIL $failures
else
    echo SUCCESS
fi

@jbcoe
Copy link

jbcoe commented Nov 11, 2018

Would you be opposed to me adding CMake support? It would make things more standard.

@potswa
Copy link
Owner Author

potswa commented Nov 12, 2018

Sure. This recent branch might help: https://github.com/CMakeezer/cxx_function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants