Updated CI script #51
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: ["master", "uefi"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check-fmt: | |
runs-on: windows-latest | |
steps: | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly-2023-12-26 | |
target: x86_64-unknown-uefi | |
components: rustfmt | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Check fmt | |
run: cargo fmt --check | |
build-standalone: | |
runs-on: windows-latest | |
needs: check-fmt | |
steps: | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly-2023-12-26 | |
target: x86_64-unknown-uefi | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
cache-all-crates: true | |
- name: Build Driver | |
run: ./.github/workflows/build-driver.ps1 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: valthrun-driver-standalone | |
path: | | |
target/x86_64-pc-windows-msvc/release/valthrun-driver.sys | |
target/x86_64-pc-windows-msvc/release/driver_standalone.pdb | |
build-uefi: | |
runs-on: windows-latest | |
needs: check-fmt | |
steps: | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly-2023-12-26 | |
target: x86_64-unknown-uefi | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
cache-on-failure: true | |
cache-all-crates: true | |
- name: Build UEFI Driver | |
run: ./.github/workflows/build-driver-uefi.ps1 | |
- uses: actions/upload-artifact@v4 | |
id: uefi-driver-upload | |
with: | |
name: valthrun-driver-uefi | |
path: | | |
target/x86_64-pc-windows-msvc/release/driver_uefi.dll | |
target/x86_64-pc-windows-msvc/release/driver_uefi.pdb | |
- name: Trigger ISO build | |
env: | |
UEFI_MAPPER_GITHUB_TOKEN: ${{ secrets.UEFI_MAPPER_GITHUB_TOKEN }} | |
DRIVER_GITHUB_TOKEN: ${{ secrets.DRIVER_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} | |
DRIVER_ARTIFACT_ID: ${{ steps.uefi-driver-upload.outputs.artifact-id }} | |
GITHUB_SHA: ${{ github.sha }} | |
GITHUB_REF_NAME: ${{ github.ref_name || 'unknown' }} | |
if: ${{ env.UEFI_MAPPER_GITHUB_TOKEN != '' }} | |
run: ./.github/workflows/invoke-mapper.ps1 |