2018-04-12 16:12:22 +03:00
|
|
|
variables:
|
|
|
|
BUILD_IMAGES_PROJECT: libssh/build-images
|
|
|
|
FEDORA_BUILD: buildenv-fedora
|
|
|
|
CENTOS7_BUILD: buildenv-centos7
|
2018-05-25 14:52:30 +03:00
|
|
|
TUMBLEWEED_BUILD: buildenv-tumbleweed
|
2018-06-12 16:15:20 +03:00
|
|
|
MINGW_BUILD: buildenv-mingw
|
2018-07-02 10:06:42 +03:00
|
|
|
DEBIAN_CROSS_BUILD: buildenv-debian-cross
|
2018-04-12 16:12:22 +03:00
|
|
|
|
2018-06-29 11:31:09 +03:00
|
|
|
# torture_auth fails on centos7 docker images, so we don't use -DCLIENT_TESTING=ON
|
2018-04-12 16:12:22 +03:00
|
|
|
centos7/openssl_1.0.x/x86-64:
|
|
|
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS7_BUILD
|
|
|
|
script:
|
2018-08-03 17:41:51 +03:00
|
|
|
- mkdir -p obj && cd obj && cmake3 -DUNIT_TESTING=ON -DCMAKE_BUILD_TYPE=Debug
|
2018-06-28 09:53:10 +03:00
|
|
|
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
|
2018-04-12 16:12:22 +03:00
|
|
|
-DWITH_PCAP=ON .. && make -j$(nproc) && ctest --output-on-failure
|
|
|
|
tags:
|
|
|
|
- shared
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
2018-06-29 17:53:14 +03:00
|
|
|
- obj/
|
2018-04-12 16:12:22 +03:00
|
|
|
|
|
|
|
fedora/openssl_1.1.x/x86-64:
|
|
|
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
|
|
|
|
script:
|
2018-06-29 11:49:52 +03:00
|
|
|
- mkdir -p obj && cd obj && cmake -DCMAKE_BUILD_TYPE=Debug
|
|
|
|
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON
|
|
|
|
-DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON .. &&
|
|
|
|
make -j$(nproc) && ctest --output-on-failure
|
2018-04-12 16:12:22 +03:00
|
|
|
tags:
|
|
|
|
- shared
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
2018-06-29 17:53:14 +03:00
|
|
|
- obj/
|
2018-04-12 16:12:22 +03:00
|
|
|
|
|
|
|
# Address sanitizer doesn't mix well with LD_PRELOAD used in the testsuite
|
|
|
|
.fedora/address-sanitizer:
|
|
|
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
|
|
|
|
script:
|
2018-06-29 11:49:52 +03:00
|
|
|
- mkdir -p obj && cd obj && cmake
|
|
|
|
-DCMAKE_C_FLAGS="-O2 -g -fsanitize=address"
|
|
|
|
-DCMAKE_LINK_FLAGS="-fsanitize=address -static-libasan"
|
|
|
|
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON
|
|
|
|
-DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON .. &&
|
|
|
|
make -j$(nproc) && ctest --output-on-failure
|
2018-04-12 16:12:22 +03:00
|
|
|
tags:
|
|
|
|
- shared
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
2018-06-29 17:53:14 +03:00
|
|
|
- obj/
|
2018-04-12 16:12:22 +03:00
|
|
|
|
|
|
|
fedora/undefined-sanitizer:
|
|
|
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
|
|
|
|
script:
|
2018-06-29 11:49:52 +03:00
|
|
|
- mkdir -p obj && cd obj && cmake
|
|
|
|
-DCMAKE_C_FLAGS="-fsanitize=undefined -fsanitize=null -fsanitize=alignment -fno-sanitize-recover"
|
|
|
|
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON
|
|
|
|
-DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON ..
|
|
|
|
&& make -j$(nproc) && ctest --output-on-failure
|
2018-04-12 16:12:22 +03:00
|
|
|
tags:
|
|
|
|
- shared
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
2018-06-29 17:53:14 +03:00
|
|
|
- obj/
|
2018-04-12 16:12:22 +03:00
|
|
|
|
|
|
|
fedora/static-analysis:
|
|
|
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
|
|
|
|
script:
|
|
|
|
- export CCC_CC=clang
|
|
|
|
- export CCC_CXX=clang++
|
2018-06-29 11:49:52 +03:00
|
|
|
- mkdir -p obj && cd obj && scan-build cmake -DCMAKE_BUILD_TYPE=Debug
|
|
|
|
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON
|
|
|
|
-DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON
|
|
|
|
-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang .. &&
|
2018-04-12 16:12:22 +03:00
|
|
|
scan-build --status-bugs -o scan make -j$(nproc)
|
|
|
|
tags:
|
|
|
|
- shared
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
2018-06-29 17:53:14 +03:00
|
|
|
- obj/scan
|
2018-04-12 16:12:22 +03:00
|
|
|
|
|
|
|
# That is a specific runner that we cannot enable universally.
|
|
|
|
# We restrict it to builds under the $BUILD_IMAGES_PROJECT project.
|
|
|
|
freebsd/x86-64:
|
|
|
|
image:
|
|
|
|
script:
|
2018-06-29 11:49:52 +03:00
|
|
|
- mkdir -p obj && cd obj && cmake -DCMAKE_BUILD_TYPE=Debug
|
|
|
|
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON
|
2018-06-29 12:43:51 +03:00
|
|
|
-DUNIT_TESTING=ON .. &&
|
|
|
|
make && ctest --output-on-failure
|
2018-04-12 16:12:22 +03:00
|
|
|
tags:
|
|
|
|
- freebsd
|
|
|
|
except:
|
|
|
|
- tags
|
2018-07-03 12:08:56 +03:00
|
|
|
only:
|
|
|
|
- branches@libssh/libssh-mirror
|
|
|
|
- branches@cryptomilk/libssh-mirror
|
2018-04-12 16:12:22 +03:00
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
2018-06-29 17:53:14 +03:00
|
|
|
- obj/
|
2018-04-12 16:12:22 +03:00
|
|
|
|
2018-06-27 12:58:55 +03:00
|
|
|
fedora/libgcrypt/x86-64:
|
2018-04-12 16:12:22 +03:00
|
|
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
|
|
|
|
script:
|
2018-06-29 11:49:52 +03:00
|
|
|
- mkdir -p obj && cd obj && cmake -DCMAKE_BUILD_TYPE=Debug
|
|
|
|
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON
|
|
|
|
-DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON
|
|
|
|
-DWITH_GCRYPT=ON .. &&
|
|
|
|
make -j$(nproc) && ctest --output-on-failure
|
2018-04-12 16:12:22 +03:00
|
|
|
tags:
|
|
|
|
- shared
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
2018-06-29 17:53:14 +03:00
|
|
|
- obj/
|
2018-05-25 14:52:30 +03:00
|
|
|
|
2018-06-27 12:59:18 +03:00
|
|
|
fedora/mbedtls/x86-64:
|
|
|
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD
|
|
|
|
script:
|
2018-06-29 11:49:52 +03:00
|
|
|
- mkdir -p obj && cd obj && cmake -DCMAKE_BUILD_TYPE=Debug
|
|
|
|
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON
|
|
|
|
-DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON
|
|
|
|
-DWITH_MBEDTLS=ON .. &&
|
|
|
|
make -j$(nproc) && ctest --output-on-failure
|
2018-06-27 12:59:18 +03:00
|
|
|
tags:
|
|
|
|
- shared
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
2018-06-29 17:53:14 +03:00
|
|
|
- obj/
|
2018-06-27 12:59:18 +03:00
|
|
|
|
2018-05-25 14:52:30 +03:00
|
|
|
tumbleweed/openssl_1.1.x/x86-64:
|
|
|
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD
|
|
|
|
script:
|
2018-06-29 11:49:52 +03:00
|
|
|
- mkdir -p obj && cd obj && cmake -DCMAKE_BUILD_TYPE=Debug
|
|
|
|
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON
|
|
|
|
-DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON .. &&
|
|
|
|
make -j$(nproc) && ctest --output-on-failure
|
2018-05-25 14:52:30 +03:00
|
|
|
tags:
|
|
|
|
- shared
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
2018-06-29 17:53:14 +03:00
|
|
|
- obj/
|
2018-05-25 14:52:30 +03:00
|
|
|
|
2018-06-29 18:04:57 +03:00
|
|
|
tumbleweed/openssl_1.1.x/x86:
|
|
|
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD
|
|
|
|
script:
|
2018-06-30 16:41:50 +03:00
|
|
|
- mkdir -p obj && cd obj && cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cross-m32.cmake
|
2018-06-29 18:04:57 +03:00
|
|
|
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON
|
|
|
|
-DUNIT_TESTING=ON .. &&
|
|
|
|
make -j$(nproc) && ctest --output-on-failure
|
|
|
|
tags:
|
|
|
|
- shared
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- obj/
|
|
|
|
|
2018-05-25 14:52:30 +03:00
|
|
|
tumbleweed/undefined-sanitizer:
|
|
|
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD
|
|
|
|
script:
|
2018-06-29 11:49:52 +03:00
|
|
|
- mkdir -p obj && cd obj && cmake
|
|
|
|
-DCMAKE_C_FLAGS="-fsanitize=undefined -fsanitize=null -fsanitize=alignment -fno-sanitize-recover"
|
|
|
|
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON
|
|
|
|
-DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON ..
|
|
|
|
&& make -j$(nproc) && ctest --output-on-failure
|
2018-05-25 14:52:30 +03:00
|
|
|
tags:
|
|
|
|
- shared
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
2018-06-29 17:53:14 +03:00
|
|
|
- obj/
|
2018-05-25 14:52:30 +03:00
|
|
|
|
|
|
|
tumbleweed/static-analysis:
|
|
|
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD
|
|
|
|
script:
|
|
|
|
- export CCC_CC=clang
|
|
|
|
- export CCC_CXX=clang++
|
2018-06-29 11:49:52 +03:00
|
|
|
- mkdir -p obj && cd obj && scan-build cmake -DCMAKE_BUILD_TYPE=Debug
|
|
|
|
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON
|
|
|
|
-DUNIT_TESTING=ON -DCLIENT_TESTING=ON -DSERVER_TESTING=ON
|
|
|
|
-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang .. &&
|
2018-05-25 14:52:30 +03:00
|
|
|
scan-build --status-bugs -o scan make -j$(nproc)
|
|
|
|
tags:
|
|
|
|
- shared
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
2018-06-29 17:53:14 +03:00
|
|
|
- obj/scan
|
2018-06-12 16:15:20 +03:00
|
|
|
|
|
|
|
# Unit testing only, no client and pkd testing, because cwrap is not available
|
|
|
|
# for MinGW
|
|
|
|
mingw64:
|
|
|
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$MINGW_BUILD
|
|
|
|
script:
|
2018-06-27 14:19:21 +03:00
|
|
|
- Xvfb :1 -screen 0 1024x768x16 -ac +extension GLX +render -noreset -nolisten tcp &
|
|
|
|
- export DISPLAY=:1
|
2018-06-27 11:16:45 +03:00
|
|
|
- mkdir -p obj && cd obj && mingw64-cmake -DCMAKE_BUILD_TYPE=Debug
|
2018-06-29 11:49:52 +03:00
|
|
|
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON
|
|
|
|
-DUNIT_TESTING=ON .. &&
|
|
|
|
make -j$(nproc)
|
2018-06-27 14:19:21 +03:00
|
|
|
- export WINEPATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin
|
|
|
|
- ctest --output-on-failure
|
2018-06-12 16:15:20 +03:00
|
|
|
tags:
|
|
|
|
- shared
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
2018-06-29 17:53:14 +03:00
|
|
|
- obj/
|
2018-06-12 16:15:20 +03:00
|
|
|
|
|
|
|
# Unit testing only, no client and pkd testing, because cwrap is not available
|
|
|
|
# for MinGW
|
|
|
|
mingw32:
|
|
|
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$MINGW_BUILD
|
|
|
|
script:
|
2018-06-27 14:19:21 +03:00
|
|
|
- Xvfb :1 -screen 0 1024x768x16 -ac +extension GLX +render -noreset -nolisten tcp &
|
|
|
|
- export DISPLAY=:1
|
2018-06-27 11:16:45 +03:00
|
|
|
- mkdir -p obj && cd obj && mingw32-cmake -DCMAKE_BUILD_TYPE=Debug
|
2018-06-29 11:49:52 +03:00
|
|
|
-DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON
|
|
|
|
-DUNIT_TESTING=ON .. &&
|
|
|
|
make -j$(nproc)
|
2018-06-27 14:19:21 +03:00
|
|
|
- export WINEPATH=/usr/i686-w64-mingw32/sys-root/mingw/bin
|
|
|
|
- ctest --output-on-failure
|
2018-06-12 16:15:20 +03:00
|
|
|
tags:
|
|
|
|
- shared
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
2018-06-29 17:53:14 +03:00
|
|
|
- obj/
|
2018-06-29 17:29:34 +03:00
|
|
|
|
|
|
|
.Debian.cross.template: &Debian_cross_template
|
2018-06-29 18:26:34 +03:00
|
|
|
stage: test
|
2018-06-29 17:29:34 +03:00
|
|
|
image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$DEBIAN_CROSS_BUILD
|
|
|
|
script:
|
|
|
|
- build=$(dpkg-architecture -qDEB_HOST_GNU_TYPE)
|
|
|
|
- host="${CI_JOB_NAME#*.cross.}"
|
2018-07-02 10:36:09 +03:00
|
|
|
- mkdir -p obj && cd obj && cmake
|
|
|
|
-DCMAKE_C_COMPILER="$(which $host-gcc)"
|
|
|
|
-DCMAKE_CXX_COMPILER="$(which $host-g++)"
|
|
|
|
-DCMAKE_BUILD_TYPE=Debug
|
|
|
|
-DUNIT_TESTING=ON -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON
|
2018-06-29 17:29:34 +03:00
|
|
|
-DWITH_PCAP=ON .. && make -j$(nproc)
|
|
|
|
- ctest --output-on-failure -j$(nproc)
|
|
|
|
tags:
|
|
|
|
- shared
|
|
|
|
except:
|
|
|
|
- tags
|
|
|
|
artifacts:
|
|
|
|
expire_in: 1 week
|
|
|
|
when: on_failure
|
|
|
|
paths:
|
|
|
|
- obj/
|
|
|
|
|
|
|
|
Debian.cross.mips-linux-gnu:
|
|
|
|
<<: *Debian_cross_template
|