diff options
-rw-r--r-- | .gitlab-ci.yml | 358 |
1 files changed, 180 insertions, 178 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 839b4ba..7686d05 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,4 @@ +--- variables: BUILD_IMAGES_PROJECT: cmocka/gitlab-build-images FEDORA_BUILD: buildenv-fedora @@ -9,15 +10,15 @@ variables: centos7/x86_64: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$CENTOS7_BUILD script: - - mkdir -p obj && cd obj && cmake3 - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DPICKY_DEVELOPER=ON - -DUNIT_TESTING=ON .. && - make -j$(nproc) && ctest --output-on-failure + - mkdir -p obj && cd obj && cmake3 + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. && + make -j$(nproc) && ctest --output-on-failure tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -27,15 +28,15 @@ centos7/x86_64: fedora/x86_64: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: - - mkdir -p obj && cd obj && cmake - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DPICKY_DEVELOPER=ON - -DUNIT_TESTING=ON .. && - make -j$(nproc) && ctest --output-on-failure + - mkdir -p obj && cd obj && cmake + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. && + make -j$(nproc) && ctest --output-on-failure tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -45,12 +46,12 @@ fedora/x86_64: fedora/meson: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: - - meson build -Dunit_testing=true && - meson test -C build --print-errorlogs + - meson build -Dunit_testing=true && + meson test -C build --print-errorlogs tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -60,15 +61,15 @@ fedora/meson: fedora/address-sanitizer: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: - - mkdir -p obj && cd obj && cmake - -DCMAKE_BUILD_TYPE=AddressSanitizer - -DPICKY_DEVELOPER=ON - -DUNIT_TESTING=ON .. && - make -j$(nproc) && ctest --output-on-failure + - mkdir -p obj && cd obj && cmake + -DCMAKE_BUILD_TYPE=AddressSanitizer + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. && + make -j$(nproc) && ctest --output-on-failure tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -78,15 +79,15 @@ fedora/address-sanitizer: fedora/memory-sanitizer: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: - - mkdir -p obj && cd obj && cmake - -DCMAKE_BUILD_TYPE=MemorySanitizer - -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ - -DUNIT_TESTING=ON .. - && make -j$(nproc) && ctest --output-on-failure + - mkdir -p obj && cd obj && cmake + -DCMAKE_BUILD_TYPE=MemorySanitizer + -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ + -DUNIT_TESTING=ON .. + && make -j$(nproc) && ctest --output-on-failure tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -96,14 +97,14 @@ fedora/memory-sanitizer: fedora/undefined-sanitizer: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: - - mkdir -p obj && cd obj && cmake - -DCMAKE_BUILD_TYPE=UndefinedSanitizer - -DUNIT_TESTING=ON .. - && make -j$(nproc) && ctest --output-on-failure + - mkdir -p obj && cd obj && cmake + -DCMAKE_BUILD_TYPE=UndefinedSanitizer + -DUNIT_TESTING=ON .. + && make -j$(nproc) && ctest --output-on-failure tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -113,28 +114,29 @@ fedora/undefined-sanitizer: fedora/csbuild: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_BUILD script: - - | - if [[ -z "$CI_COMMIT_BEFORE_SHA" ]]; then - export CI_COMMIT_BEFORE_SHA=$(git rev-parse "${CI_COMMIT_SHA}~20") - fi + - | + if [[ -z "$CI_COMMIT_BEFORE_SHA" ]]; then + export CI_COMMIT_BEFORE_SHA=$(git rev-parse "${CI_COMMIT_SHA}~20") + fi - # Check if the commit exists in this branch - # This is not the case for a force push - git branch --contains $CI_COMMIT_BEFORE_SHA 2>/dev/null || export CI_COMMIT_BEFORE_SHA=$(git rev-parse "${CI_COMMIT_SHA}~20") + # Check if the commit exists in this branch + # This is not the case for a force push + git branch --contains $CI_COMMIT_BEFORE_SHA 2>/dev/null || + export CI_COMMIT_BEFORE_SHA=$(git rev-parse "${CI_COMMIT_SHA}~20") - export CI_COMMIT_RANGE="$CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA" + export CI_COMMIT_RANGE="$CI_COMMIT_BEFORE_SHA..$CI_COMMIT_SHA" - - csbuild - --build-dir=obj-csbuild - --prep-cmd="cmake -DCMAKE_BUILD_TYPE=Debug -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON @SRCDIR@" - --build-cmd "make clean && make -j$(nproc)" - --git-commit-range $CI_COMMIT_RANGE - --color - --print-current --print-fixed + - csbuild + --build-dir=obj-csbuild + --prep-cmd="cmake -DCMAKE_BUILD_TYPE=Debug -DPICKY_DEVELOPER=ON -DUNIT_TESTING=ON @SRCDIR@" + --build-cmd "make clean && make -j$(nproc)" + --git-commit-range $CI_COMMIT_RANGE + --color + --print-current --print-fixed tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -144,18 +146,18 @@ fedora/csbuild: freebsd/x86_64: image: script: - - mkdir -p obj && cd obj && cmake - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DPICKY_DEVELOPER=ON - -DUNIT_TESTING=ON .. && - make && ctest --output-on-failure + - mkdir -p obj && cd obj && cmake + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. && + make && ctest --output-on-failure tags: - - freebsd + - freebsd except: - - tags + - tags only: - - branches@cmocka/cmocka - - branches@cryptomilk/cmocka + - branches@cmocka/cmocka + - branches@cryptomilk/cmocka artifacts: expire_in: 1 week when: on_failure @@ -165,18 +167,18 @@ freebsd/x86_64: fedora/mingw64: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$MINGW_BUILD script: - - export WINEPATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin - - export WINEDEBUG=-all - - mkdir -p obj && cd obj && mingw64-cmake - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DPICKY_DEVELOPER=ON - -DUNIT_TESTING=ON .. && - make -j$(nproc) && - ctest --output-on-failure + - export WINEPATH=/usr/x86_64-w64-mingw32/sys-root/mingw/bin + - export WINEDEBUG=-all + - mkdir -p obj && cd obj && mingw64-cmake + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. && + make -j$(nproc) && + ctest --output-on-failure tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -186,19 +188,19 @@ fedora/mingw64: fedora/mingw32: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$MINGW_BUILD script: - - export WINEPATH=/usr/i686-w64-mingw32/sys-root/mingw/bin - - export WINEDEBUG=-all - - mkdir -p obj && cd obj && mingw32-cmake - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DPICKY_DEVELOPER=ON - -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON - -DUNIT_TESTING=ON .. && - make -j$(nproc) && - ctest --output-on-failure + - export WINEPATH=/usr/i686-w64-mingw32/sys-root/mingw/bin + - export WINEDEBUG=-all + - mkdir -p obj && cd obj && mingw32-cmake + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DPICKY_DEVELOPER=ON + -DWITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON --DWITH_PCAP=ON + -DUNIT_TESTING=ON .. && + make -j$(nproc) && + ctest --output-on-failure tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -208,15 +210,15 @@ fedora/mingw32: tumbleweed/x86_64/gcc: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD script: - - mkdir -p obj && cd obj && cmake - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DPICKY_DEVELOPER=ON - -DUNIT_TESTING=ON .. && - make -j$(nproc) && ctest --output-on-failure + - mkdir -p obj && cd obj && cmake + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. && + make -j$(nproc) && ctest --output-on-failure tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -226,16 +228,16 @@ tumbleweed/x86_64/gcc: tumbleweed/x86/gcc: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD script: - - mkdir -p obj && cd obj && cmake - -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cross-m32.cmake - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DPICKY_DEVELOPER=ON - -DUNIT_TESTING=ON .. && - make -j$(nproc) && ctest --output-on-failure + - mkdir -p obj && cd obj && cmake + -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cross-m32.cmake + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. && + make -j$(nproc) && ctest --output-on-failure tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -245,16 +247,16 @@ tumbleweed/x86/gcc: tumbleweed/x86_64/gcc7: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD script: - - mkdir -p obj && cd obj && cmake - -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7 - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DPICKY_DEVELOPER=ON - -DUNIT_TESTING=ON .. && - make -j$(nproc) && ctest --output-on-failure + - mkdir -p obj && cd obj && cmake + -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7 + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. && + make -j$(nproc) && ctest --output-on-failure tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -264,17 +266,17 @@ tumbleweed/x86_64/gcc7: tumbleweed/x86/gcc7: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD script: - - mkdir -p obj && cd obj && cmake - -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cross-m32.cmake - -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7 - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DPICKY_DEVELOPER=ON - -DUNIT_TESTING=ON .. && - make -j$(nproc) && ctest --output-on-failure + - mkdir -p obj && cd obj && cmake + -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-cross-m32.cmake + -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7 + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. && + make -j$(nproc) && ctest --output-on-failure tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -284,16 +286,16 @@ tumbleweed/x86/gcc7: tumbleweed/x86_64/clang: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD script: - - mkdir -p obj && cd obj && cmake - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ - -DPICKY_DEVELOPER=ON - -DUNIT_TESTING=ON .. && - make -j$(nproc) && ctest --output-on-failure + - mkdir -p obj && cd obj && cmake + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. && + make -j$(nproc) && ctest --output-on-failure tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -303,11 +305,11 @@ tumbleweed/x86_64/clang: tumbleweed/docs: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD script: - - mkdir -p obj && cd obj && cmake .. && make docs + - mkdir -p obj && cd obj && cmake .. && make docs tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -317,18 +319,18 @@ tumbleweed/docs: tumbleweed/static-analysis: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$TUMBLEWEED_BUILD script: - - export CCC_CC=clang - - export CCC_CXX=clang++ - - mkdir -p obj && cd obj && scan-build cmake - -DCMAKE_BUILD_TYPE=Debug - -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ - -DPICKY_DEVELOPER=ON - -DUNIT_TESTING=ON .. && - scan-build --status-bugs -o scan make -j$(nproc) + - export CCC_CC=clang + - export CCC_CXX=clang++ + - mkdir -p obj && cd obj && scan-build cmake + -DCMAKE_BUILD_TYPE=Debug + -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. && + scan-build --status-bugs -o scan make -j$(nproc) tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -338,15 +340,15 @@ tumbleweed/static-analysis: ubuntu/x86_64: image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$UBUNTU_BUILD script: - - mkdir -p obj && cd obj && cmake - -DCMAKE_BUILD_TYPE=RelWithDebInfo - -DPICKY_DEVELOPER=ON - -DUNIT_TESTING=ON .. && - make -j$(nproc) && ctest --output-on-failure + - mkdir -p obj && cd obj && cmake + -DCMAKE_BUILD_TYPE=RelWithDebInfo + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. && + make -j$(nproc) && ctest --output-on-failure tags: - - shared + - shared except: - - tags + - tags artifacts: expire_in: 1 week when: on_failure @@ -355,26 +357,26 @@ ubuntu/x86_64: visualstudio/x86_64: script: - - $env:VCPKG_DEFAULT_TRIPLET="x64-windows" - - mkdir obj - - cd obj - - cmake - -A x64 - -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_TOOLCHAIN_FILE" - -DCMAKE_BUILD_TYPE=Debug - -DPICKY_DEVELOPER=ON - -DUNIT_TESTING=ON .. - - cmake --build . - - ctest --output-on-failure + - $env:VCPKG_DEFAULT_TRIPLET="x64-windows" + - mkdir obj + - cd obj + - cmake + -A x64 + -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_TOOLCHAIN_FILE" + -DCMAKE_BUILD_TYPE=Debug + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. + - cmake --build . + - ctest --output-on-failure tags: - - vs2017 - - windows + - vs2017 + - windows except: - - tags + - tags only: - - branches@cmocka/cmocka - - branches@ansasaki/cmocka - - branches@cryptomilk/cmocka + - branches@cmocka/cmocka + - branches@ansasaki/cmocka + - branches@cryptomilk/cmocka artifacts: expire_in: 1 week when: on_failure @@ -383,25 +385,25 @@ visualstudio/x86_64: visualstudio/x86: script: - - $env:VCPKG_DEFAULT_TRIPLET="x86-windows" - - mkdir obj - - cd obj - - cmake - -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_TOOLCHAIN_FILE" - -DCMAKE_BUILD_TYPE=Debug - -DPICKY_DEVELOPER=ON - -DUNIT_TESTING=ON .. - - cmake --build . - - ctest --output-on-failure + - $env:VCPKG_DEFAULT_TRIPLET="x86-windows" + - mkdir obj + - cd obj + - cmake + -DCMAKE_TOOLCHAIN_FILE="$env:VCPKG_TOOLCHAIN_FILE" + -DCMAKE_BUILD_TYPE=Debug + -DPICKY_DEVELOPER=ON + -DUNIT_TESTING=ON .. + - cmake --build . + - ctest --output-on-failure tags: - - vs2017 - - windows + - vs2017 + - windows except: - - tags + - tags only: - - branches@cmocka/cmocka - - branches@ansasaki/cmocka - - branches@cryptomilk/cmocka + - branches@cmocka/cmocka + - branches@ansasaki/cmocka + - branches@cryptomilk/cmocka artifacts: expire_in: 1 week when: on_failure |