Skip to content

Fix CI install tpm-ref tools fail #231

Fix CI install tpm-ref tools fail

Fix CI install tpm-ref tools fail #231

Workflow file for this run

on:
push:
paths-ignore:
- "**.md"
pull_request:
paths-ignore:
- "**.md"
workflow_dispatch:
name: Library Crates Unit Test
env:
AS: nasm
AR: llvm-ar
CC: clang
NIGHTLY_RUST_TOOLCHAIN: nightly-2023-12-31
TOOLCHAIN_PROFILE: minimal
jobs:
lib-test:
name: Build Library Crates
runs-on: ubuntu-20.04
timeout-minutes: 30
steps:
- name: Checkout sources
uses: actions/checkout@1d96c772d19495a3b5c517cd2bc0cb401ea0529f # v4.1.3
- name: Initialize and update submodules
run: |
git config --global http.postBuffer 524288000
git config --global http.sslVerify "false"
git submodule update --init --recursive --depth 1
# Install first since it's needed to build NASM
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@1a3da29f56261a1e1f937ec88f0856a9b8321d7e # v1
with:
version: "10.0"
directory: ${{ runner.temp }}/llvm
- name: install NASM
uses: ilammy/setup-nasm@13cbeb366c45c4379d3478cdcbadd8295feb5028 # v1.5.1
- name: Install nightly toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.NIGHTLY_RUST_TOOLCHAIN }}
override: true
- name: Preparation Work
run: bash sh_script/pre-build.sh
- name: Unit Test for src/protocol
run: |
pushd src/protocol
cargo test
popd
- name: Unit Test for src/global
run: |
pushd src/global
cargo test
popd
- name: Unit Test for src/spdm
run: |
pushd src/spdm
cargo test
popd