microsoft/mu_feature_ffa

Public

mirrored from https://github.com/microsoft/mu_feature_ffaAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
fix_upload_2

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

.github/workflows/release-secure-partitions.yml

59lines · modecode

1# This workflow automatically publishes the rust secure partition binaries for a
2# given release.
3#
4# Copyright (c) Microsoft Corporation.
5# SPDX-License-Identifier: BSD-2-Clause-Patent
6#
7
8name: Rust Secure Partition Build
9
10on:
11 release:
12 types:
13 - published
14 pull_request:
15 branches:
16 - main
17 paths:
18 - ".github/workflows/release-secure-partitions.yml"
19 - "FfaFeaturePkg/**"
20
21env:
22 OUTOUTPUT_DIR: rust-secure-partitions
23 BUILD_TARGET: aarch64-unknown-none
24
25jobs:
26 build:
27 name: Build Rust Secure Partition
28 runs-on: ubuntu-latest
29
30 steps:
31 - name: Checkout Code
32 uses: actions/checkout@v5
33
34 - name: Install Rust Components
35 run: |
36 cargo install cargo-binutils
37 rustup target add ${{ env.BUILD_TARGET }}
38 rustup component add llvm-tools
39
40 - name: Build Secure Partitions
41 run: |
42 mkdir -p ${{ env.OUTOUTPUT_DIR }}
43 cargo build --target=${{ env.BUILD_TARGET }}
44 cargo objcopy --target=${{ env.BUILD_TARGET }} -- -O binary ${{ env.OUTOUTPUT_DIR }}/msft-sp.bin
45 cp target/${{ env.BUILD_TARGET }}/debug/msft-sp ${{ env.OUTOUTPUT_DIR }}/msft-sp.elf
46 cp Cargo.lock ${{ env.OUTOUTPUT_DIR }}/Cargo.lock
47
48 - name: Package Files
49 run: |
50 zip -r ${{ runner.temp }}/rust-secure-partitions-${{ github.event.release.tag_name }}.zip rust-secure-partitions/* ;
51 tar -czf ${{ runner.temp }}/rust-secure-partitions-${{ github.event.release.tag_name }}.tar.gz rust-secure-partitions/*
52
53 - name: Upload Release Asset
54 if: github.event_name == 'release'
55 env:
56 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57 run: |
58 gh release upload ${{ github.event.release.tag_name }} ${{ runner.temp }}/rust-secure-partitions-*.zip
59 gh release upload ${{ github.event.release.tag_name }} ${{ runner.temp }}/rust-secure-partitions-*.tar.gz