Skip to content

Conversation

@jonathanpeppers
Copy link
Member

In 22de117, it did not actually archive all .apk files.

Throughout our build pipeline, we build projects with different
MSBuild properties as input such as /p:AotAssemblies=True. This
causes the .apk files to be overwritten, and we lose them...

Instead, we should copy each APK to a directory inside
$(Build.ArtifactStagingDirectory) with a path identifying.

And so I propose modifying the template such as:

- template: yaml-templates/apk-instrumentation.yaml
  parameters:
    configuration: $(ApkTestConfiguration)
    testName: Mono.Android_Tests-Aot
    project: src/Mono.Android/Test/Mono.Android-Tests.csproj
    testResultsFiles: TestResult-Mono.Android_Tests-$(ApkTestConfiguration)-Aot.xml
    extraBuildArgs: /p:AotAssemblies=True /p:EnableLlvm=True
    artifactName: Mono.Android_Tests-Signed.apk
    artifactFolder: Aot

Would yield an artifact at Aot/Mono.Android_Tests-Signed.apk that we
could download independently.

In 22de117, it did not actually archive *all* `.apk` files.

Throughout our build pipeline, we build projects with different
MSBuild properties as input such as `/p:AotAssemblies=True`. This
causes the `.apk` files to be overwritten, and we lose them...

Instead, we should copy each APK to a directory inside
`$(Build.ArtifactStagingDirectory)` with a path identifying.

And so I propose modifying the template such as:

    - template: yaml-templates/apk-instrumentation.yaml
      parameters:
        configuration: $(ApkTestConfiguration)
        testName: Mono.Android_Tests-Aot
        project: src/Mono.Android/Test/Mono.Android-Tests.csproj
        testResultsFiles: TestResult-Mono.Android_Tests-$(ApkTestConfiguration)-Aot.xml
        extraBuildArgs: /p:AotAssemblies=True /p:EnableLlvm=True
        artifactName: Mono.Android_Tests-Signed.apk
        artifactFolder: Aot

Would yield an artifact at `Aot/Mono.Android_Tests-Signed.apk` that we
could download independently.
@jonathanpeppers jonathanpeppers marked this pull request as ready for review November 7, 2019 03:21
@jonathanpeppers
Copy link
Member Author

The last build before I did some squashing & cleanup looked like what we need: https://devdiv.visualstudio.com/DevDiv/_build/results?buildId=3220679&view=artifacts

image

@jonpryor jonpryor merged commit a092dca into dotnet:master Nov 7, 2019
@jonpryor jonpryor mentioned this pull request Nov 7, 2019
@jonathanpeppers jonathanpeppers deleted the archive-apks branch November 7, 2019 17:57
jonpryor pushed a commit that referenced this pull request Nov 8, 2019
In 22de117, it did not actually archive *all* the `.apk` files.

Throughout our build pipeline, we build projects with different
MSBuild properties as input such as `/p:AotAssemblies=True`.  This
causes the `.apk` files to be overwritten, and we lose the previous
versions of these files.

Instead, we should copy each APK to a directory inside
`$(Build.ArtifactStagingDirectory)` with a path identifying which
MSBuild properties were set during the build.

I propose modifying the template such as:

	- template: yaml-templates/apk-instrumentation.yaml
	  parameters:
	    configuration: $(ApkTestConfiguration)
	    testName: Mono.Android_Tests-Aot
	    project: src/Mono.Android/Test/Mono.Android-Tests.csproj
	    testResultsFiles: TestResult-Mono.Android_Tests-$(ApkTestConfiguration)-Aot.xml
	    extraBuildArgs: /p:AotAssemblies=True /p:EnableLlvm=True
	    artifactName: Mono.Android_Tests-Signed.apk
	    artifactFolder: AotLlvm

Would yield an artifact at `AotLlvm/Mono.Android_Tests-Signed.apk`
that we could download independently, and *won't* overwrite other
"build versions" of the "same" App.

![AzDO Artifacts Image][0]

[0]: https://user-images.githubusercontent.com/840039/68357624-8eb0a300-00db-11ea-9761-2f1b7ebf5b66.png
@github-actions github-actions bot locked and limited conversation to collaborators Jan 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants