diff mbox series

[31/31] CI: Enable sandbox build for Windows

Message ID 20230424230836.630907-32-sjg@chromium.org
State Changes Requested
Delegated to: Tom Rini
Headers show
Series Allow building sandbox with MSYS2 | expand

Commit Message

Simon Glass April 24, 2023, 11:08 p.m. UTC
Add a new rule to build sandbox for Windows. For now, no tests are run in
this configuration.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 .azure-pipelines.yml | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
diff mbox series

Patch

diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml
index 76ffdeebd667..d15a86ff3650 100644
--- a/.azure-pipelines.yml
+++ b/.azure-pipelines.yml
@@ -39,6 +39,33 @@  stages:
           # Tell MSYS2 not to ‘cd’ our startup directory to HOME
           CHERE_INVOKING: yes
 
+  - job: sandbox_windows
+    displayName: 'Ensure sandbox build for Windows'
+    pool:
+      vmImage: $(windows_vm)
+    steps:
+      - powershell: |
+          (New-Object Net.WebClient).DownloadFile("https://github.com/msys2/msys2-installer/releases/download/2021-06-04/msys2-base-x86_64-20210604.sfx.exe", "sfx.exe")
+        displayName: 'Install MSYS2'
+      - script: |
+          sfx.exe -y -o%CD:~0,2%\
+          %CD:~0,2%\msys64\usr\bin\bash -lc " "
+          %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Syuu"
+          %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm -Syuu"
+        displayName: 'Update MSYS2'
+      - script: |
+          %CD:~0,2%\msys64\usr\bin\bash -lc "pacman --noconfirm --needed -Sy bc bison diffutils flex gcc libgnutls-devel libutil-linux-devel make openssl-devel python python-setuptools swig"
+        displayName: 'Install Toolchain'
+      - script: |
+          echo make sandbox_defconfig all > build-tools.sh
+          %CD:~0,2%\msys64\usr\bin\bash -lc "bash build-tools.sh"
+        displayName: 'Build sandbox'
+        env:
+          # Tell MSYS2 we need a POSIX emulation layer
+          MSYSTEM: MSYS
+          # Tell MSYS2 not to ‘cd’ our startup directory to HOME
+          CHERE_INVOKING: yes
+
   - job: tools_only_macOS
     displayName: 'Ensure host tools build for macOS X'
     pool: