diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 25d60ebfae..eff78b2887 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -52,11 +52,20 @@ jobs: matrix: include: - os: windows-2019 - artifact-name: Win64 + artifact-name: Win64Debug architecture: x64 + task: "build" + build-options: "-PciDebugOnly" + - os: windows-2019 + artifact-name: Win64Release + architecture: x64 + build-options: "-PciReleaseOnly" + task: "copyAllOutputs" - os: macOS-11 artifact-name: macOS architecture: x64 + build-options: "" + task: "build" name: "Build - ${{ matrix.artifact-name }}" runs-on: ${{ matrix.os }} steps: @@ -86,7 +95,7 @@ jobs: shell: bash if: startsWith(github.ref, 'refs/tags/v') - name: Build with Gradle - run: ./gradlew build --build-cache -PbuildServer -PskipJavaFormat ${{ env.EXTRA_GRADLE_ARGS }} + run: ./gradlew ${{ matrix.task }} --build-cache -PbuildServer -PskipJavaFormat ${{ matrix.build-options }} ${{ env.EXTRA_GRADLE_ARGS }} env: ARTIFACTORY_PUBLISH_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }} ARTIFACTORY_PUBLISH_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }} diff --git a/build.gradle b/build.gradle index e869e21ce8..fab1197da7 100644 --- a/build.gradle +++ b/build.gradle @@ -87,7 +87,12 @@ task copyAllOutputs(type: Copy) { build.dependsOn copyAllOutputs copyAllOutputs.dependsOn outputVersions +def copyReleaseOnly = project.hasProperty('ciReleaseOnly') + ext.addTaskToCopyAllOutputs = { task -> + if (copyReleaseOnly && task.name.contains('debug')) { + return + } copyAllOutputs.dependsOn task copyAllOutputs.inputs.file task.archivePath copyAllOutputs.from task.archivePath diff --git a/buildSrc/build.gradle b/buildSrc/build.gradle index 390c2baddd..41d42c93ca 100644 --- a/buildSrc/build.gradle +++ b/buildSrc/build.gradle @@ -5,5 +5,5 @@ repositories { } } dependencies { - implementation "edu.wpi.first:native-utils:2023.0.1" + implementation "edu.wpi.first:native-utils:2023.0.2" } diff --git a/cameraserver/multiCameraServer/build.gradle b/cameraserver/multiCameraServer/build.gradle index 65e72ac59b..02e5f6dca3 100644 --- a/cameraserver/multiCameraServer/build.gradle +++ b/cameraserver/multiCameraServer/build.gradle @@ -41,7 +41,6 @@ dependencies { model { components { multiCameraServerCpp(NativeExecutableSpec) { - targetBuildTypes 'release' sources { cpp { source { diff --git a/shared/config.gradle b/shared/config.gradle index 220ec06a1c..fa02c5ee55 100644 --- a/shared/config.gradle +++ b/shared/config.gradle @@ -2,6 +2,10 @@ import org.gradle.internal.os.OperatingSystem nativeUtils.skipInstallPdb = project.hasProperty('buildServer') +if (project.hasProperty('ciDebugOnly')) { + toolchainsPlugin.registerReleaseBuildType = false +} + nativeUtils.addWpiNativeUtils() nativeUtils.withRoboRIO() nativeUtils.withRaspbian() diff --git a/wpinet/build.gradle b/wpinet/build.gradle index 1a69e2a402..44343776b3 100644 --- a/wpinet/build.gradle +++ b/wpinet/build.gradle @@ -235,7 +235,6 @@ model { } } netconsoleServer(NativeExecutableSpec) { - targetBuildTypes 'release' sources { cpp { source { @@ -255,7 +254,6 @@ model { } } netconsoleTee(NativeExecutableSpec) { - targetBuildTypes 'release' sources { cpp { source {