Esempio n. 1
0
 def __build_java_libs(basedir, eclipseQualifier, maven, mavenDeployer,
                       **_):
     target = 'deploy' if mavenDeployer else 'install'
     cwd = os.path.join(basedir, 'releng', 'build', 'libs')
     maven.run_in_dir(cwd, target, forceContextQualifier=eclipseQualifier)
     return StepResult([
         FileArtifact(
             'Spoofax libraries JAR',
             _glob_one(
                 os.path.join(basedir,
                              'releng/build/libs/target/build.libs-*.jar')))
     ])
Esempio n. 2
0
 def __build_eclipse(basedir, eclipseQualifier, maven, mavenDeployer, **_):
     target = 'deploy' if mavenDeployer else 'install'
     cwd = os.path.join(basedir, 'releng', 'build', 'eclipse')
     maven.run_in_dir(cwd, target, forceContextQualifier=eclipseQualifier)
     return StepResult([
         DirArtifact(
             'Spoofax Eclipse update site',
             _glob_one(
                 os.path.join(
                     basedir,
                     'spoofax-eclipse/org.metaborg.spoofax.eclipse.updatesite/target/site'
                 )), os.path.join('spoofax', 'eclipse', 'site'))
     ])
Esempio n. 3
0
 def __build_spt(basedir, eclipseQualifier, maven, mavenDeployer, **_):
     target = 'deploy' if mavenDeployer else 'install'
     cwd = os.path.join(basedir, 'releng', 'build', 'language', 'spt')
     maven.run_in_dir(cwd, target, forceContextQualifier=eclipseQualifier)
     return StepResult([
         FileArtifact(
             'SPT testrunner JAR',
             _glob_one(
                 os.path.join(
                     basedir,
                     'spt/org.metaborg.spt.cmd/target/org.metaborg.spt.cmd-*.jar'
                 )))
     ])
Esempio n. 4
0
 def __build_java_uber(basedir, eclipseQualifier, maven, mavenDeployer,
                       **_):
     target = 'deploy' if mavenDeployer else 'install'
     cwd = os.path.join(basedir, 'spoofax',
                        'org.metaborg.spoofax.core.uber')
     maven.run_in_dir(cwd, target, forceContextQualifier=eclipseQualifier)
     return StepResult([
         FileArtifact(
             'Spoofax uber JAR',
             _glob_one(
                 os.path.join(
                     cwd, 'target/org.metaborg.spoofax.core.uber-*.jar')))
     ])
Esempio n. 5
0
 def __build_java(basedir, eclipseQualifier, maven, mavenDeployer, **_):
     target = 'deploy' if mavenDeployer else 'install'
     cwd = os.path.join(basedir, 'releng', 'build', 'java')
     maven.run_in_dir(cwd, target, forceContextQualifier=eclipseQualifier)
     return StepResult([
         FileArtifact(
             'Spoofax sunshine JAR',
             _glob_one(
                 os.path.join(
                     basedir,
                     'spoofax-sunshine/org.metaborg.sunshine2/target/org.metaborg.sunshine2-*.jar'
                 )))
     ])
Esempio n. 6
0
 def __build_intellij(basedir, gradle, **_):
     target = 'install'
     cwd = os.path.join(basedir, 'spoofax-intellij')
     gradle.run_in_dir(cwd, target)
     return StepResult([
         MetaborgFileArtifact(
             'Spoofax for IntelliJ IDEA plugin',
             _glob_one(
                 os.path.join(
                     basedir,
                     'spoofax-intellij/build/distributions/org.metaborg.intellij-*.zip'
                 )), os.path.join('spoofax', 'intellij', 'plugin.zip'),
             NexusMetadata('org.metaborg', 'org.metaborg.intellij.dist'),
             BintrayMetadata('spoofax-intellij-updatesite')),
     ])
