Skip to content

Initial commit of code, merge to main #4

Initial commit of code, merge to main

Initial commit of code, merge to main #4

---
name: Build Testcases
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build_test_artifacts:
name: Build Testcases
runs-on: ubuntu-22.04
container:
image: ghcr.io/tianocore/containers/ubuntu-22-build
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Install Dependencies
run: |
sudo apt-get -y update && \
sudo apt-get -y install \
clang libclang-dev llvm
- name: Retrieve and build EDK2
run: |
git clone https://github.com/tianocore/edk2.git --recursive && \
pushd edk2 && make -C BaseTools && \
source edksetup.sh && popd && \
export -p > envsave
- name: Setting up HBFA-FL and Build Environment
run: |
source envsave && \
export WORKSPACE=$(pwd)/ && \
export PACKAGES_PATH=$WORKSPACE/edk2:$WORKSPACE/HBFA/ && \
python3 HBFA/UefiHostTestTools/HBFAEnvSetup.py && \
export -p > envsave
- name: Install AFL-2.52b
run: |
source envsave && \
wget -q http://lcamtuf.coredump.cx/afl/releases/afl-latest.tgz && \
tar xf afl-latest.tgz && rm afl-latest.tgz && \
export AFL_PATH=$WORKSPACE/afl-2.52b && \
export PATH=$PATH:$AFL_PATH && \
export -p > envsave && \
cd afl-2.52b && make && cd ..
- name: Build Fuzzing Harnesses
run: |
source envsave && \
cp HBFA/UefiHostFuzzTestPkg/Conf/build_rule.txt edk2/Conf/build_rule.txt && \
cp HBFA/UefiHostFuzzTestPkg/Conf/tools_def.txt edk2/Conf/tools_def.txt && \
build -p HBFA/UefiHostFuzzTestCasePkg/UefiHostFuzzTestCasePkg.dsc -a X64 -t AFL && \
build -p HBFA/UefiHostFuzzTestCasePkg/UefiHostFuzzTestCasePkg.dsc -a X64 -t LIBFUZZER