-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to new shared build setup between all wpilib tools. (#182)
* Update to new shared build setup Build is now in groovy rather then kotlin. Also shared with SD and OV.
- Loading branch information
Showing
27 changed files
with
599 additions
and
601 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
codecov: | ||
notify: | ||
require_ci_to_pass: yes | ||
|
||
coverage: | ||
precision: 2 | ||
round: down | ||
range: "70...100" | ||
|
||
status: | ||
project: no | ||
patch: yes | ||
changes: no | ||
|
||
comment: | ||
layout: "diff" | ||
behavior: new | ||
require_changes: yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
*.kts text eol=lf | ||
*.gradle text eol=lf | ||
*.yml text eol=lf | ||
*.sh text eol=lf | ||
*.md text eol=lf | ||
*.xml text eol=lf | ||
*.fxml text eol=lf | ||
*.css text eol=lf | ||
Dockerfile text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,3 +75,4 @@ local.properties | |
|
||
# JDT-specific (Eclipse Java Development Tools) | ||
.classpath | ||
.vscode/ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,139 +1,45 @@ | ||
# Gradle | ||
# Build your Java project and run tests with Gradle using a Gradle wrapper script. | ||
# Add steps that analyze code, save build artifacts, deploy, and more: | ||
# https://docs.microsoft.com/azure/devops/pipelines/languages/java | ||
# Build and testing pipeline on Azure. | ||
|
||
resources: | ||
containers: | ||
- container: wpilib2020 | ||
image: wpilib/roborio-cross-ubuntu:2020-18.04 | ||
- container: ubuntu | ||
image: wpilib/ubuntu-base:18.04 | ||
|
||
variables: | ||
- group: Artifactory-Package-Publish | ||
|
||
trigger: | ||
batch: true | ||
branches: | ||
include: | ||
- master | ||
|
||
stages: | ||
- stage: Build | ||
jobs: | ||
- job: Linux | ||
pool: | ||
vmImage: 'Ubuntu 16.04' | ||
|
||
container: wpilib2020 | ||
|
||
steps: | ||
- task: Gradle@2 | ||
inputs: | ||
workingDirectory: '' | ||
gradleWrapperFile: 'gradlew' | ||
gradleOptions: '-Xmx3072m' | ||
publishJUnitResults: false | ||
testResultsFiles: '**/TEST-*.xml' | ||
tasks: 'check' | ||
options: '-PbuildServer' | ||
|
||
- job: Windows_64_Bit | ||
pool: | ||
vmImage: 'vs2017-win2016' | ||
|
||
steps: | ||
- task: Gradle@2 | ||
inputs: | ||
workingDirectory: '' | ||
gradleWrapperFile: 'gradlew' | ||
gradleOptions: '-Xmx3072m' | ||
jdkVersionOption: '1.11' | ||
publishJUnitResults: false | ||
testResultsFiles: '**/TEST-*.xml' | ||
tasks: 'check' | ||
options: '-PbuildServer' | ||
|
||
- job: Windows_32_Bit | ||
pool: | ||
vmImage: 'vs2017-win2016' | ||
|
||
steps: | ||
- powershell: | | ||
mkdir build | ||
$ProgressPreference = 'SilentlyContinue' | ||
wget "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_x86-32_windows_hotspot_11.0.4_11.zip" -O "build\jdk.zip" | ||
displayName: 'Download JDK' | ||
- task: JavaToolInstaller@0 | ||
inputs: | ||
jdkSourceOption: localDirectory | ||
jdkFile: 'build/jdk.zip' | ||
jdkDestinationDirectory: 'build/jdkinst' | ||
jdkArchitectureOption: x86 | ||
- task: Gradle@2 | ||
inputs: | ||
workingDirectory: '' | ||
gradleWrapperFile: 'gradlew' | ||
gradleOptions: '-Xmx1024m' | ||
publishJUnitResults: false | ||
testResultsFiles: '**/TEST-*.xml' | ||
tasks: 'check' | ||
|
||
- job: Mac | ||
pool: | ||
vmImage: 'macOS-10.14' | ||
steps: | ||
- script: | | ||
mkdir build | ||
export JAVA_HOME=`/usr/libexec/java_home -v 11` | ||
displayName: 'Setup JDK' | ||
- task: Gradle@2 | ||
inputs: | ||
workingDirectory: '' | ||
gradleWrapperFile: 'gradlew' | ||
gradleOptions: '-Xmx3072m' | ||
jdkVersionOption: '1.11' | ||
publishJUnitResults: false | ||
testResultsFiles: '**/TEST-*.xml' | ||
tasks: 'check' | ||
options: '-PbuildServer' | ||
|
||
- stage: Publish | ||
jobs: | ||
- job: PublishJob | ||
pool: | ||
vmImage: 'Ubuntu 16.04' | ||
|
||
container: wpilib2020 | ||
|
||
steps: | ||
# PR Builds | ||
- task: Gradle@2 | ||
inputs: | ||
workingDirectory: '' | ||
gradleWrapperFile: 'gradlew' | ||
gradleOptions: '-Xmx3072m' | ||
tasks: 'publish' | ||
options: '-PbuildServer' | ||
condition: and(succeeded(), and(ne(variables['Build.SourceBranch'], 'refs/heads/master'), not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v')))) | ||
|
||
# Master Builds | ||
- task: Gradle@2 | ||
inputs: | ||
workingDirectory: '' | ||
gradleWrapperFile: 'gradlew' | ||
gradleOptions: '-Xmx3072m' | ||
tasks: 'publish' | ||
options: '-PbuildServer' | ||
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) | ||
env: | ||
RUN_AZURE_ARTIFACTORY_RELEASE: 'TRUE' | ||
ARTIFACTORY_PUBLISH_USERNAME: $(PublishUserName) | ||
ARTIFACTORY_PUBLISH_PASSWORD: $(PublishPassword) | ||
|
||
# Tagged Builds | ||
- task: Gradle@2 | ||
inputs: | ||
workingDirectory: '' | ||
gradleWrapperFile: 'gradlew' | ||
gradleOptions: '-Xmx3072m' | ||
tasks: 'publish ' | ||
options: '-PreleaseMode -PbuildServer' | ||
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) | ||
env: | ||
RUN_AZURE_ARTIFACTORY_RELEASE: 'TRUE' | ||
ARTIFACTORY_PUBLISH_USERNAME: $(PublishUserName) | ||
ARTIFACTORY_PUBLISH_PASSWORD: $(PublishPassword) | ||
- template: azure-templates/job-build.yml | ||
parameters: | ||
jobName: Linux | ||
container: ubuntu | ||
artifactName: 'Linux' | ||
|
||
- template: azure-templates/job-build.yml | ||
parameters: | ||
jobName: Windows_64_Bit | ||
pool: | ||
vmImage: 'windows-2019' | ||
container: '' | ||
jdkVersionOption: '1.11' | ||
buildOptions: '-PskipPMD' | ||
artifactName: 'Win64' | ||
|
||
- template: azure-templates/job-build-win32.yml | ||
|
||
- template: azure-templates/job-build-mac.yml | ||
|
||
- template: azure-templates/stage-combine.yml | ||
parameters: | ||
publish: True | ||
publishUserName: $(PublishUserName) | ||
publishPassword: $(PublishPassword) | ||
artifacts: [Mac, Win32, Win64, Linux] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Job for mac | ||
|
||
parameters: | ||
pool: | ||
vmImage: 'macOS-10.14' | ||
preBuild: [] | ||
|
||
jobs: | ||
- template: job-build.yml | ||
parameters: | ||
jobName: 'Mac' | ||
pool: ${{ parameters.pool }} | ||
container: '' | ||
jdkVersionOption: '1.11' | ||
artifactName: 'Mac' | ||
preBuild: | ||
- ${{ parameters.preBuild }} | ||
- script: | | ||
mkdir build | ||
export JAVA_HOME=`/usr/libexec/java_home -v 11` | ||
displayName: 'Setup JDK' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# Job for win 32. | ||
|
||
parameters: | ||
pool: | ||
vmImage: 'windows-2019' | ||
preBuild: [] | ||
|
||
jobs: | ||
- template: job-build.yml | ||
parameters: | ||
jobName: 'Windows_32_Bit' | ||
pool: ${{ parameters.pool }} | ||
container: '' | ||
gradleOptions: '-Xmx1024m' | ||
buildOptions: '-PskipPMD' | ||
artifactName: 'Win32' | ||
preBuild: | ||
- ${{ parameters.preBuild }} | ||
- powershell: | | ||
mkdir build | ||
$ProgressPreference = 'SilentlyContinue' | ||
wget "https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_x86-32_windows_hotspot_11.0.4_11.zip" -O "build\jdk.zip" | ||
displayName: 'Download JDK' | ||
- task: JavaToolInstaller@0 | ||
inputs: | ||
versionSpec: '11' | ||
jdkSourceOption: localDirectory | ||
jdkFile: 'build/jdk.zip' | ||
jdkDestinationDirectory: 'build/jdkinst' | ||
jdkArchitectureOption: x86 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# Job for building | ||
|
||
parameters: | ||
jobName: '' | ||
pool: | ||
vmImage: 'Ubuntu 16.04' | ||
container: wpilib2020 | ||
preBuild: [] | ||
gradleOptions: '' | ||
jdkVersionOption: '' | ||
buildOptions: '' | ||
artifactName: '' | ||
|
||
jobs: | ||
- job: ${{ parameters.jobName }} | ||
pool: ${{ parameters.pool }} | ||
|
||
${{ if ne(parameters.container, '') }}: | ||
container: ${{ parameters.container }} | ||
|
||
workspace: | ||
clean: all | ||
|
||
timeoutInMinutes: 0 | ||
|
||
steps: | ||
- ${{ parameters.preBuild }} | ||
|
||
# PR Builds | ||
- ${{ if not(startsWith(variables['Build.SourceBranch'], 'refs/tags/v')) }}: | ||
- task: Gradle@2 | ||
inputs: | ||
workingDirectory: '' | ||
gradleWrapperFile: 'gradlew' | ||
gradleOptions: '-Xmx3072m ${{ parameters.gradleOptions }}' | ||
${{ if ne(parameters.jdkVersionOption, '') }}: | ||
jdkVersionOption: ${{ parameters.jdkVersionOption }} | ||
publishJUnitResults: true | ||
testResultsFiles: '**/TEST-*.xml' | ||
tasks: 'build' | ||
options: '-PbuildServer ${{ parameters.buildOptions }}' | ||
|
||
# Tagged Builds | ||
- ${{ if startsWith(variables['Build.SourceBranch'], 'refs/tags/v') }}: | ||
- task: Gradle@2 | ||
inputs: | ||
workingDirectory: '' | ||
gradleWrapperFile: 'gradlew' | ||
gradleOptions: '-Xmx3072m ${{ parameters.gradleOptions }}' | ||
${{ if ne(parameters.jdkVersionOption, '') }}: | ||
jdkVersionOption: ${{ parameters.jdkVersionOption }} | ||
publishJUnitResults: true | ||
testResultsFiles: '**/TEST-*.xml' | ||
tasks: 'build' | ||
options: '-PreleaseMode -PbuildServer ${{ parameters.buildOptions }}' | ||
|
||
- task: PublishPipelineArtifact@0 | ||
inputs: | ||
artifactName: ${{ parameters.artifactName }} | ||
targetPath: 'build/allOutputs' |
Oops, something went wrong.