diff --git a/.ado/build.yml b/.ado/build.yml index 246a341..3f37100 100644 --- a/.ado/build.yml +++ b/.ado/build.yml @@ -18,6 +18,8 @@ stages: - template: templates/apple-build-job.yml + - template: templates/linux-build-job.yml + - stage: Release dependsOn: Build condition: succeeded() diff --git a/.ado/pr.yml b/.ado/pr.yml index a20e1d5..f336070 100644 --- a/.ado/pr.yml +++ b/.ado/pr.yml @@ -32,3 +32,7 @@ jobs: - template: templates/apple-build-job.yml parameters: DependsOn: ChangeLog + + - template: templates/linux-build-job.yml + parameters: + DependsOn: ChangeLog diff --git a/.ado/templates/apple-build-job.yml b/.ado/templates/apple-build-job.yml index a49a654..255a8fb 100644 --- a/.ado/templates/apple-build-job.yml +++ b/.ado/templates/apple-build-job.yml @@ -5,7 +5,7 @@ parameters: jobs: - job: AppleBuild - displayName: Apple Build + displayName: Build ${{ if ne(parameters.DependsOn, '') }}: dependsOn: ${{ parameters.DependsOn }} ${{ if ne(parameters.DependsOn, '') }}: @@ -29,36 +29,4 @@ jobs: MsoPlatform: MAC BuildConfiguration: Release steps: - - checkout: self - clean: false - submodules: false - - - task: CMake@1 - displayName: Generate build scripts - inputs: - workingDirectory: $(Build.BinariesDirectory)/$(MsoPlatform)/$(BuildConfiguration) - cmakeArgs: -DMSO_LIBLET_PLATFORM=$(MsoPlatform) -DCMAKE_BUILD_TYPE=$(BuildConfiguration) $(Build.SourcesDirectory) - - - task: CMake@1 - displayName: Build - inputs: - workingDirectory: $(Build.BinariesDirectory)/$(MsoPlatform)/$(BuildConfiguration) - cmakeArgs: --build . - - - task: CMake@1 - displayName: Stage built files - inputs: - workingDirectory: $(Pipeline.Workspace) - cmakeArgs: --install $(Build.BinariesDirectory)/$(MsoPlatform)/$(BuildConfiguration) --prefix tests --component tests - - - script: ./eventWaitHandle_tests - displayName: Tests - Event Wait Handle - workingDirectory: $(Pipeline.Workspace)/tests/$(MsoPlatform)/$(BuildConfiguration) - - - script: ./functional_tests - displayName: Tests - Functional - workingDirectory: $(Pipeline.Workspace)/tests/$(MsoPlatform)/$(BuildConfiguration) - - - script: ./object_tests - displayName: Tests - Object - workingDirectory: $(Pipeline.Workspace)/tests/$(MsoPlatform)/$(BuildConfiguration) + - template: posix-build-steps.yml diff --git a/.ado/templates/linux-build-job.yml b/.ado/templates/linux-build-job.yml new file mode 100644 index 0000000..304ce36 --- /dev/null +++ b/.ado/templates/linux-build-job.yml @@ -0,0 +1,26 @@ +parameters: + - name: DependsOn + type: string + default: '' + +jobs: +- job: LinuxBuild + displayName: Build + ${{ if ne(parameters.DependsOn, '') }}: + dependsOn: ${{ parameters.DependsOn }} + ${{ if ne(parameters.DependsOn, '') }}: + condition: succeeded() + timeoutInMinutes: 30 + cancelTimeoutInMinutes: 2 + pool: + vmImage: 'ubuntu-18.04' + strategy: + matrix: + Linux_Debug: + MsoPlatform: LINUX + BuildConfiguration: Debug + Linux_Release: + MsoPlatform: LINUX + BuildConfiguration: Release + steps: + - template: posix-build-steps.yml diff --git a/.ado/templates/posix-build-steps.yml b/.ado/templates/posix-build-steps.yml new file mode 100644 index 0000000..c23e0ed --- /dev/null +++ b/.ado/templates/posix-build-steps.yml @@ -0,0 +1,34 @@ +steps: +- checkout: self + clean: false + submodules: false + +- task: CMake@1 + displayName: Generate build scripts + inputs: + workingDirectory: $(Build.BinariesDirectory)/$(MsoPlatform)/$(BuildConfiguration) + cmakeArgs: -DMSO_LIBLET_PLATFORM=$(MsoPlatform) -DCMAKE_BUILD_TYPE=$(BuildConfiguration) $(Build.SourcesDirectory) + +- task: CMake@1 + displayName: Build + inputs: + workingDirectory: $(Build.BinariesDirectory)/$(MsoPlatform)/$(BuildConfiguration) + cmakeArgs: --build . + +- task: CMake@1 + displayName: Stage built files + inputs: + workingDirectory: $(Pipeline.Workspace) + cmakeArgs: --install $(Build.BinariesDirectory)/$(MsoPlatform)/$(BuildConfiguration) --prefix tests --component tests + +- script: ./eventWaitHandle_tests + displayName: Tests - Event Wait Handle + workingDirectory: $(Pipeline.Workspace)/tests/$(MsoPlatform)/$(BuildConfiguration) + +- script: ./functional_tests + displayName: Tests - Functional + workingDirectory: $(Pipeline.Workspace)/tests/$(MsoPlatform)/$(BuildConfiguration) + +- script: ./object_tests + displayName: Tests - Object + workingDirectory: $(Pipeline.Workspace)/tests/$(MsoPlatform)/$(BuildConfiguration) diff --git a/.ado/templates/windows-build-job.yml b/.ado/templates/windows-build-job.yml index 5733d71..29dde22 100644 --- a/.ado/templates/windows-build-job.yml +++ b/.ado/templates/windows-build-job.yml @@ -5,7 +5,7 @@ parameters: jobs: - job: WindowsBuild - displayName: Windows Build + displayName: Build ${{ if ne(parameters.DependsOn, '') }}: dependsOn: ${{ parameters.DependsOn }} ${{ if ne(parameters.DependsOn, '') }}: diff --git a/change/@microsoft-mso-2020-04-02-23-28-01-linux-ci.json b/change/@microsoft-mso-2020-04-02-23-28-01-linux-ci.json new file mode 100644 index 0000000..937e492 --- /dev/null +++ b/change/@microsoft-mso-2020-04-02-23-28-01-linux-ci.json @@ -0,0 +1,8 @@ +{ + "type": "none", + "comment": "Add Linux builds to the PR and Build pipelines. Update job names.", + "packageName": "@microsoft/mso", + "email": "adam@thefoxmans.net", + "dependentChangeType": "none", + "date": "2020-04-03T06:28:01.705Z" +} \ No newline at end of file