<commit_before>import jobs.generation.Utilities;

def project = GithubProject
def branch = GithubBranchName

def osList = ['Windows_NT'] //'Ubuntu', 'OSX', 'CentOS7.1'

def machineLabelMap = ['Ubuntu':'ubuntu-doc',
                       'OSX':'mac',
                       'Windows_NT':'windows-elevated',
                       'CentOS7.1' : 'centos-71']

def static getBuildJobName(def configuration, def os) {
    return configuration.toLowerCase() + '_' + os.toLowerCase()
}

[true, false].each { isPullRequest ->
    ['Debug', 'Release_ci_part1', 'Release_ci_part2'].each { configuration ->
        osList.each { os ->

            def lowerConfiguration = configuration.toLowerCase()

            // Calculate job name
            def jobName = getBuildJobName(configuration, os)

            def buildCommand = '';

            def buildFlavor= '';
            if (configuration == "Debug") {
                buildFlavor = "debug"
                build_args = ""
            }
            else {
                buildFlavor = "release"
                if (configuration == "Release_ci_part1") {
                    build_args = "ci_part1"
                }
                else {
                    build_args = "ci_part2"
                }
            }

            if (os == 'Windows_NT') {
                buildCommand = ".\\build.cmd ${buildFlavor} ${build_args}"
            }
            else {
                buildCommand = "./build.sh ${buildFlavor} ${build_args}"
            }

            def newJobName = Utilities.getFullJobName(project, jobName, isPullRequest)
            def newJob = job(newJobName) {
                label(machineLabelMap[os])
                steps {
                    if (os == 'Windows_NT') {
                        // Batch
                        batchFile(buildCommand)
                    }
                    else {
                        // Shell
                        shell(buildCommand)
                    }
                }
            }

            // TODO: set to false after tests are fully enabled
            def skipIfNoTestFiles = true

            Utilities.setMachineAffinity(newJob, os, 'latest-or-auto')
            Utilities.standardJobSetup(newJob, project, isPullRequest, "*/${branch}")
            Utilities.addXUnitDotNETResults(newJob, 'tests/TestResults/**/*_Xml.xml', skipIfNoTestFiles)
            Utilities.addArchival(newJob, "tests/TestResults/*.*", "", false, false)
            Utilities.addArchival(newJob, "${buildFlavor}/**")

            if (isPullRequest) {
                Utilities.addGithubPRTriggerForBranch(newJob, branch, "${os} ${configuration} Build")
            }
            else {
                Utilities.addGithubPushTrigger(newJob)
            }
        }
    }
}
<commit_msg>Doh!!!! Debug builds will not create test log files<commit_after>import jobs.generation.Utilities;

def project = GithubProject
def branch = GithubBranchName

def osList = ['Windows_NT'] //'Ubuntu', 'OSX', 'CentOS7.1'

def machineLabelMap = ['Ubuntu':'ubuntu-doc',
                       'OSX':'mac',
                       'Windows_NT':'windows-elevated',
                       'CentOS7.1' : 'centos-71']

def static getBuildJobName(def configuration, def os) {
    return configuration.toLowerCase() + '_' + os.toLowerCase()
}

[true, false].each { isPullRequest ->
    ['Debug', 'Release_ci_part1', 'Release_ci_part2'].each { configuration ->
        osList.each { os ->

            def lowerConfiguration = configuration.toLowerCase()

            // Calculate job name
            def jobName = getBuildJobName(configuration, os)

            def buildCommand = '';

            def buildFlavor= '';
            if (configuration == "Debug") {
                buildFlavor = "debug"
                build_args = ""
            }
            else {
                buildFlavor = "release"
                if (configuration == "Release_ci_part1") {
                    build_args = "ci_part1"
                }
                else {
                    build_args = "ci_part2"
                }
            }

            if (os == 'Windows_NT') {
                buildCommand = ".\\build.cmd ${buildFlavor} ${build_args}"
            }
            else {
                buildCommand = "./build.sh ${buildFlavor} ${build_args}"
            }

            def newJobName = Utilities.getFullJobName(project, jobName, isPullRequest)
            def newJob = job(newJobName) {
                label(machineLabelMap[os])
                steps {
                    if (os == 'Windows_NT') {
                        // Batch
                        batchFile(buildCommand)
                    }
                    else {
                        // Shell
                        shell(buildCommand)
                    }
                }
            }

            // TODO: set to false after tests are fully enabled
            def skipIfNoTestFiles = true

            Utilities.setMachineAffinity(newJob, os, 'latest-or-auto')
            Utilities.standardJobSetup(newJob, project, isPullRequest, "*/${branch}")
            Utilities.addXUnitDotNETResults(newJob, 'tests/TestResults/**/*_Xml.xml', skipIfNoTestFiles)
            Utilities.addArchival(newJob, "tests/TestResults/*.*", "", skipIfNoTestFiles, false)
            Utilities.addArchival(newJob, "${buildFlavor}/**")

            if (isPullRequest) {
                Utilities.addGithubPRTriggerForBranch(newJob, branch, "${os} ${configuration} Build")
            }
            else {
                Utilities.addGithubPushTrigger(newJob)
            }
        }
    }
}

{'fraction_non_alphanumeric': 0.11091361535726982, 'fraction_numerical': 0.0039104159260575895, 'mean_word_length': 1.4755829300483942, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1008908', 'n_tokens_mistral': 1533, 'n_tokens_neox': 1444, 'n_words': 282}