62 lines
1.4 KiB
YAML
62 lines
1.4 KiB
YAML
freebsd_instance:
|
|
image: freebsd-12-0-release-amd64
|
|
|
|
main_task:
|
|
script:
|
|
- uname -a
|
|
- ls
|
|
- yes | pkg install cmake
|
|
- cc --version
|
|
- c++ --version
|
|
|
|
# Basic c build
|
|
- cd lib
|
|
- cc -Wall -Wextra -Werror --std=gnu89 -DFT_CONGIG_HAVE_WCHAR fort.c -c -o fort.o
|
|
- rm fort.o
|
|
- cd ..
|
|
|
|
# Basic c++ build
|
|
- cd lib
|
|
- cp fort.c fort.cpp
|
|
- c++ -Wall -Wextra -Werror -DFT_CONGIG_HAVE_WCHAR fort.cpp -c -o fort.o
|
|
- rm fort.o
|
|
- rm fort.cpp
|
|
- cd ..
|
|
|
|
# Perform out-of-source build(CMake backend generation, build, and test)
|
|
# Test build without optimizations and with asan
|
|
- mkdir -p build
|
|
- cd build
|
|
- cmake .. -DFORT_BUILD_TYPE=asan
|
|
- cmake --build . --target all
|
|
- ls
|
|
- ./libfort_example
|
|
- ./libfort_test_dev
|
|
- ./libfort_test
|
|
- cd ..
|
|
- rm -r build/*
|
|
|
|
# Test build without optimizations and with ubsan
|
|
- mkdir -p build
|
|
- cd build
|
|
- cmake .. -DFORT_BUILD_TYPE=ubsan
|
|
- cmake --build . --target all
|
|
- ls
|
|
- ./libfort_example
|
|
- ./libfort_test_dev
|
|
- ./libfort_test
|
|
- cd ..
|
|
- rm -r build/*
|
|
|
|
# Test without WCHAR support
|
|
- mkdir -p build
|
|
- cd build
|
|
- cmake .. -DFORT_ENABLE_WCHAR=OFF
|
|
- cmake --build . --target all
|
|
- ls
|
|
- ./libfort_example
|
|
- ./libfort_test_dev
|
|
- ./libfort_test
|
|
- cd ..
|
|
- rm -r build/*
|