Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 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
8 changes: 8 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,12 @@ 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 supports builds using legacy, non-CMake build systems */
boolean supports_legacy_build_systems

/** Keep track of builds that fail */
final Set<String> failed_builds
final Set<String> outcome_stashes
Expand All @@ -66,6 +72,8 @@ class BranchInfo {
this.has_min_requirements = false
this.python_requirements_override_content = ''
this.python_requirements_override_file = ''
this.supported_vs_versions = []
this.supports_legacy_build_systems = false
this.failed_builds = []
this.outcome_stashes = []
this.coverage_details = 'Code coverage job did not run'
Expand Down
16 changes: 7 additions & 9 deletions vars/common.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,13 @@ 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.supports_legacy_build_systems = fileExists('Makefile')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this PR we are removing the windows jobs that uses the makefile and MS Visual Studio files to build the library and the tests. Thus we need to remove the generation of MS Visual Studio files in mbedtls. This is done now in Mbed-TLS/mbedtls#10382. I think it would then be better to check here for the presence of the directory visualc/VS2017 directory to check if we run or not the jobs using the MS Visual Studio files.

}

String platform = linux_platforms[0]
Expand Down Expand Up @@ -381,15 +388,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.supports_legacy_build_systems) {
// 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.supports_legacy_build_systems ? ['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