2019-01-12 13:11:18 +01:00
|
|
|
freebsd_instance:
|
2020-05-21 21:57:36 +02:00
|
|
|
image_family: freebsd-12-1
|
2019-01-12 13:08:10 +01:00
|
|
|
|
|
|
|
main_task:
|
2020-05-21 21:57:36 +02:00
|
|
|
install_script:
|
|
|
|
- uname -a
|
|
|
|
- pkg install -y cmake
|
|
|
|
|
2019-01-12 13:11:18 +01:00
|
|
|
script:
|
2019-05-24 04:51:13 +02:00
|
|
|
- CMAKE_C_FLAGS="-Werror"
|
|
|
|
- CMAKE_CXX_FLAGS="-Werror"
|
|
|
|
|
2019-01-12 13:15:59 +01:00
|
|
|
- ls
|
|
|
|
- cc --version
|
2019-01-12 13:52:48 +01:00
|
|
|
- c++ --version
|
|
|
|
|
|
|
|
# Basic c build
|
|
|
|
- cd lib
|
2019-08-29 08:12:58 +02:00
|
|
|
- cc -Wall -Wextra -Werror --std=gnu89 fort.c -c -o fort.o
|
2019-01-12 13:52:48 +01:00
|
|
|
- rm fort.o
|
|
|
|
- cd ..
|
|
|
|
|
|
|
|
# Basic c++ build
|
|
|
|
- cd lib
|
2019-01-12 14:09:22 +01:00
|
|
|
- cp fort.c fort.cpp
|
2019-08-29 08:12:58 +02:00
|
|
|
- c++ -Wall -Wextra -Werror fort.cpp -c -o fort.o
|
2019-01-12 13:52:48 +01:00
|
|
|
- rm fort.o
|
2019-01-12 14:18:42 +01:00
|
|
|
- rm fort.cpp
|
2019-01-12 14:26:59 +01:00
|
|
|
- cd ..
|
|
|
|
|
|
|
|
# Perform out-of-source build(CMake backend generation, build, and test)
|
|
|
|
# Test build without optimizations and with asan
|
|
|
|
- mkdir -p build
|
|
|
|
- cd build
|
2019-05-24 04:51:13 +02:00
|
|
|
- cmake .. -DFORT_BUILD_TYPE=asan -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}"
|
2019-01-12 14:26:59 +01:00
|
|
|
- cmake --build . --target all
|
|
|
|
- ls
|
2019-04-27 15:17:19 +02:00
|
|
|
- ctest -VV
|
2019-01-13 09:09:47 +01:00
|
|
|
- cd ..
|
|
|
|
- rm -r build/*
|
|
|
|
|
|
|
|
# Test build without optimizations and with ubsan
|
|
|
|
- mkdir -p build
|
|
|
|
- cd build
|
2019-05-24 04:51:13 +02:00
|
|
|
- cmake .. -DFORT_BUILD_TYPE=ubsan -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}"
|
2019-01-13 09:09:47 +01:00
|
|
|
- cmake --build . --target all
|
|
|
|
- ls
|
2019-04-27 15:17:19 +02:00
|
|
|
- ctest -VV
|
2019-01-13 09:09:47 +01:00
|
|
|
- cd ..
|
|
|
|
- rm -r build/*
|
2019-01-13 09:30:54 +01:00
|
|
|
|
2019-08-29 08:12:58 +02:00
|
|
|
# Test without WCHAR and UTF-8 support
|
2019-01-13 09:30:54 +01:00
|
|
|
- mkdir -p build
|
|
|
|
- cd build
|
2019-08-29 08:12:58 +02:00
|
|
|
- cmake .. -DFORT_ENABLE_WCHAR=OFF -DFORT_ENABLE_UTF8=OFF -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_STANDARD=99 -DCMAKE_CXX_STANDARD=11 -DCMAKE_C_FLAGS="${CMAKE_C_FLAGS}" -DCMAKE_CXX_FLAGS="${CMAKE_CXX_FLAGS}"
|
2019-01-13 09:30:54 +01:00
|
|
|
- cmake --build . --target all
|
|
|
|
- ls
|
2019-04-27 15:17:19 +02:00
|
|
|
- ctest -VV
|
2019-01-13 09:30:54 +01:00
|
|
|
- cd ..
|
|
|
|
- rm -r build/*
|