Skip to content

Commit

Permalink
.azurepipelines: Add Rust support
Browse files Browse the repository at this point in the history
Updates the repo pipelines to support Rust builds.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
  • Loading branch information
makubacki committed Aug 30, 2023
1 parent c4b47ba commit b6f3121
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 20 deletions.
6 changes: 6 additions & 0 deletions .azurepipelines/MuDevOpsWrapper.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ parameters:
displayName: Whether Rust code is being built
type: boolean
default: false
- name: extra_cargo_steps
displayName: Extra Steps to Run Before Standard Cargo Steps
type: stepList
default:
- script: echo No extra cargo steps provided

jobs:
- template: Jobs/PrGate.yml@mu_devops
Expand Down Expand Up @@ -106,6 +111,7 @@ jobs:
- checkout: self
fetchDepth: 1
clean: true
- ${{ parameters.extra_cargo_steps }}
- template: Steps/RustCargoSteps.yml@mu_devops

- ${{ parameters.extra_jobs }}
Expand Down
17 changes: 10 additions & 7 deletions .azurepipelines/Platform-Build-GCC5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ resources:
containers:
- container: linux-gcc
image: ghcr.io/microsoft/mu_devops/ubuntu-22-test:latest
options: --name mu_devops_build_container

variables:
- group: tool-chain-ubuntu-gcc
Expand All @@ -35,7 +36,7 @@ jobs:
BuildTarget: "DEBUG"
BuildExtraTag: ""
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE BLD_*_QEMU_CORE_NUM=2 TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
BuildArtifactsBinary: |
Expand All @@ -50,7 +51,7 @@ jobs:
BuildTarget: "RELEASE"
BuildExtraTag: ""
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE BLD_*_QEMU_CORE_NUM=2 TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
BuildArtifactsBinary: |
Expand All @@ -65,7 +66,7 @@ jobs:
BuildTarget: "DEBUG"
BuildExtraTag: "ON_ARM"
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: false
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE BLD_*_QEMU_CORE_NUM=2 TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
SelfHostAgent: true
Expand All @@ -82,7 +83,7 @@ jobs:
BuildTarget: "RELEASE"
BuildExtraTag: "ON_ARM"
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: false
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE BLD_*_QEMU_CORE_NUM=2 TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
SelfHostAgent: true
Expand All @@ -99,7 +100,7 @@ jobs:
BuildTarget: "RELEASE"
BuildExtraTag: "NO_SMM"
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE BLD_*_QEMU_CORE_NUM=2 BLD_*_SMM_ENABLED=FALSE"
BuildArtifactsBinary: |
Expand All @@ -116,6 +117,7 @@ jobs:
BuildExtraStep:
- script: sudo apt-get install -y libssl-dev
displayName: Install openssl
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
BuildArtifactsBinary: |
Expand All @@ -133,6 +135,7 @@ jobs:
BuildExtraStep:
- script: sudo apt-get install -y libssl-dev
displayName: Install openssl
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
BuildArtifactsBinary: |
Expand All @@ -148,7 +151,7 @@ jobs:
BuildTarget: "DEBUG"
BuildExtraTag: "ON_AARCH64"
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
SelfHostAgent: true
Expand All @@ -165,7 +168,7 @@ jobs:
BuildTarget: "RELEASE"
BuildExtraTag: "ON_AARCH64"
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
SelfHostAgent: true
Expand Down
10 changes: 5 additions & 5 deletions .azurepipelines/Platform-Build-VS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
BuildTarget: "DEBUG"
BuildExtraTag: ""
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE BLD_*_QEMU_CORE_NUM=2 TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
BuildArtifactsBinary: |
Expand All @@ -53,7 +53,7 @@ jobs:
BuildTarget: "RELEASE"
BuildExtraTag: ""
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE BLD_*_QEMU_CORE_NUM=2 TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
BuildArtifactsBinary: |
Expand All @@ -68,7 +68,7 @@ jobs:
BuildTarget: "DEBUG"
BuildExtraTag: "ON_ARM"
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: false
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE BLD_*_QEMU_CORE_NUM=2 TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
SelfHostAgent: true
Expand All @@ -85,7 +85,7 @@ jobs:
BuildTarget: "RELEASE"
BuildExtraTag: "ON_ARM"
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: false
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE BLD_*_QEMU_CORE_NUM=2 TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
SelfHostAgent: true
Expand All @@ -102,7 +102,7 @@ jobs:
BuildTarget: "RELEASE"
BuildExtraTag: "NO_SMM"
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE BLD_*_QEMU_CORE_NUM=2 BLD_*_SMM_ENABLED=FALSE"
BuildArtifactsBinary: |
Expand Down
20 changes: 13 additions & 7 deletions .azurepipelines/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ resources:
endpoint: microsoft
name: microsoft/mu_devops
ref: main
containers:
- container: linux-gcc
image: ghcr.io/microsoft/mu_devops/ubuntu-22-test:latest
options: --name mu_devops_build_container

