Skip to content

Commit

Permalink
Add Linux.sln
Browse files Browse the repository at this point in the history
  • Loading branch information
cafour committed May 25, 2021
1 parent 3fb0005 commit b1da96f
Show file tree
Hide file tree
Showing 2 changed files with 353 additions and 165 deletions.
330 changes: 165 additions & 165 deletions .azure/pipelines/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,112 +10,12 @@ variables:
DOTNET_CLI_TELEMETRY_OPTOUT: 1

jobs:
# - job: crossplatformBuild
# displayName: Build cross-platform projects (Linux)
# pool:
# name: AdamovoPool
# demands: Agent.OS -equals Linux
# container: docker-reg.riganti.cz/dotvvm-ci:linux
# workspace:
# clean: all
# 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" | "$(Agent.OS)" | **/packages.lock.json'
# path: $(DOTVVM_ROOT)/.nuget
# - task: DotNetCoreCLI@2
# inputs:
# command: restore
# projects: src/Crossplatform.sln
# packagesDirectory: $(DOTVVM_ROOT)/.nuget
# - task: DotNetCoreCLI@2
# inputs:
# command: build
# projects: src/Crossplatform.sln
# arguments: --no-restore --configuration $(BUILD_CONFIGURATION)
# - publish: $(DOTVVM_ROOT)/artifacts
# name: crossplatformBuild

# - job: unitTestsCrossplatform
# displayName: Run cross-platform unit tests (Linux)
# pool:
# name: AdamovoPool
# demands: Agent.OS -equals Linux
# container: docker-reg.riganti.cz/dotvvm-ci:linux
# dependsOn: crossplatformBuild
# workspace:
# clean: all
# steps:
# - task: DownloadPipelineArtifact@2
# inputs:
# source: current
# artifact: crossplatformBuild
# path: $(DOTVVM_ROOT)/artifacts
# - task: Cache@2
# inputs:
# key: '"nuget" | "$(Agent.OS)" | **/packages.lock.json'
# path: $(DOTVVM_ROOT)/.nuget
# - task: DotNetCoreCLI@2
# inputs:
# command: test
# projects: src/DotVVM.Framework.Tests.Common
# arguments: --no-build --configuration $(BUILD_CONFIGURATION)
# publishTestResults: true

# - job: uiTestsCrossplatform
# displayName: Run UI tests (Linux)
# pool:
# name: AdamovoPool
# demands: Agent.OS -equals Linux
# container: docker-reg.riganti.cz/dotvvm-ci:linux
# dependsOn: crossplatformBuild
# workspace:
# clean: all
# steps:
# - task: DownloadPipelineArtifact@2
# inputs:
# source: current
# artifact: crossplatformBuild
# path: $(DOTVVM_ROOT)/artifacts
# - script: Xvfb $DISPLAY -screen 0 800x600x16 &
# - task: Cache@2
# inputs:
# key: '"nuget" | "$(Agent.OS)" | **/packages.lock.json'
# path: $(DOTVVM_ROOT)/.nuget
# - script: find $(DOTVVM_ROOT)/artifacts -type f -exec chmod +rwx {} \;
# - script: |
# dotnet run --project src/DotVVM.Samples.BasicSamples.AspNetCoreLatest \
# --no-build \
# --configuration $(BUILD_CONFIGURATION) \
# --urls http://localhost:16018/ &
# - script: |
# dotnet test src/DotVVM.Samples.Tests \
# --no-build \
# --configuration $(BUILD_CONFIGURATION) \
# --logger trx \
# --results-directory $(Agent.TempDirectory)
# continueOnError: true
# - task: PublishTestResults@2
# inputs:
# testResultsFormat: VSTest
# testResultsFiles: $(Agent.TempDirectory)/**/*.trx
# failTaskOnFailedTests: true
# buildConfiguration: $(BUILD_CONFIGURATION)

