Skip to content

Commit

Permalink
Configure CI (no. 80)
Browse files Browse the repository at this point in the history
  • Loading branch information
cafour committed Apr 17, 2021
1 parent 849b730 commit e5e29f3
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 45 deletions.
88 changes: 46 additions & 42 deletions .azure/pipelines/ci.yml
Expand Up @@ -95,56 +95,60 @@ jobs:
failTaskOnFailedTests: true
buildConfiguration: $(BUILD_CONFIGURATION)

# - job: owinBuild
# displayName: Build OWIN projects (Windows)
# pool:
# vmImage: windows-latest
# steps:
# - task: Cache@2
# inputs:
# key: '"npm" | "$(Agent.OS)" | src/DotVVM.Framework/package.json'
# path: $(DOTVVM_ROOT)/.npm
# restoreKeys: '"npm" | "$(Agent.OS)"'
# - script: npm ci --cache $(DOTVVM_ROOT)/.npm --prefer-offline
# workingDirectory: src/DotVVM.Framework
# - script: npm run build
# workingDirectory: src/DotVVM.Framework
# - task: Cache@2
# inputs:
# key: '"nuget-owin" | "$(Agent.OS)" | **/packages.lock.json'
# path: $(Build.SourcesDirectory)/src/packages
# - task: NuGetCommand@2
# inputs:
# command: restore
# restoreSolution: src/Windows.sln
# feedsToUse: config
# nugetConfigPath: src/NuGet.config
# - task: MSBuild@1
# inputs:
# solution: src/Windows.sln
# configuration: $(BUILD_CONFIGURATION)
# - publish: $(DOTVVM_ROOT)/artifacts
# name: owinBuild
- job: owinBuild
displayName: Build OWIN projects (Windows)
pool:
name: AdamovoPool
demands: Agent.OS -equals Windows_NT
steps:
- task: Cache@2
inputs:
key: '"npm" | "$(Agent.OS)" | src/DotVVM.Framework/package.json'
path: $(DOTVVM_ROOT)/.npm
restoreKeys: '"npm" | "$(Agent.OS)"'
- script: npm ci --cache $(DOTVVM_ROOT)/.npm --prefer-offline
workingDirectory: src/DotVVM.Framework
- script: npm run build
workingDirectory: src/DotVVM.Framework
- task: Cache@2
inputs:
key: '"nuget-owin" | "$(Agent.OS)" | **/packages.lock.json'
path: $(Build.SourcesDirectory)/src/packages
- task: NuGetCommand@2
inputs:
command: restore
restoreSolution: src/Windows.sln
feedsToUse: config
nugetConfigPath: src/NuGet.config
- task: MSBuild@1
inputs:
solution: src/Windows.sln
configuration: $(BUILD_CONFIGURATION)
msbuildArguments: >
/p:DeployOnBuild=true
/p:PublishProfile=$(Build.SourcesDirectory)/ci/windows/GenericPublish.pubxml
- publish: $(DOTVVM_ROOT)/artifacts
name: owinBuild

- job: uiTestsOwin
displayName: Run UI tests (Windows)
pool:
name: AdamovoPool
demands: Agent.OS -equals Windows_NT
container: docker-reg.riganti.cz/dotvvm-ci:windows
# dependsOn: owinBuild
dependsOn: owinBuild
steps:
# - download: current
# artifact: owinBuild
- task: DownloadPipelineArtifact@2
inputs:
source: 'specific'
project: 'DotVVM Public'
pipeline: 'CI'
runVersion: specific
runId: '110124'
artifact: 'owinBuild'
path: $(DOTVVM_ROOT)/artifacts
- download: current
artifact: owinBuild
# - task: DownloadPipelineArtifact@2
# inputs:
# source: 'specific'
# project: 'DotVVM Public'
# pipeline: 'CI'
# runVersion: specific
# runId: '110124'
# artifact: 'owinBuild'
# path: $(DOTVVM_ROOT)/artifacts
- powershell: |
dotnet test src/DotVVM.Samples.Tests `
--configuration $(BUILD_CONFIGURATION) `
Expand Down
12 changes: 12 additions & 0 deletions ci/windows/GenericPublish.pubxml
@@ -0,0 +1,12 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<WebPublishMethod>FileSystem</WebPublishMethod>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>Any CPU</LastUsedPlatform>
<SiteUrlToLaunchAfterPublish />
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<PublishUrl>$(RepoRoot)artifacts\$(MSBuildProjectName)\</PublishUrl>
<DeleteExistingFiles>True</DeleteExistingFiles>
</PropertyGroup>
</Project>
Expand Up @@ -103,6 +103,6 @@

<PropertyGroup>
<!-- Don't generate packages.lock.json since it wrecks cross-platfrom CI. -->
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestorePackagesWithLockFile>false</RestorePackagesWithLockFile>
</PropertyGroup>
</Project>
Expand Up @@ -185,7 +185,7 @@

<PropertyGroup>
<!-- Don't generate packages.lock.json since it wrecks cross-platfrom CI. -->
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestorePackagesWithLockFile>false</RestorePackagesWithLockFile>
</PropertyGroup>

</Project>
Expand Up @@ -182,7 +182,7 @@

<PropertyGroup>
<!-- Don't generate packages.lock.json since it wrecks cross-platfrom CI. -->
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
<RestorePackagesWithLockFile>false</RestorePackagesWithLockFile>
</PropertyGroup>

</Project>

0 comments on commit e5e29f3

Please sign in to comment.