Generate git version and include that in source output #111
Workflow file for this run
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: build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Install Deps | |
run: | | |
set -x | |
rel=$(lsb_release -sc) | |
if [ "$rel" = "focal" ]; then | |
# swtpm is not present in ubuntu in focal. | |
sudo add-apt-repository -y ppa:puzzleos/dev | |
fi | |
sudo apt-get update --quiet | |
sudo apt-get install --quiet --assume-yes --no-install-recommends gnu-efi build-essential | |
sudo apt-get install --quiet --assume-yes --no-install-recommends \ | |
coreutils dosfstools git mtools ovmf python3-minimal python3-prettytable \ | |
qemu-system-x86 qemu-utils shim-signed swtpm | |
- name: Collect Inputs | |
run: | | |
mkdir ./test-inputs/ | |
./test/collect-firmwares --no-install ./test-inputs | |
./test/get-krd ./test-inputs | |
- name: Build | |
run: | | |
make show-version | |
ls -al git-version | |
cat git-version | |
make build | |
- name: Upload Build | |
uses: actions/upload-artifact@v3 | |
with: | |
if-no-files-found: error | |
name: stubby | |
path: | | |
stubby.efi | |
sbat.csv | |
- name: Unit Test | |
run: | | |
make test | |
- name: Boot Test | |
run: | | |
fails="" | |
for m in nvram efi-shell; do | |
echo "== $m ==" | |
KVM=false ./test/harness run "--boot-mode=$m" \ | |
--inputs=./test-inputs "--results=./test-results/$m" \ | |
--sbat=sbat.csv --stubby=stubby.efi \ | |
--num-threads=2 \ | |
--timeout=480 \ | |
test/tests.yaml || fails="$fails $m" | |
done | |
tar -cf test-data.tar stubby.efi sbat.csv test-inputs/ test-results/ | |
[ -z "$fails" ] || { echo "FAIL: ${fails# }"; exit 1; } | |
exit 0 | |
- name: Upload Test Results | |
if: '!cancelled()' | |
uses: actions/upload-artifact@v3 | |
with: | |
if-no-files-found: error | |
name: test-data | |
path: test-data.tar |