- job: owinBuild
displayName: Build OWIN projects (Windows)
- job: crossplatformBuild
displayName: Build cross-platform projects (Linux)
pool:
name: DockerAgents
demands: Agent.OS -equals Windows_NT
name: DockerAgentsLinux
demands: Agent.OS -equals Linux
# container: docker-reg.riganti.cz/dotvvm-ci:linux
workspace:
clean: all
steps:
Expand All @@ -130,83 +30,183 @@ jobs:
workingDirectory: src/DotVVM.Framework
- task: Cache@2
inputs:
key: '"nuget-owin" | "$(Agent.OS)" | **/packages.lock.json'
path: $(Build.SourcesDirectory)/src/packages
- task: NuGetCommand@2
key: '"nuget" | "$(Agent.OS)" | **/packages.lock.json'
path: $(DOTVVM_ROOT)/.nuget
- task: DotNetCoreCLI@2
inputs:
command: restore
restoreSolution: src/Windows.sln
feedsToUse: config
nugetConfigPath: src/NuGet.config
- task: MSBuild@1
projects: ci/linux/Linux.sln
packagesDirectory: $(DOTVVM_ROOT)/.nuget
- task: DotNetCoreCLI@2
inputs:
solution: src/Windows.sln
configuration: $(BUILD_CONFIGURATION)
msbuildArguments: >
/p:DeployOnBuild=true
/p:PublishProfile=$(Build.SourcesDirectory)/ci/windows/GenericPublish.pubxml
command: build
projects: src/Crossplatform.sln
arguments: --no-restore --configuration $(BUILD_CONFIGURATION)
- publish: $(DOTVVM_ROOT)/artifacts
name: owinBuild
name: crossplatformBuild

- job: uiTestsOwin
displayName: Run UI tests (Windows)
- job: unitTestsCrossplatform
displayName: Run cross-platform unit tests (Linux)
pool:
name: DockerAgents
demands: Agent.OS -equals Windows_NT
# container: docker-reg.riganti.cz/dotvvm-ci:windows
dependsOn: owinBuild
name: DockerAgentsLinux
demands: Agent.OS -equals Linux
# container: docker-reg.riganti.cz/dotvvm-ci:linux
dependsOn: crossplatformBuild
workspace:
clean: all
steps:
- task: DownloadPipelineArtifact@2
inputs:
source: current
artifact: owinBuild
artifact: crossplatformBuild
path: $(DOTVVM_ROOT)/artifacts
# - task: DownloadPipelineArtifact@2
# inputs:
# source: specific
# project: DotVVM Public
# pipeline: CI
# runVersion: specific
# runId: '111261'
# artifact: owinBuild
# path: $(DOTVVM_ROOT)/artifacts
- powershell: |
Copy-Item -Recurse `
$(DOTVVM_ROOT)/artifacts/DotVVM.Samples.BasicSamples.Owin `
C:/inetpub/dotvvm.owin
- powershell: |
Copy-Item -Recurse `
$(DOTVVM_ROOT)/artifacts/DotVVM.Samples.BasicSamples.Api.Owin `
C:/inetpub/dotvvm.api.owin
- powershell: |
Copy-Item -Recurse `
$(Build.SourcesDirectory)/src/DotVVM.Samples.Common `
C:/inetpub/DotVVM.Samples.Common
- powershell: icacls C:\inetpub /grant "IIS_IUSRS:(OI)(CI)F"
- powershell: New-Website -Name dotvvm.owin -PhysicalPath C:\inetpub\dotvvm.owin\ -Port 5407
- powershell: New-Website -Name dotvvm.api.owin -PhysicalPath C:\inetpub\dotvvm.api.owin\ -Port 5002
- powershell: |
Copy-Item `
$(Build.SourcesDirectory)/src/DotVVM.Samples.Tests/Profiles/seleniumconfig.owin.chrome.json `
$(Build.SourcesDirectory)/src/DotVVM.Samples.Tests/seleniumconfig.json
- powershell: cat $(Build.SourcesDirectory)/src/DotVVM.Samples.Tests/seleniumconfig.json
- powershell: |
Copy-Item `
$(Build.SourcesDirectory)/src/DotVVM.Samples.Tests/Profiles/seleniumconfig.owin.chrome.json `
$(DOTVVM_ROOT)/artifacts/bin/DotVVM.Samples.Tests/$(BUILD_CONFIGURATION)/netcoreapp3.1/seleniumconfig.json
- powershell: cat $(Build.SourcesDirectory)/src/DotVVM.Samples.Tests/seleniumconfig.json
- powershell: |
dotnet test src/DotVVM.Samples.Tests `
--configuration $(BUILD_CONFIGURATION) `
--logger trx `
--results-directory $(Agent.TempDirectory); `
icm { Stop-Process -Name chrome; Stop-Process -Name chromedriver }
- task: Cache@2
inputs:
key: '"nuget" | "$(Agent.OS)" | **/packages.lock.json'
path: $(DOTVVM_ROOT)/.nuget
- task: DotNetCoreCLI@2
inputs:
command: test
projects: src/DotVVM.Framework.Tests.Common
arguments: --no-build --configuration $(BUILD_CONFIGURATION)
publishTestResults: true

