Move More CI into Jenkins - Travis Migration Progress (#5241)
* Add build stage to Jenkinsfile * Run travisbuild in bash rather than sh * Add GCC/Clang differentiation * Use different working directory for each build type. * Correct directory name * Remove travis config file * Always clean workspace afterwards
This commit is contained in:
parent
62e95745ac
commit
4e48464bb3
78
.travis.yml
78
.travis.yml
@ -1,78 +0,0 @@
|
|||||||
language: cpp
|
|
||||||
cache:
|
|
||||||
ccache: true
|
|
||||||
directories:
|
|
||||||
# Store ctest cost data
|
|
||||||
- Testing
|
|
||||||
|
|
||||||
# Use Linux by default
|
|
||||||
os: linux
|
|
||||||
dist: bionic
|
|
||||||
|
|
||||||
# Install newer SeeMake on Linux
|
|
||||||
addons:
|
|
||||||
snaps:
|
|
||||||
- name: cmake
|
|
||||||
confinement: classic
|
|
||||||
channel: latest
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
# ARM workers are the slowest. Having these first in the build matrix makes travis faster overall.
|
|
||||||
- name: "Clang 10.0 - Debug"
|
|
||||||
arch: arm64
|
|
||||||
compiler: clang
|
|
||||||
dist: focal # For Clang 10, bionic is Clang 6 for some reason.
|
|
||||||
before_install: &use-cmake
|
|
||||||
- export PATH=/snap/bin/:${PATH}
|
|
||||||
env: *Debug
|
|
||||||
|
|
||||||
- name: "AppleClang - Debug"
|
|
||||||
os: osx
|
|
||||||
osx_image: xcode11.3
|
|
||||||
before_install:
|
|
||||||
- HOMEBREW_NO_AUTO_UPDATE=1 brew install ccache
|
|
||||||
env: &Debug
|
|
||||||
- TRAVIS_CUBERITE_BUILD_TYPE=Debug
|
|
||||||
|
|
||||||
- name: "Clang 7.0 - Release"
|
|
||||||
compiler: clang
|
|
||||||
before_install: *use-cmake
|
|
||||||
env: *Release
|
|
||||||
|
|
||||||
- name: "Clang 7.0 - Debug"
|
|
||||||
compiler: clang
|
|
||||||
before_install: *use-cmake
|
|
||||||
env: *Debug
|
|
||||||
|
|
||||||
- name: "GCC 7.5 - Release, CMake 3.13, No Unity"
|
|
||||||
compiler: gcc
|
|
||||||
before_install:
|
|
||||||
- wget --output-document=${HOME}/CMake http://cmake.org/files/v3.13/cmake-3.13.0-Linux-x86_64.tar.gz
|
|
||||||
- tar --extract --one-top-level=${HOME}/SeeMake --strip-components 1 --file ${HOME}/CMake
|
|
||||||
- export PATH=${HOME}/SeeMake/bin/:${PATH}
|
|
||||||
env:
|
|
||||||
- TRAVIS_CUBERITE_BUILD_TYPE=Release
|
|
||||||
- TRAVIS_CUBERITE_UNITY_BUILDS=No
|
|
||||||
|
|
||||||
- name: "GCC 7.5 - Debug"
|
|
||||||
compiler: gcc
|
|
||||||
before_install: *use-cmake
|
|
||||||
env: *Debug
|
|
||||||
|
|
||||||
# Do not let CMake find ccache wrappers
|
|
||||||
# we use CMAKE_CXX_COMPILER_LAUNCHER for ccache support
|
|
||||||
before_script:
|
|
||||||
- export PATH=$(echo "$PATH" | sed -e 's/:\/usr\/lib\/ccache//')
|
|
||||||
|
|
||||||
# Run the build and tests
|
|
||||||
script: ./travisbuild.sh
|
|
||||||
|
|
||||||
notifications:
|
|
||||||
email:
|
|
||||||
on_success: change
|
|
||||||
on_failure: always
|
|
||||||
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
30
Jenkinsfile
vendored
30
Jenkinsfile
vendored
@ -27,9 +27,35 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage("Build") {
|
stage("Build") {
|
||||||
steps {
|
parallel {
|
||||||
sh 'echo "TODO: Replace Travis here."'
|
stage("gcc") {
|
||||||
|
environment {
|
||||||
|
TRAVIS_CUBERITE_BUILD_TYPE = 'Release'
|
||||||
|
TRAVIS_JOB_NUMBER = "{$env.BUILD_ID}"
|
||||||
|
CC = "gcc"
|
||||||
|
CXX = "g++"
|
||||||
}
|
}
|
||||||
|
steps {
|
||||||
|
sh 'bash ./travisbuild.sh'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage("clang") {
|
||||||
|
environment {
|
||||||
|
TRAVIS_CUBERITE_BUILD_TYPE = 'Debug'
|
||||||
|
TRAVIS_JOB_NUMBER = "{$env.BUILD_ID}"
|
||||||
|
CC = "clang"
|
||||||
|
CXX = "clang++"
|
||||||
|
}
|
||||||
|
steps {
|
||||||
|
sh 'bash ./travisbuild.sh'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
cleanWs()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@ -20,9 +20,13 @@ if [ `which ccache` ]; then
|
|||||||
ccache --zero-stats
|
ccache --zero-stats
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
workdir="$CC"_"$TRAVIS_CUBERITE_BUILD_TYPE"
|
||||||
|
mkdir "$workdir"
|
||||||
|
cd "$workdir"
|
||||||
|
|
||||||
# Work around a Clang + ccache issue with failing builds by disabling
|
# Work around a Clang + ccache issue with failing builds by disabling
|
||||||
# precompiled headers. Turn off LTO for faster build speeds
|
# precompiled headers. Turn off LTO for faster build speeds
|
||||||
cmake . -DCMAKE_BUILD_TYPE=${TRAVIS_CUBERITE_BUILD_TYPE} \
|
cmake .. -DCMAKE_BUILD_TYPE=${TRAVIS_CUBERITE_BUILD_TYPE} \
|
||||||
-DBUILD_TOOLS=Yes \
|
-DBUILD_TOOLS=Yes \
|
||||||
-DPRECOMPILE_HEADERS=No \
|
-DPRECOMPILE_HEADERS=No \
|
||||||
-DSELF_TEST=Yes \
|
-DSELF_TEST=Yes \
|
||||||
@ -31,7 +35,7 @@ cmake . -DCMAKE_BUILD_TYPE=${TRAVIS_CUBERITE_BUILD_TYPE} \
|
|||||||
${CACHE_ARGS};
|
${CACHE_ARGS};
|
||||||
|
|
||||||
echo "Building..."
|
echo "Building..."
|
||||||
cmake --build . --parallel 2;
|
cmake --build . --parallel 3;
|
||||||
|
|
||||||
if [ `which ccache` ]; then
|
if [ `which ccache` ]; then
|
||||||
echo "Built with ccache, outputting cache stats..."
|
echo "Built with ccache, outputting cache stats..."
|
||||||
|
Loading…
Reference in New Issue
Block a user