diff options
| author | Rod Vagg <rod@vagg.org> | 2019-10-20 22:38:01 +1100 |
|---|---|---|
| committer | Rod Vagg <rod@vagg.org> | 2019-10-23 15:32:25 +1100 |
| commit | 9bbecd5aa7df5b20b2941983cc0b2081bf654778 (patch) | |
| tree | cbc9539f1911401e57c614a99307e682e433a413 | |
| parent | 4187fcb2001581004280685e78ab0f249d8347e7 (diff) | |
| download | node-new-rvagg/testing-containers.tar.gz | |
build,test: add .ci.yml for containered testsrvagg/testing-containers
| -rw-r--r-- | .ci.yml | 250 | ||||
| -rw-r--r-- | .gitignore | 1 |
2 files changed, 251 insertions, 0 deletions
diff --git a/.ci.yml b/.ci.yml new file mode 100644 index 0000000000..4dcfa7a479 --- /dev/null +++ b/.ci.yml @@ -0,0 +1,250 @@ +# Configuration for ci.nodejs.org +# +# CONTAINER_TESTS list tests that are to be run in: +# https://ci.nodejs.org/job/rv-test-commit-linux-docker +# using container images found at: +# https://github.com/rvagg/node-ci-containers +# +# Each test in this list needs: +# - a `label` that will be used to report to GitHub in the pull request status +# checks. +# - an `image` that corresponds to one of the images found in +# https://github.com/rvagg/node-ci-containers such that it can be pulled +# from Docker Hub as `rvagg/node-ci-containers:$image`. +# - an `execute` block that contains Bash that performs the build & test steps +# required for this build type. +# +# Images are assumed to contain the required packages and data needed to +# perform the build & test steps, while the execution of those steps are +# defined here. +# +# Execution is limited to the `iojs` user in each container, begining in the +# /home/iojs/workspace directory which maps to the current Jenkins workspace on +# the host. + +CONTAINER_TEST: + - ubuntu1804 + - ubuntu1910 + - ubuntu1604-gcc6 + - debian9 + - centos7-devtoolset7 + - fedora30 + - alpine310 + - zlib + - openssl111 + - withoutintl + - withoutssl + - shared + - debug + - ninja + - workers + +ubuntu1804: + label: Ubuntu 18.04 (Bionic) Container + image: ubuntu1804 + execute: | + make run-ci -j $JOBS V= + +# Should be removed when 20.04 is added, or mid-2020, whichever comes first +ubuntu1910: + label: Ubuntu 19.10 (Eoan) Container + image: ubuntu1910 + execute: | + make run-ci -j $JOBS V= + +ubuntu1604-gcc6: + label: Ubuntu 16.04 (Bionic) with GCC 6 Container + image: ubuntu1604-gcc6 + execute: | + make run-ci -j $JOBS V= + +debian9: + label: Debian 9 (Stretch) Container + image: fedora30 + execute: | + make run-ci -j $JOBS V= + +centos7-devtoolset7: + label: CentOS 7 with Devtoolset-7 Container + image: fedora30 + execute: | + make run-ci -j $JOBS V= + +# Should be removed mid-2020 when support ceases +fedora30: + label: Fedora 30 Container + image: fedora30 + execute: | + make run-ci -j $JOBS V= + +# Should be removed mid-2021 or earlier +alpine310: + label: Alpine 3.10 Container + image: alpine310 + execute: | + make run-ci -j $JOBS V= + +zlib: + label: Linux --shared-zlib + image: ubuntu1804-zlib + execute: | + export CONFIG_FLAGS="$CONFIG_FLAGS --shared-zlib --shared-zlib-includes=${ZLIB12DIR}/include/ --shared-zlib-libpath=${ZLIB12DIR}/lib/" + make run-ci -j $JOBS V= + + ZLIB_VERSION="$(out/Release/node -pe process.versions | grep zlib)" + echo "zlib Version: $ZLIB_VERSION" + if [ X"$(echo $ZLIB_VERSION | grep 1\.2\.11)" = X"" ]; then + FAIL_MSG="Not built with zlib 1.2.11, exiting" + echo $FAIL_MSG + echo "1..1" > test.tap + echo "not ok 1 $FAIL_MSG" >> test.tap + exit -1 + fi + +openssl111: + label: Linux --shared-openssl with OpenSSL 1.1.1 + image: ubuntu1804-openssl111 + execute: | + export LD_LIBRARY_PATH=${OPENSSL111DIR}/lib/ + export PATH=${OPENSSL111DIR}/bin/:$PATH + export CONFIG_FLAGS="$CONFIG_FLAGS --shared-openssl --shared-openssl-includes=${OPENSSL111DIR}/include/ --shared-openssl-libpath=${OPENSSL111DIR}/lib/" + make run-ci -j $JOBS V= + + OPENSSL_VERSION="$(out/Release/node -pe 'process.versions.openssl')" + echo "OpenSSL Version: $OPENSSL_VERSION" + if [ X"$(echo $OPENSSL_VERSION | grep 1\.1\.1)" = X"" ]; then + FAIL_MSG="Not built with OpenSSL 1.1.1, exiting" + echo $FAIL_MSG + echo "1..1" > test.tap + echo "not ok 1 $FAIL_MSG" >> test.tap + exit -1 + fi + OPENSSL_LIB="$(out/Release/node -pe 'process.config.target_defaults.libraries[0]')" + echo "OpenSSL link: $OPENSSL_LIB" + if [ X"$(echo $OPENSSL_LIB | grep 1\.1\.1)" = X"" ]; then + FAIL_MSG="Not linked against OpenSSL 1.1.1, exiting" + echo $FAIL_MSG + echo "1..1" > test.tap + echo "not ok 1 $FAIL_MSG" >> test.tap + exit -1 + fi + +withoutintl: + label: Linux --without-intl + image: ubuntu1804 + execute: | + export CONFIG_FLAGS="$CONFIG_FLAGS --without-intl" + make run-ci -j $JOBS V= + + INTL_OBJECT="$(out/Release/node -pe 'typeof Intl')" + echo "Intl object type: $INTL_OBJECT" + if [ X"$INTL_OBJECT" != X"undefined" ]; then + FAIL_MSG="Has an Intl object, exiting" + echo $FAIL_MSG + echo "1..1" > test.tap + echo "not ok 1 $FAIL_MSG" >> test.tap + exit -1 + fi + PROCESS_VERSIONS_INTL="$(out/Release/node -pe process.versions.icu)" + echo "process.versions.icu: $PROCESS_VERSIONS_INTL" + if [ X"$PROCESS_VERSIONS_INTL" != X"undefined" ]; then + FAIL_MSG="process.versions.icu not undefined, exiting" + echo $FAIL_MSG + echo "1..1" > test.tap + echo "not ok 1 $FAIL_MSG" >> test.tap + exit -1 + fi + +withoutssl: + label: Linux --without-ssl + image: ubuntu1804 + execute: | + export CONFIG_FLAGS="$CONFIG_FLAGS --without-ssl" + make run-ci -j $JOBS V= + + HAS_OPENSSL="$(out/Release/node -p 'Boolean(process.versions.openssl)')" + echo "Has OpenSSL: $HAS_OPENSSL" + if [ X"$HAS_OPENSSL" != X"false" ]; then + FAIL_MSG="Has an OpenSSL, exiting" + echo $FAIL_MSG + echo "1..1" > test.tap + echo "not ok 1 $FAIL_MSG" >> test.tap + exit -1 + fi + out/Release/node -p 'require("crypto")' || REQUIRE_CRYPTO="no crypto" + if [ "$REQUIRE_CRYPTO" != "no crypto" ]; then + FAIL_MSG='require("crypto") did not fail, exiting' + echo $FAIL_MSG + echo "1..1" > test.tap + echo "not ok 1 $FAIL_MSG" >> test.tap + exit -1 + fi + + python tools/test.py -j $JOBS -p tap --logfile test.tap --flaky-tests=$FLAKY_TESTS async-hooks default known_issues + +shared: + label: Linux --shared + image: ubuntu1804 + execute: | + export CONFIG_FLAGS="$CONFIG_FLAGS --shared" + make run-ci -j $JOBS V= + +debug: + label: Linux Debug + image: ubuntu1804 + execute: | + export CONFIG_FLAGS="$CONFIG_FLAGS --debug" + + # see https://github.com/nodejs/node/issues/17016 + sed -i 's/\[\$system==linux\]/[$system==linux]\ntest-error-reporting : PASS, FLAKY/g' test/parallel/parallel.status + # see https://github.com/nodejs/node/issues/17017 + sed -i 's/\[\$system==linux\]/[$system==linux]\ntest-inspector-async-stack-traces-promise-then : PASS, FLAKY/g' test/sequential/sequential.status + # see https://github.com/nodejs/node/issues/17018 + sed -i 's/\[\$system==linux\]/[$system==linux]\ntest-inspector-contexts : PASS, FLAKY/g' test/sequential/sequential.status + + make build-ci -j $JOBS V= + + if ! [ -x out/Debug/node ]; then + FAIL_MSG="No Debug executable" + echo $FAIL_MSG + echo "1..1" > test.tap + echo "not ok 1 $FAIL_MSG" >> test.tap + echo " ---" + echo " duration_ms: 0" + echo " ..." + exit 0 + fi + + BUILD_TYPE="$(out/Debug/node -pe process.config.target_defaults.default_configuration)" + echo "Build type: $BUILD_TYPE" + if [ X"$BUILD_TYPE" != X"Debug" ]; then + FAIL_MSG="Not built as Debug" + echo $FAIL_MSG + echo "1..1" > test.tap + echo "not ok 1 $FAIL_MSG" >> test.tap + echo " ---" + echo " duration_ms: 0" + echo " ..." + exit 0 + fi + + python tools/test.py -j $JOBS -p tap --logfile test.tap \ + --mode=debug --flaky-tests=$FLAKY_TESTS \ + async-hooks default known_issues + +ninja: + label: Linux Ninja + image: ubuntu1804 + execute: | + python ./configure --verbose --ninja + ninja -C out/Release -j $JOBS + python tools/test.py -j $JOBS -p tap --logfile test.tap \ + --flaky-tests=$FLAKY_TESTS async-hooks default known_issues + +workers: + label: Linux Worker Test Suite + image: ubuntu1804 + execute: | + make build-ci -j $JOBS V= + python tools/test.py -j $JOBS -p tap --logfile test.tap \ + --flaky-tests=$FLAKY_TESTS --worker default diff --git a/.gitignore b/.gitignore index e50393f003..5aab1c9a74 100644 --- a/.gitignore +++ b/.gitignore @@ -22,6 +22,7 @@ !.travis.yml !.eslintrc.yaml !.cpplint +!.ci.yml # === Rules for root dir === /core |
