[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 1/3] Add GitLab pipeline



Run both free and checked CodeQL builds.

Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx>
---
 .gitlab-ci.yml | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 .gitlab-ci.yml

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..24b4356
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,46 @@
+# Required software:
+  # Latest PowerShell Core
+  # git
+    # Enable Git long paths so that files are cleaned correctly:
+    # git config --system core.longpaths true
+  # CodeQL (set in PATH)
+  # EWDK with EWDK_ROOT set to the mounted EWDK path
+# I also set the following in config.toml to shorten the build path:
+  # builds_dir = "C:/a"
+
+stages:
+  - build
+
+build-job:
+  tags:
+    - windows
+    - ewdk
+  stage: build
+  parallel:
+    matrix:
+      - BUILD_ARCH:
+          # x86 is no longer supported by new WDKs
+          - x64
+        BUILD_TYPE:
+          - checked
+          - free
+  script:
+    - Get-Content $Env:EWDK_ROOT\Version.txt
+    - codeql.exe pack download codeql/cpp-queries@0.9.0 
microsoft/windows-drivers@1.1.0
+    - |
+      Invoke-WebRequest `
+        -Uri 
"https://raw.githubusercontent.com/microsoft/Windows-Driver-Developer-Supplemental-Tools/44a75acab6decc2676d0e0f045de47a20a238c3c/suites/windows_driver_recommended.qls";
 `
+        -OutFile windows_driver_recommended.qls
+    - |
+      Set-Content -Path build.cmd -Value `
+        "call %EWDK_ROOT%\BuildEnv\SetupBuildEnv.cmd",
+        # CodeQL is incompatible with x86
+        'pwsh.exe -NonInteractive -ExecutionPolicy Bypass -Command 
".\build.ps1 -Type $Env:BUILD_TYPE -Arch $Env:BUILD_ARCH 
-CodeQL:($Env:BUILD_ARCH -ine ''x86'')"'
+    - cmd.exe /c build.cmd
+  artifacts:
+    name: $CI_PROJECT_NAME
+    paths:
+      - $CI_PROJECT_NAME/
+    when: on_success
+    access: all
+    expire_in: 30 days
-- 
2.50.0.windows.1



Ngoc Tu Dinh | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.