Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/org/mbed/tls/jenkins/BranchInfo.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ class BranchInfo {
* done. */
public String python_requirements_override_file

/** All of the Visual Studio versions supported by this branch */
public List<String> supported_vs_versions

/** Whether this branch has shipped Makefiles */
public boolean has_shipped_makefiles

/** Whether this branch has shipped Visual Studio solution files */
public boolean has_shipped_vs_solutions

/** Keep track of builds that fail */
final Set<String> failed_builds
final Set<String> outcome_stashes
Expand All @@ -66,6 +75,9 @@ class BranchInfo {
this.has_min_requirements = false
this.python_requirements_override_content = ''
this.python_requirements_override_file = ''
this.supported_vs_versions = []
this.has_shipped_makefiles = false
this.has_shipped_vs_solutions = false
this.failed_builds = []
this.outcome_stashes = []
this.coverage_details = 'Code coverage job did not run'
Expand Down
17 changes: 8 additions & 9 deletions vars/common.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,14 @@ List<BranchInfo> get_branch_information(Collection<String> tls_branches, Collect
info.python_requirements_override_file = 'override.requirements.txt'
}
}

/* At the time of writing, all supported branches (3.6, development)
* advertise support for Visual Studio 2017 (VS 15.0) and above. */
info.supported_vs_versions = ['2017']

// Detect support for legacy build systems (< Mbed TLS 4.0)
info.has_shipped_makefiles = fileExists('Makefile')
info.has_shipped_vs_solutions = fileExists('visualc/VS2017')
}

String platform = linux_platforms[0]
Expand Down Expand Up @@ -381,15 +389,6 @@ void check_every_all_sh_component_will_be_run(Collection<BranchInfo> infos) {
}
}

def get_supported_windows_builds() {
def vs_builds = []
/* At the time of writing, all supported branches (3.6, development)
* advertise support for Visual Studio 2017 (VS 15.0) and above. */
vs_builds = ['2017']
echo "vs_builds = ${vs_builds}"
return ['mingw'] + vs_builds
}

/* In the PR job (recognized because we set the BRANCH_NAME environment
* variable), report an additional context to GitHub.
* Do nothing from a job that isn't triggered from GitHub.
Expand Down
31 changes: 18 additions & 13 deletions vars/gen_jobs.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -321,14 +321,18 @@ def gen_windows_testing_job(BranchInfo info, String toolchain) {
def prefix = "${info.prefix}Windows-${toolchain}"
def build_configs, arches, build_systems, retargeted
if (toolchain == 'mingw') {
if (!info.has_shipped_makefiles) {
// The mingw toolchain uses the legacy shipped Makefiles
return [:]
}
build_configs = ['mingw']
arches = ['x64']
build_systems = ['shipped']
retargeted = [false]
} else {
build_configs = ['Release', 'Debug']
arches = ['Win32', 'x64']
build_systems = ['shipped', 'cmake']
build_systems = info.has_shipped_vs_solutions ? ['shipped', 'cmake'] : ['cmake']
retargeted = [false, true]
}

Expand Down Expand Up @@ -434,21 +438,22 @@ def gen_windows_jobs(BranchInfo info) {
}

def jobs = [:]
jobs = jobs + gen_simple_windows_jobs(
jobs << gen_simple_windows_jobs(
info, info.prefix + 'win32-mingw',
preamble + scripts.win32_mingw_test_bat
)
jobs = jobs + gen_simple_windows_jobs(
jobs << gen_simple_windows_jobs(
info, info.prefix + 'win32_msvc15_32',
preamble + scripts.win32_msvc15_32_test_bat
)
jobs = jobs + gen_simple_windows_jobs(
jobs << gen_simple_windows_jobs(
info, info.prefix + 'win32-msvc15_64',
preamble + scripts.win32_msvc15_64_test_bat
)
for (build in common.get_supported_windows_builds()) {
jobs = jobs + gen_windows_testing_job(info, build)
for (build in info.supported_vs_versions) {
jobs << gen_windows_testing_job(info, build)
}
jobs << gen_windows_testing_job(info, 'mingw')
return jobs
}

Expand Down Expand Up @@ -509,7 +514,7 @@ def gen_all_example_jobs(BranchInfo info = null) {
for (compiler in example.value['compilers']) {
for (platform in example.value['platforms']()) {
if (examples.raas_for_platform[platform]) {
jobs = jobs + gen_mbed_os_example_job(
jobs << gen_mbed_os_example_job(
info,
example.value['repo'],
example.value['branch'],
Expand Down Expand Up @@ -659,34 +664,34 @@ def gen_release_jobs(BranchInfo info, boolean run_examples=true) {

if (env.RUN_ALL_SH == "true") {
info.all_sh_components.each({component, platform ->
jobs = jobs + gen_all_sh_jobs(info, platform, component)
jobs << gen_all_sh_jobs(info, platform, component)
})
}

if (info.repo == 'tls') {
if (env.RUN_BASIC_BUILD_TEST == "true") {
jobs = jobs + gen_code_coverage_job(info, 'ubuntu-16.04-amd64');
jobs << gen_code_coverage_job(info, 'ubuntu-16.04-amd64');
}

/* FreeBSD all.sh jobs */
if (env.RUN_FREEBSD == "true") {
for (platform in common.bsd_platforms) {
for (component in common.freebsd_all_sh_components) {
jobs = jobs + gen_all_sh_jobs(info, platform, component)
jobs << gen_all_sh_jobs(info, platform, component)
}
}
}

if (env.RUN_WINDOWS_TEST == "true") {
jobs = jobs + gen_windows_jobs(info)
jobs << gen_windows_jobs(info)
}

if (run_examples) {
jobs = jobs + gen_all_example_jobs(info)
jobs << gen_all_example_jobs(info)
}

if (env.PUSH_COVERITY == "true") {
jobs = jobs + gen_coverity_push_jobs(info)
jobs << gen_coverity_push_jobs(info)
}
}

Expand Down