- job: uiTestsCrossplatform
displayName: Run UI tests (Linux)
pool:
name: DockerAgentsLinux
demands: Agent.OS -equals Linux
# container: docker-reg.riganti.cz/dotvvm-ci:linux
dependsOn: crossplatformBuild
workspace:
clean: all
steps:
- task: DownloadPipelineArtifact@2
inputs:
source: current
artifact: crossplatformBuild
path: $(DOTVVM_ROOT)/artifacts
- script: Xvfb $DISPLAY -screen 0 800x600x16 &
- task: Cache@2
inputs:
key: '"nuget" | "$(Agent.OS)" | **/packages.lock.json'
path: $(DOTVVM_ROOT)/.nuget
- script: find $(DOTVVM_ROOT)/artifacts -type f -exec chmod +rwx {} \;
- script: |
dotnet run --project src/DotVVM.Samples.BasicSamples.AspNetCoreLatest \
--no-build \
--configuration $(BUILD_CONFIGURATION) \
--urls http://localhost:16018/ &
- script: |
dotnet test src/DotVVM.Samples.Tests \
--no-build \
--configuration $(BUILD_CONFIGURATION) \
--logger trx \
--results-directory $(Agent.TempDirectory)
continueOnError: true
- task: PublishTestResults@2
inputs:
testResultsFormat: VSTest
testResultsFiles: $(Agent.TempDirectory)/**/*.trx
failTaskOnFailedTests: true
buildConfiguration: $(BUILD_CONFIGURATION)

# - job: owinBuild
# displayName: Build OWIN projects (Windows)
# pool:
# name: DockerAgents
# demands: Agent.OS -equals Windows_NT
# workspace:
# clean: all
# 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: DockerAgents
# demands: Agent.OS -equals Windows_NT
# # container: docker-reg.riganti.cz/dotvvm-ci:windows
# dependsOn: owinBuild
# workspace:
# clean: all
# steps:
# - task: DownloadPipelineArtifact@2
# inputs:
# source: current
# artifact: owinBuild
# path: $(DOTVVM_ROOT)/artifacts
# # - task: DownloadPipelineArtifact@2
# # inputs:
# # source: specific
# # project: DotVVM Public
# # pipeline: CI
# # runVersion: specific
# # runId: '111261'
# # artifact: owinBuild
# # path: $(DOTVVM_ROOT)/artifacts
# - powershell: |
# Copy-Item -Recurse `
# $(DOTVVM_ROOT)/artifacts/DotVVM.Samples.BasicSamples.Owin `
# C:/inetpub/dotvvm.owin
# - powershell: |
# Copy-Item -Recurse `
# $(DOTVVM_ROOT)/artifacts/DotVVM.Samples.BasicSamples.Api.Owin `
# C:/inetpub/dotvvm.api.owin
# - powershell: |
# Copy-Item -Recurse `
# $(Build.SourcesDirectory)/src/DotVVM.Samples.Common `
# C:/inetpub/DotVVM.Samples.Common
# - powershell: icacls C:\inetpub /grant "IIS_IUSRS:(OI)(CI)F"
# - powershell: New-Website -Name dotvvm.owin -PhysicalPath C:\inetpub\dotvvm.owin\ -Port 5407
# - powershell: New-Website -Name dotvvm.api.owin -PhysicalPath C:\inetpub\dotvvm.api.owin\ -Port 5002
# - powershell: |
# Copy-Item `
# $(Build.SourcesDirectory)/src/DotVVM.Samples.Tests/Profiles/seleniumconfig.owin.chrome.json `
# $(Build.SourcesDirectory)/src/DotVVM.Samples.Tests/seleniumconfig.json
# - powershell: cat $(Build.SourcesDirectory)/src/DotVVM.Samples.Tests/seleniumconfig.json
# - powershell: |
# Copy-Item `
# $(Build.SourcesDirectory)/src/DotVVM.Samples.Tests/Profiles/seleniumconfig.owin.chrome.json `
# $(DOTVVM_ROOT)/artifacts/bin/DotVVM.Samples.Tests/$(BUILD_CONFIGURATION)/netcoreapp3.1/seleniumconfig.json
# - powershell: cat $(Build.SourcesDirectory)/src/DotVVM.Samples.Tests/seleniumconfig.json
# - powershell: |
# dotnet test src/DotVVM.Samples.Tests `
# --configuration $(BUILD_CONFIGURATION) `
# --logger trx `
# --results-directory $(Agent.TempDirectory); `
# icm { Stop-Process -Name chrome; Stop-Process -Name chromedriver }
# continueOnError: true
# - task: PublishTestResults@2
# inputs:
# testResultsFormat: VSTest
# testResultsFiles: $(Agent.TempDirectory)/**/*.trx
# failTaskOnFailedTests: true
# buildConfiguration: $(BUILD_CONFIGURATION)
Loading

0 comments on commit b1da96f

Please sign in to comment.