-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
heckler: introduce CI and fix build errors
- Loading branch information
Showing
6 changed files
with
99 additions
and
21 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
name: build-heckler-userspace | ||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: run ci | ||
run: | | ||
sudo apt install -y python3 python3-pip python3-venv nasm | ||
./misc/ci.sh | ||
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
#!/bin/bash | ||
set -euo pipefail | ||
|
||
script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )" | ||
root_dir=$script_dir/../ | ||
|
||
# | ||
# simple ci for some basic tests | ||
# | ||
|
||
function check_pgm() { | ||
local pgm=$1 | ||
|
||
if ! command -v $pgm &> /dev/null | ||
then | ||
echo "$pgm could not be found" | ||
exit 1 | ||
fi | ||
} | ||
|
||
|
||
function ssh() { | ||
cd $root_dir/userspace/ssh | ||
|
||
# | ||
# github runner fails | ||
# /usr/bin/mkdir: cannot create directory ‘/var/empty’: Permission denied | ||
# ignore | ||
make || true | ||
} | ||
|
||
function sudo() { | ||
cd $root_dir/userspace/sudo | ||
make | ||
|
||
} | ||
|
||
function kernel() { | ||
set -x | ||
source $root_dir/stable-commits | ||
|
||
mkdir -p $root_dir/linux/host | ||
git clone --depth 1 -b $KERNEL_HOST_BRANCH $KERNEL_GIT_URL $root_dir/linux/host || true | ||
cd $root_dir/linux/host | ||
make headers | ||
} | ||
|
||
function attack() { | ||
set -x | ||
cd $root_dir/userspace/sev-step | ||
make | ||
|
||
cd $root_dir/userspace/heckler_bindings | ||
make | ||
|
||
cd $root_dir/userspace/attack | ||
make | ||
|
||
make test | ||
} | ||
|
||
check_pgm python | ||
check_pgm make | ||
check_pgm gcc | ||
|
||
|
||
ssh | ||
sudo | ||
kernel | ||
attack | ||
|
||
|
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
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