瀏覽代碼

ci: add GCP pipeline files to replace AppVeyor (#5152)

Those files are the required to drive the new GCP pipeline aimed to
replace AppVeyor. As-is, those file have no effect on the repo.
What's needed to add the CI is to setup some repository permissions,
and only then CI will be able to run.

This CI will build x86_64 versions of DXC on both Linux and Windows, run
tests, and allow retrieving build artifacts (same as Appveyor).

Signed-off-by: Nathan Gauër <[email protected]>
Nathan Gauër 2 年之前
父節點
當前提交
9d89d67fd0
共有 2 個文件被更改,包括 70 次插入0 次删除
  1. 54 0
      gcp-pipelines/x86_64-linux-clang.yml
  2. 16 0
      gcp-pipelines/x86_64-windows-msvc.yml

+ 54 - 0
gcp-pipelines/x86_64-linux-clang.yml

@@ -0,0 +1,54 @@
+steps:
+  - name: gcr.io/cloud-builders/git
+    args: ['fetch', '--unshallow']
+  - name: 'gcr.io/shaderc-build/shader-compiler-team:kokoro-dxc-builder'
+    args:
+      - git
+      - submodule
+      - update
+      - '--init'
+  - name: 'gcr.io/shaderc-build/shader-compiler-team:kokoro-dxc-builder'
+    args:
+      - cmake
+      - '-Bbuild'
+      - '-GNinja'
+      - '-DCMAKE_BUILD_TYPE=Release'
+      - '-DCMAKE_CXX_COMPILER=clang++'
+      - '-DCMAKE_C_COMPILER=clang'
+      - '-DCMAKE_INSTALL_PREFIX=artifacts'
+      - '-DDXC_USE_LIT=ON'
+      - '-DENABLE_SPIRV_CODEGEN=ON'
+      - '-DSPIRV_BUILD_TESTS=ON'
+      - '-C'
+      - 'cmake/caches/PredefinedParams.cmake'
+  - name: 'gcr.io/shaderc-build/shader-compiler-team:kokoro-dxc-builder'
+    args:
+      - ninja
+      - '-C'
+      - build
+  - name: 'gcr.io/shaderc-build/shader-compiler-team:kokoro-dxc-builder'
+    args:
+      - ninja
+      - '-C'
+      - build
+      - check-all
+  - name: 'gcr.io/shaderc-build/shader-compiler-team:kokoro-dxc-builder'
+    args:
+      - ninja
+      - '-C'
+      - build
+      - install-distribution
+  - name: 'gcr.io/shaderc-build/shader-compiler-team:kokoro-dxc-builder'
+    script: |
+      #!/usr/bin/env bash
+      zip -r dxc-artifacts.zip /workspace/artifacts/*
+logsBucket: 'gs://public-github-building-logs'
+options:
+  logging: LEGACY
+  pool:
+    name: projects/shaderc-build/locations/us-central1/workerPools/dxc
+artifacts:
+  objects:
+    location: 'gs://public-directx-shader-compiler/$COMMIT_SHA'
+    paths:
+      - dxc-artifacts.zip

+ 16 - 0
gcp-pipelines/x86_64-windows-msvc.yml

@@ -0,0 +1,16 @@
+steps:
+  - name: 'gcr.io/shaderc-build/shader-compiler-team:dxc-win-builder'
+    env:
+      - BUILD_ID=$BUILD_ID
+      - SOURCE_IMAGE=dxc-builder-windows-vs22
+      - COMMIT_SHA=$COMMIT_SHA
+logsBucket: 'gs://public-github-building-logs'
+options:
+  logging: LEGACY
+  pool:
+    name: projects/shaderc-build/locations/us-central1/workerPools/dxc
+artifacts:
+  objects:
+    location: 'gs://public-directx-shader-compiler/$COMMIT_SHA'
+    paths:
+      - dxc-artifacts.zip