Esempio n. 7
0
 def __build_spt_intellij(basedir, gradle, **_):
     target = 'install'
     cwd = os.path.join(basedir, 'spt',
                        'org.metaborg.spt.testrunner.intellij')
     gradle.run_in_dir(cwd, target)
     return StepResult([
         MetaborgFileArtifact(
             'SPT test runner for IntelliJ',
             _glob_one(
                 os.path.join(
                     basedir, cwd, 'build', 'distributions',
                     'org.metaborg.spt.testrunner.intellij-*.zip')),
             os.path.join('spt', 'intellij', 'plugin.zip'),
             NexusMetadata('org.metaborg',
                           'org.metaborg.spt.testrunner.intellij'),
             BintrayMetadata('spt-intellij-updatesite')),
     ])
Esempio n. 8
0
    def __build_strategoxt(basedir, bootstrapStratego, testStratego, skipTests,
                           eclipseQualifier, maven, mavenDeployer, **_):
        target = 'deploy' if mavenDeployer else 'install'

        # Build StrategoXT
        strategoXtDir = os.path.join(basedir, 'strategoxt', 'strategoxt')
        properties = {
            'strategoxt-skip-test': skipTests or not testStratego,
            'forceContextQualifier': eclipseQualifier
        }
        if bootstrapStratego:
            buildFile = os.path.join('buildpoms/bootstrap1/pom.xml')
            maven.run(strategoXtDir, buildFile, target, **properties)
            buildFile = os.path.join('buildpoms/bootstrap2/pom.xml')
            maven.run(strategoXtDir, buildFile, target, **properties)
            buildFile = os.path.join('bootstrap-end-pom.xml')
        else:
            buildFile = os.path.join('build-pom.xml')
        maven.run(strategoXtDir, buildFile, target, **properties)

        # Build StrategoXT parent POM
        properties = {
            'strategoxt-skip-build': True,
            'strategoxt-skip-assembly': True
        }
        parentBuildFile = os.path.join('buildpoms', 'pom.xml')
        maven.run(strategoXtDir, parentBuildFile, target, **properties)

        if bootstrapStratego:
            distribDir = os.path.join(strategoXtDir, 'buildpoms', 'bootstrap3',
                                      'target')
        else:
            distribDir = os.path.join(strategoXtDir, 'buildpoms', 'build',
                                      'target')

        return StepResult([
            FileArtifact(
                'StrategoXT distribution',
                _glob_one(
                    '{}/strategoxt-distrib-*-bin.tar'.format(distribDir)),
                os.path.join('strategoxt', 'distrib.tar')),
            FileArtifact(
                'StrategoXT JAR',
                '{}/dist/share/strategoxt/strategoxt/strategoxt.jar'.format(
                    distribDir), os.path.join('strategoxt', 'strategoxt.jar')),
        ])
Esempio n. 9
0
    def __build_eclipse_instances(basedir, eclipseGenMoreRepos,
                                  eclipseGenMoreIUs, **_):
        eclipsegenPath = '.eclipsegen'

        generator = MetaborgEclipseGenerator(basedir,
                                             eclipsegenPath,
                                             spoofax=True,
                                             spoofaxRepoLocal=True,
                                             moreRepos=eclipseGenMoreRepos,
                                             moreIUs=eclipseGenMoreIUs)
        archives = generator.generate_all(oss=Os.values(),
                                          archs=Arch.values(),
                                          fixIni=True,
                                          addJre=True,
                                          archiveJreSeparately=True,
                                          name='spoofax',
                                          archivePrefix='spoofax')

        artifacts = []
        for archive in archives:
            location = archive.location
            target = os.path.join('spoofax', 'eclipse',
                                  os.path.basename(location))
            packaging = 'zip' if archive.os.archiveFormat == 'zip' else 'tar.gz'
            classifier = '{}-{}{}'.format(archive.os.name, archive.arch.name,
                                          '-jre' if archive.withJre else '')
            artifacts.append(
                MetaborgFileArtifact(
                    'Spoofax Eclipse instance',
                    location,
                    target,
                    NexusMetadata('org.metaborg',
                                  'org.metaborg.spoofax.eclipse.dist',
                                  packaging, classifier),
                ))
        return StepResult(artifacts)