name: $(Date:yyyyMMdd)$(Rev:.r) Mu Tiano Platforms Release

Expand All @@ -34,7 +38,7 @@ stages:
tool_chain_tag: 'GCC5'
vm_image: ubuntu-latest
os_type: Linux
container_image: ghcr.io/microsoft/mu_devops/ubuntu-22-test:latest
container_image: linux-gcc
build_matrix:
QemuQ35_GCC_DEBUG:
BuildPackage: QemuQ35Pkg
Expand All @@ -44,7 +48,7 @@ stages:
BuildTarget: "DEBUG"
BuildExtraTag: ""
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE BLD_*_QEMU_CORE_NUM=2 TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
BuildArtifactsBinary: |
Expand All @@ -59,7 +63,7 @@ stages:
BuildTarget: "RELEASE"
BuildExtraTag: ""
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE BLD_*_QEMU_CORE_NUM=2 TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
BuildArtifactsBinary: |
Expand All @@ -74,7 +78,7 @@ stages:
BuildTarget: "RELEASE"
BuildExtraTag: "NO_SMM"
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE BLD_*_QEMU_CORE_NUM=2 BLD_*_SMM_ENABLED=FALSE"
BuildArtifactsBinary: |
Expand All @@ -91,6 +95,7 @@ stages:
BuildExtraStep:
- script: sudo apt-get install -y libssl-dev
displayName: Install openssl
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
BuildArtifactsBinary: |
Expand All @@ -108,6 +113,7 @@ stages:
BuildExtraStep:
- script: sudo apt-get install -y libssl-dev
displayName: Install openssl
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
BuildArtifactsBinary: |
Expand Down Expand Up @@ -144,7 +150,7 @@ stages:
BuildTarget: "DEBUG"
BuildExtraTag: ""
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE BLD_*_QEMU_CORE_NUM=2 TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
BuildArtifactsBinary: |
Expand All @@ -159,7 +165,7 @@ stages:
BuildTarget: "RELEASE"
BuildExtraTag: ""
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE EMPTY_DRIVE=TRUE BLD_*_QEMU_CORE_NUM=2 TEST_REGEX=*TestApp*.efi RUN_TESTS=TRUE"
BuildArtifactsBinary: |
Expand All @@ -174,7 +180,7 @@ stages:
BuildTarget: "RELEASE"
BuildExtraTag: "NO_SMM"
BuildExtraStep:
- script: echo No extra steps provided
- template: Steps/RustSetupSteps.yml@mu_devops
Run: true
RunFlags: "SHUTDOWN_AFTER_RUN=TRUE QEMU_HEADLESS=TRUE BLD_*_QEMU_CORE_NUM=2 BLD_*_SMM_ENABLED=FALSE"
BuildArtifactsBinary: |
Expand Down
10 changes: 10 additions & 0 deletions .azurepipelines/Ubuntu-GCC5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ extends:
do_pr_eval: true
container_build: true
os_type: Linux
rust_build: true
extra_cargo_steps:
- script: pip install -r pip-requirements.txt --upgrade
displayName: Install and Upgrade pip Modules
condition: succeeded()
- task: CmdLine@2
displayName: Repo Setup
inputs:
script: stuart_setup -c .pytool/CISettings.py
condition: succeeded()
build_matrix:
TARGET_QEMU:
Pkgs: 'QemuPkg'
Expand Down
10 changes: 10 additions & 0 deletions .azurepipelines/Windows-VS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,16 @@ extends:
do_non_ci_setup: true
do_pr_eval: true
os_type: Windows_NT
rust_build: true
extra_cargo_steps:
- script: pip install -r pip-requirements.txt --upgrade
displayName: Install and Upgrade pip Modules
condition: succeeded()
- task: CmdLine@2
displayName: Repo Setup
inputs:
script: stuart_setup -c .pytool/CISettings.py
condition: succeeded()
build_matrix:
TARGET_QEMU:
Pkgs: 'QemuPkg'
Expand Down

0 comments on commit b6f3121

Please sign in to comment.