-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
First (failing attempt) to make Azure Pipelines work
This is a combination of 14 commits. Update azure-pipelines.yml for Azure Pipelines CI attempt fix indentation change variable expression syntax attempt attempt fix displayName Update title try setting vmImage try runtime expression Fix cache, try again with displayname lock down .net sdk, add nuget config to restore fixed sdk version Work done for #196
- Loading branch information
Showing
13 changed files
with
198 additions
and
76 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
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
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,16 +1,16 @@ | ||
# overwrite the default version scheme - we have our own set in MsBuild | ||
version: '{build}' | ||
# # overwrite the default version scheme - we have our own set in MsBuild | ||
# version: '{build}' | ||
|
||
image: Visual Studio 2017 | ||
# image: Visual Studio 2017 | ||
|
||
skip_commits: | ||
# allow us to manually skip a build | ||
message: '/\[chore\]|\[no_ci\]|\[ci_skip\]|\[skip_ci\]/' | ||
# Do not trigger a build for anything not .NET | ||
files: | ||
- '**/*.md' | ||
- 'docs/**/*' | ||
- 'scripts/**/*' | ||
# skip_commits: | ||
# # allow us to manually skip a build | ||
# message: '/\[chore\]|\[no_ci\]|\[ci_skip\]|\[skip_ci\]/' | ||
# # Do not trigger a build for anything not .NET | ||
# files: | ||
# - '**/*.md' | ||
# - 'docs/**/*' | ||
# - 'scripts/**/*' | ||
|
||
# Do not run a build on new tags - we use tags to create releases, which can | ||
# only occur after successful build on another branch | ||
|
@@ -24,7 +24,7 @@ cache: | |
|
||
matrix: | ||
fast_finish: true | ||
|
||
platform: | ||
- Any CPU | ||
|
||
|
@@ -50,8 +50,8 @@ init: | |
- echo Starting Build | ||
|
||
before_build: | ||
# Download fresh lfs assets | ||
- git lfs pull | ||
# # Download fresh lfs assets | ||
# - git lfs pull | ||
# Determine whether or not we should tag and release | ||
# if the last tag hash matches the current build hash then we should not duplicate a release | ||
- ps: | | ||
|
@@ -61,7 +61,7 @@ before_build: | |
$env:RELEASE_COMMIT = $env:APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED -ilike "*``[release``]*" | ||
$env:SHOULD_RELEASE = ($env:RELEASE_COMMIT -ieq "true") -or ($env:APPVEYOR_SCHEDULED_BUILD -and ($env:TAG_NOT_PREVIOUSLY_RELEASED -ieq "true")) | ||
ls env:* -Include SHOULD*,APPVEYOR_SCHEDULED_BUILD*,APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED*,RELEASE_COMMIT,TAG_NOT_PREVIOUSLY_RELEASED | ||
# Restore packages | ||
# Restore packages | ||
- nuget restore | ||
# Debugging a dirty flag in build version | ||
- git status | ||
|
@@ -70,16 +70,16 @@ before_build: | |
build_script: | ||
- echo "Building Debug" | ||
- ps: > | ||
msbuild | ||
"C:\projects\audio-analysis\AudioAnalysis.sln" /m /verbosity:minimal | ||
msbuild | ||
"C:\projects\audio-analysis\AudioAnalysis.sln" /m /verbosity:minimal | ||
/logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" | ||
/p:WarningLevel=0 /p:RunCodeAnalysis=false | ||
/p:Configuration=Debug /property:Platform=$env:platform | ||
- echo "Building Release" | ||
- ps: > | ||
msbuild | ||
"C:\projects\audio-analysis\AudioAnalysis.sln" /m /verbosity:minimal | ||
msbuild | ||
"C:\projects\audio-analysis\AudioAnalysis.sln" /m /verbosity:minimal | ||
/logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" | ||
/p:WarningLevel=0 /p:RunCodeAnalysis=false | ||
/p:Configuration=Release /property:Platform=$env:platform | ||
|
@@ -97,7 +97,7 @@ test: | |
only: | ||
- 'tests\Acoustics.Test\bin\Debug\Acoustics.Test.dll' | ||
- 'tests\AED.Test\bin\Debug\AED.Test.dll' | ||
|
||
# Upload previously generated artifacts | ||
artifacts: | ||
- path: '$(ApPackageDebug)' | ||
|
@@ -112,15 +112,15 @@ before_deploy: | |
- ps: git config --global user.name "$($env:APPVEYOR_REPO_COMMIT_AUTHOR)" | ||
# add our auth token to the cred store | ||
- ps: Add-Content "$env:USERPROFILE\.git-credentials" "https://$($env:GH_CREATE_RELEASES_TOKEN):[email protected]`n" | ||
# tag if needed, and output $env:ApTagName | ||
# tag if needed, and output $env:ApTagName | ||
- cd %APPVEYOR_BUILD_FOLDER% | ||
# Buggy authentication with git-lfs | ||
- git config lfs.https://github.com/QutBioacoustics/audio-analysis.git/info/lfs.locksverify false | ||
- ps: . .\build\tag.ps1 $env:ApVersion | ||
# prepare release strings: $env:ApReleaseMessage, $env:ApReleaseTitle | ||
- ps: . .\build\release.ps1 $env:ApTagName $true | ||
#- ps: 'ls env:' | ||
|
||
deploy: | ||
- provider: GitHub | ||
tag: $(ApTagName) | ||
|
@@ -134,7 +134,7 @@ deploy: | |
branch: master | ||
# Do not create a new release unless this was a scheduled build or a forced build | ||
SHOULD_RELEASE: True | ||
|
||
# scripts to run after deployment | ||
#after_deploy: | ||
# # build and push our docker image | ||
|
@@ -149,6 +149,6 @@ notifications: | |
on_build_status_changed: true | ||
on_build_failure: true | ||
on_build_success: true | ||
|
||
#on_finish: | ||
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) |
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,23 +1,47 @@ | ||
# Starter pipeline | ||
# Start with a minimal pipeline that you can customize to build and deploy your code. | ||
# Add steps that build, run tests, deploy, and more: | ||
# https://aka.ms/yaml | ||
name: $(Date:yyyyMMdd)$(Rev:.r) | ||
|
||
trigger: none | ||
variables: | ||
build: '$(Build.BuildID)' | ||
|
||
jobs: | ||
- job: Linux | ||
pool: | ||
vmImage: 'ubuntu-18.04' | ||
steps: | ||
- script: echo hello from Linux | ||
- job: macOS | ||
pool: | ||
vmImage: 'macOS-10.14' | ||
steps: | ||
- script: echo hello from macOS | ||
- job: Windows | ||
pool: | ||
vmImage: 'windows-2019' | ||
steps: | ||
- script: echo hello from Windows | ||
# Run on all commits, except for some folders | ||
trigger: | ||
branches: | ||
include: | ||
- '*' | ||
paths: | ||
exclude: | ||
- docs/* | ||
- scripts/* | ||
- '**/*.md' | ||
|
||
stages: | ||
- stage: build | ||
jobs: | ||
- template: build/azure-pipelines-build.yml | ||
# - stage: test | ||
# jobs: | ||
# - template: build/azure-pipelines-test.yml | ||
# - stage: release | ||
# jobs: | ||
# - template: build/azure-pipelines-release.yml | ||
|
||
# jobs: | ||
# - job: Linux | ||
# pool: | ||
# vmImage: 'ubuntu-latest' | ||
# - job: macOS | ||
# pool: | ||
# vmImage: 'macOS-latest' | ||
# - job: Windows | ||
# pool: | ||
# vmImage: 'windows-latest' | ||
|
||
# strategy: | ||
# maxParallel: 2 | ||
# matrix: | ||
# AnyCPU-Debug: | ||
# buildPlatform: 'Any CPU' | ||
# buildConfiguration: 'Debug' | ||
# AnyCPU-Release: | ||
# buildPlatform: 'Any CPU' | ||
# buildConfiguration: 'Release' |
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
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,82 @@ | ||
parameters: | ||
|
||
buildPlatform: 'Any CPU' | ||
configurations: [debug, release] | ||
platforms: | ||
- rid: win-x64 | ||
pool: windows-latest | ||
- rid: win-arm64 | ||
pool: windows-latest | ||
- rid: linux-x64 | ||
pool: ubuntu-latest | ||
- rid: linux-musl-x64 | ||
pool: ubuntu-latest | ||
- rid: linux-arm | ||
pool: ubuntu-latest | ||
- rid: osx-x64 | ||
pool: macos-latest | ||
|
||
# cross-product not supported | ||
# https://github.com/microsoft/azure-pipelines-yaml/issues/20 | ||
job_matrix: | ||
|
||
linux_arm_debug: | ||
pool: ubuntu-latest | ||
|
||
buildConfiguration: 'Debug' | ||
rid: | ||
|
||
|
||
jobs: | ||
- job: | ||
strategy: | ||
matrix: | ||
${{ each platform in parameters.platforms }}: | ||
${{ each configuration in parameters.configurations }}: | ||
${{ format('{0}_{1}_{2}', platform.rid, platform.pool, configuration) }}: | ||
rid: ${{ platform.rid }} | ||
pool: ${{ platform.pool }} | ||
configuration: ${{ configuration }} | ||
pool: | ||
vmImage: $(pool) | ||
displayName: Build, test and package for | ||
steps: | ||
|
||
- checkout: self | ||
clean: false | ||
fetchDepth: 100 | ||
lfs: false | ||
persistCredentials: true | ||
displayName: "Shallow cloning repo" | ||
|
||
- task: Cache@2 | ||
inputs: | ||
key: "lfs_assets" | ||
path: "$(Pipeline.Workspace)/.git/lfs/objects" | ||
displayName: "Cache git LFS objects" | ||
|
||
- pwsh: git lfs pull | ||
displayName: "Refresh LFS assets" | ||
|
||
- pwsh: | | ||
$sdkVersion = (Get-Content "global.json" | ConvertFrom-Json).sdk.version | ||
echo "##vso[task.setvariable variable=sdkVersion]$sdkVersion" | ||
displayName: Get .NET SDK version from "global.json" | ||
- task: UseDotNet@2 | ||
inputs: | ||
packageType: sdk | ||
version: $(sdkVersion) | ||
displayName: Lock down .NET SDK version | ||
|
||
- task: DotNetCoreCLI@2 | ||
inputs: | ||
command: restore | ||
displayName: Restore solution dependencies | ||
|
||
- pwsh: | ||
- task: DotNetCoreCLI@2 | ||
inputs: | ||
command: build | ||
arguments: '--configuration $(buildConfiguration)' | ||
displayName: Build solution ($(buildConfiguration)) |
Empty file.
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,17 @@ | ||
|
||
|
||
jobs: | ||
|
||
- job: 'publish' | ||
steps: | ||
- task: DotNetCoreCLI@2 | ||
inputs: | ||
command: publish | ||
projects: src/AnalysisPrograms/AnalysisPrograms.csproj | ||
arguments: '--configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory)' | ||
modifyOutputPath: true | ||
zipAfterPublish: true | ||
- task: PublishBuildArtifacts@1 | ||
inputs: | ||
path: $(Build.ArtifactStagingDirectory) | ||
artifact: drop |
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,16 @@ | ||
|
||
|
||
jobs: | ||
- job: 'test' | ||
steps: | ||
- task: DotNetCoreCLI@2 | ||
inputs: | ||
command: test | ||
noBuild: true | ||
publishTestResults: true | ||
arguments: "--settings test/Acoustics.Test/.runsettings --configuration $(buildConfiguration) --logger trx" | ||
- task: PublishTestResults@2 | ||
condition: succeededOrFailed() | ||
inputs: | ||
testRunner: VSTest | ||
testResultsFiles: '**/*.trx' |
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
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
Oops, something went wrong.