소스 검색

Tweaking pipeline to be multi-stage

default_compile_flags
vector-of-bool 4 년 전
부모
커밋
751b97364d
3개의 변경된 파일126개의 추가작업 그리고 43개의 파일을 삭제
  1. +3
    -1
      Makefile
  2. +27
    -0
      azure-deploy.yml
  3. +96
    -42
      azure-pipelines.yml

+ 3
- 1
Makefile 파일 보기

@@ -39,13 +39,15 @@ macos-ci:
python3 -u tools/ci.py \
-B download \
-T tools/gcc-9.jsonc \
-T2 tools/gcc-9.next.jsonc \
-T2 tools/gcc-9.next.jsonc
mv _build/dds _build/dds-macos-x64

linux-ci:
python3 -u tools/ci.py \
-B download \
-T tools/gcc-9.jsonc \
-T2 tools/gcc-9-static.jsonc
mv _build/dds _build/dds-linux-x64

nix-ci:
python3 -u tools/ci.py \

+ 27
- 0
azure-deploy.yml 파일 보기

@@ -0,0 +1,27 @@
parameters:
- name: branch
type: string
displayName: Branch
- name: targetPath
type: string
displayName: Target Path

jobs:
- ${{ if eq(variables.build.SourceBranchName, parameters.branch) }}:
- job: deploy_${{ parameters.branch }}
displayName: Deploy for ${{parameters.branch}}
condition: succeeded()
steps:
- task: DownloadPipelineArtifact@2
displayName: Download builds
inputs:
targetPath: art/
- task: CopyFilesOverSSH@0
displayName: Post builds
inputs:
sshEndpoint: dds.pizza
sourceFolder: art/
targetFolder: ${{ parameters.targetPath }}
failOnEmptySource: true
overwrite: true


+ 96
- 42
azure-pipelines.yml 파일 보기

@@ -1,47 +1,101 @@
# Refer: https://aka.ms/yaml

jobs:
variables:
shouldDeploy: >
${{ or(
eq(variables.Build.SourceBranch, 'refs/heads/develop'),
eq(variables.Build.SourceBranch, 'refs/heads/master')
) }}

- job: Windows_MSVC_VS2019
pool:
vmImage: windows-2019
steps:
- script: |
echo Loading VS environment
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\vsdevcmd" -arch=x64 || exit 1
echo Executing Build and Tests
reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f || exit 1
python -m pip install pytest pytest-xdist || exit 1
python -u tools/ci.py -B download -T tools\msvc.jsonc -T2 tools\msvc.next.jsonc || exit 1
displayName: Full CI
- publish: _build/dds.exe
artifact: DDS Executable - Windows VS2019
stages:
- stage: build_test
displayName: Build and Test
jobs:
- job: win_vs2019
displayName: Windows - VS 2019
pool:
vmImage: windows-2019
steps:
- script: |
echo Loading VS environment
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\Tools\vsdevcmd" -arch=x64 || exit 1
echo Executing Build and Tests
reg add HKLM\SYSTEM\CurrentControlSet\Control\FileSystem /v LongPathsEnabled /t REG_DWORD /d 1 /f || exit 1
python -m pip install pytest pytest-xdist || exit 1
python -u tools/ci.py -B download -T tools\msvc.jsonc -T2 tools\msvc.next.jsonc || exit 1
move _build\dds.exe _build\dds-win-x64.exe || exit 1
displayName: Build and Test
- publish: _build\dds-win-x64.exe
displayName: Publish
artifact: dds-win-x64

- job: Linux_GCC9
pool:
vmImage: ubuntu-18.04
steps:
- script: |
set -eu
sudo apt update -y
sudo apt install -y python3-minimal g++-9 ccache
python3 -m pip install pytest pytest-xdist
displayName: Prepare System
- script: make linux-ci
displayName: Full CI
- publish: _build/dds
artifact: DDS Executable - Linux
- job: linux_gcc9
displayName: Linux - GCC 9
pool:
vmImage: ubuntu-18.04
steps:
- script: |
set -eu
sudo apt update -y
sudo apt install -y python3-minimal g++-9 ccache
python3 -m pip install pytest pytest-xdist
displayName: Prepare System
- script: make linux-ci
displayName: Build and Test
- publish: _build/dds-linux-x64
displayName: Publish
artifact: dds-linux-x64

- job: macOS_GCC9
pool:
vmImage: macOS-10.14
steps:
- script: brew install gcc@9 ccache
displayName: Prepare System
- script: |
set -eu
python3 -m pip install pytest pytest-xdist
make macos-ci
displayName: Build and Run Unit Tests
- publish: _build/dds
artifact: DDS Executable - macOS
- job: macos_gcc9
displayName: macOS - GCC 9
pool:
vmImage: macOS-10.14
steps:
- script: brew install gcc@9 ccache
displayName: Prepare System
- script: |
set -eu
python3 -m pip install pytest pytest-xdist
make macos-ci
displayName: Build and Test
- publish: _build/dds-macos-x64
displayName: Publish
artifact: dds-macos-x64

- stage: deploy_build
displayName: Deploy
condition: eq(variables.shouldDeploy, true)
jobs:
- job: deploy
displayName: Deploy for ${{variables.Build.SourceBranchName}}
condition: succeeded()
steps:
- task: DownloadPipelineArtifact@2
displayName: Download builds
inputs:
targetPath: art/
- task: CopyFilesOverSSH@0
displayName: Post builds
inputs:
sshEndpoint: dds.pizza
sourceFolder: art/
targetFolder: ~/${{variables.Build.SourceBranchName}}/
failOnEmptySource: true
overwrite: true
# - job: deploy
# displayName: Deploy Canary
# # Only deploy the "canary" build when we are on the 'develop' branch
# condition: and(succeeded(), eq(variables.Build.SourceBranchName, 'develop'))
# steps:
# - task: DownloadPipelineArtifact@2
# displayName: Download builds
# inputs:
# targetPath: art/
# - task: CopyFilesOverSSH@0
# displayName: Post builds
# inputs:
# sshEndpoint: dds.pizza
# sourceFolder: art/
# targetFolder: ~/canary/
# failOnEmptySource: true
# overwrite: true

Loading…
취소
저장