From be827c7540d60fcb629dd1ed98963fd68d6f4782 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 8 Feb 2024 10:28:56 -0500 Subject: [PATCH 1/6] Add basic wasm CI --- eng/pipelines/templates/stages/vmr-build.yml | 28 +++++++++++++++++++ .../templates/variables/vmr-stage.yml | 2 ++ 2 files changed, 30 insertions(+) diff --git a/eng/pipelines/templates/stages/vmr-build.yml b/eng/pipelines/templates/stages/vmr-build.yml index 03844d0e6943..093367b65509 100644 --- a/eng/pipelines/templates/stages/vmr-build.yml +++ b/eng/pipelines/templates/stages/vmr-build.yml @@ -361,6 +361,34 @@ stages: targetOS: android targetArchitecture: x64 + - template: ../jobs/vmr-build.yml + parameters: + buildName: Browser_Shortstack + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ variables.VmrBranch }} + architecture: wasm + pool: + name: ${{ variables.defaultPoolName }} + demands: ${{ variables.defaultPoolDemandsLinux }} + container: ${{ variables.wasmCrossContainer }} + crossRootFs: '/crossrootfs/x64' + targetOS: browser + targetArchitecture: wasm + + - template: ../jobs/vmr-build.yml + parameters: + buildName: Wasi_Shortstack + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ variables.VmrBranch }} + architecture: wasm + pool: + name: ${{ variables.defaultPoolName }} + demands: ${{ variables.defaultPoolDemandsLinux }} + container: ${{ variables.wasmCrossContainer }} + crossRootFs: '/crossrootfs/x64' + targetOS: wasi + targetArchitecture: wasm + - template: ../jobs/vmr-build.yml parameters: buildName: OSX diff --git a/eng/pipelines/templates/variables/vmr-stage.yml b/eng/pipelines/templates/variables/vmr-stage.yml index 50b03acc1faa..13a273ddb247 100644 --- a/eng/pipelines/templates/variables/vmr-stage.yml +++ b/eng/pipelines/templates/variables/vmr-stage.yml @@ -28,6 +28,8 @@ variables: value: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-arm64 - name: androidCrossContainer value: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-android-amd64 +- name: wasmCrossContainer + value: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-webassembly-20230917141449-2aaa02c - ${{ if eq(variables['System.TeamProject'], 'public') }}: - name: defaultPoolName From 243880c953f79e3ec68e2ec23c1468ce71ece46e Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 8 Feb 2024 10:29:56 -0500 Subject: [PATCH 2/6] Temporarily force full build --- eng/pipelines/vmr-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/vmr-build.yml b/eng/pipelines/vmr-build.yml index 45733f9d2293..ecc4db82f1a1 100644 --- a/eng/pipelines/vmr-build.yml +++ b/eng/pipelines/vmr-build.yml @@ -58,7 +58,7 @@ stages: ${{ if eq(variables.isSourceOnlyBuild, 'true') }}: scope: ultralite ${{ else }}: - scope: lite + scope: full # In case the VMR Build stage is temporarily disabled, the VMR synchronization step is run to validate # that the PR can be merged and later synchronized into the VMR without problems. From 66924e3eb499d6eaedab61ac1d7bfaeac7788bf0 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 8 Feb 2024 15:14:34 -0500 Subject: [PATCH 3/6] Don't set CROSSCOMPILE=1 for wasm targets, they are special cased in runtime --- eng/pipelines/templates/jobs/vmr-build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml index 0a3b14ac6cb2..d837027c24ab 100644 --- a/eng/pipelines/templates/jobs/vmr-build.yml +++ b/eng/pipelines/templates/jobs/vmr-build.yml @@ -271,7 +271,10 @@ jobs: fi if [[ -n "${{ parameters.crossRootFs }}" ]]; then - customEnvVars="$customEnvVars ROOTFS_DIR=${{ parameters.crossRootFs}} CROSSCOMPILE=1" + customEnvVars="$customEnvVars ROOTFS_DIR=${{ parameters.crossRootFs}}" + if [[ ${{ parameters.targetArchitecture }}' != 'wasm' ]]; then + customEnvVars="$customEnvVars CROSSCOMPILE=1" + fi fi if [[ ! -z '${{ parameters.targetOS }}' ]]; then From cd5f41b27eb55e6ab08ec559293d8745fdc1227e Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 8 Feb 2024 16:06:37 -0500 Subject: [PATCH 4/6] typo --- eng/pipelines/templates/jobs/vmr-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/templates/jobs/vmr-build.yml b/eng/pipelines/templates/jobs/vmr-build.yml index d837027c24ab..296b6f982989 100644 --- a/eng/pipelines/templates/jobs/vmr-build.yml +++ b/eng/pipelines/templates/jobs/vmr-build.yml @@ -272,7 +272,7 @@ jobs: if [[ -n "${{ parameters.crossRootFs }}" ]]; then customEnvVars="$customEnvVars ROOTFS_DIR=${{ parameters.crossRootFs}}" - if [[ ${{ parameters.targetArchitecture }}' != 'wasm' ]]; then + if [[ '${{ parameters.targetArchitecture }}' != 'wasm' ]]; then customEnvVars="$customEnvVars CROSSCOMPILE=1" fi fi From efab88ab3f0fde3f8004c894b5bf1d014f6eec55 Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 8 Feb 2024 16:30:57 -0500 Subject: [PATCH 5/6] Revert "Temporarily force full build" This reverts commit 243880c953f79e3ec68e2ec23c1468ce71ece46e. --- eng/pipelines/vmr-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/vmr-build.yml b/eng/pipelines/vmr-build.yml index ecc4db82f1a1..45733f9d2293 100644 --- a/eng/pipelines/vmr-build.yml +++ b/eng/pipelines/vmr-build.yml @@ -58,7 +58,7 @@ stages: ${{ if eq(variables.isSourceOnlyBuild, 'true') }}: scope: ultralite ${{ else }}: - scope: full + scope: lite # In case the VMR Build stage is temporarily disabled, the VMR synchronization step is run to validate # that the PR can be merged and later synchronized into the VMR without problems. From 48cd213b17d8808318404748090454fbaf9d6e2c Mon Sep 17 00:00:00 2001 From: Jo Shields Date: Thu, 8 Feb 2024 16:32:31 -0500 Subject: [PATCH 6/6] Move a wasm job to always-run --- eng/pipelines/templates/stages/vmr-build.yml | 28 ++++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/eng/pipelines/templates/stages/vmr-build.yml b/eng/pipelines/templates/stages/vmr-build.yml index 093367b65509..e77d26e27247 100644 --- a/eng/pipelines/templates/stages/vmr-build.yml +++ b/eng/pipelines/templates/stages/vmr-build.yml @@ -345,6 +345,20 @@ stages: targetOS: windows targetArchitecture: x64 + - template: ../jobs/vmr-build.yml + parameters: + buildName: Browser_Shortstack + isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} + vmrBranch: ${{ variables.VmrBranch }} + architecture: wasm + pool: + name: ${{ variables.defaultPoolName }} + demands: ${{ variables.defaultPoolDemandsLinux }} + container: ${{ variables.wasmCrossContainer }} + crossRootFs: '/crossrootfs/x64' + targetOS: browser + targetArchitecture: wasm + ### Additional jobs for full build ### - ${{ if in(parameters.scope, 'full') }}: @@ -361,20 +375,6 @@ stages: targetOS: android targetArchitecture: x64 - - template: ../jobs/vmr-build.yml - parameters: - buildName: Browser_Shortstack - isBuiltFromVmr: ${{ parameters.isBuiltFromVmr }} - vmrBranch: ${{ variables.VmrBranch }} - architecture: wasm - pool: - name: ${{ variables.defaultPoolName }} - demands: ${{ variables.defaultPoolDemandsLinux }} - container: ${{ variables.wasmCrossContainer }} - crossRootFs: '/crossrootfs/x64' - targetOS: browser - targetArchitecture: wasm - - template: ../jobs/vmr-build.yml parameters: buildName: Wasi_Shortstack