Skip to content

Commit

Permalink
Further fixes in CI and testing script
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan-Velickovic committed Sep 23, 2023
1 parent ff512e3 commit 17893b3
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 14 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- name: Extract seL4CP SDK
run: unzip sel4cp-sdk.zip && tar -xf sel4cp-sdk-1.2.6.tar.gz
- name: Install VMM dependencies (via apt)
# 'expect' is only a dependency for CI testing
run: sudo apt update && sudo apt install -y make clang lld qemu-system-arm device-tree-compiler expect
- name: Build and run VMM examples
run: ./ci/examples.sh ${PWD}/sel4cp-sdk-1.2.6
Expand All @@ -58,9 +59,10 @@ jobs:
- name: Extract seL4CP SDK
run: unzip sel4cp-sdk.zip && tar -xf sel4cp-sdk-1.2.6.tar.gz
- name: Install VMM dependencies (via Homebrew)
# 'expect' is only a dependency for CI testing
run: |
brew tap messense/macos-cross-toolchains
brew install aarch64-unknown-linux-gnu qemu dtc make expect
brew install llvm qemu dtc make expect
echo "/usr/local/opt/llvm/bin:$PATH" >> $GITHUB_PATH
- name: Build and run VMM examples
run: ./ci/examples.sh ${PWD}/sel4cp-sdk-1.2.6
shell: bash
Expand Down
30 changes: 18 additions & 12 deletions ci/examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,30 @@ SDK_PATH=$1
[[ -z $SDK_PATH ]] && echo "usage: examples.sh [PATH TO SDK]" && exit 1
[[ ! -d $SDK_PATH ]] && echo "The path to SDK provided does not exist: '$SDK_PATH'" && exit 1

build_simple() {
build_simple_make() {
BOARD=$1
CONFIG=$2
BUILD_DIR="build_simple_${CONFIG}_${BOARD}"
make -C examples/simple -B BUILD_DIR=${BUILD_DIR} CONFIG=${CONFIG} BOARD=${BOARD} SEL4CP_SDK=${SDK_PATH}
BUILD_DIR="${PWD}/build/simple/make/${BOARD}/${CONFIG}"
mkdir -p ${BUILD_DIR}
make -C examples/simple -B \
BUILD_DIR=${BUILD_DIR} \
CONFIG=${CONFIG} \
BOARD=${BOARD} \
SEL4CP_SDK=${SDK_PATH} \
-j$(nproc)
}

simulate_simple() {
simulate_simple_make() {
BOARD=$1
CONFIG=$2
BUILD_DIR="build_simple_${CONFIG}_${BOARD}"
./ci/buildroot_login.exp examples/simple/${BUILD_DIR}/loader.img
BUILD_DIR="${PWD}/build/simple/make/${BOARD}/${CONFIG}"
./ci/buildroot_login.exp ${BUILD_DIR}/loader.img
}

build_simple "qemu_arm_virt_hyp" "debug"
simulate_simple "qemu_arm_virt_hyp" "debug"
build_simple "qemu_arm_virt_hyp" "release"
simulate_simple "qemu_arm_virt_hyp" "release"
build_simple_make "qemu_arm_virt_hyp" "debug"
simulate_simple_make "qemu_arm_virt_hyp" "debug"
build_simple_make "qemu_arm_virt_hyp" "release"
simulate_simple_make "qemu_arm_virt_hyp" "release"

build_simple "odroidc4_hyp" "debug"
build_simple "odroidc4_hyp" "release"
build_simple_make "odroidc4_hyp" "debug"
build_simple_make "odroidc4_hyp" "release"
3 changes: 3 additions & 0 deletions examples/simple/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,14 @@ endif
# FIXME: We should also consider whether -mgeneral-regs-only should be
# used to avoid the use of the FPU and therefore seL4 does not have to
# context switch the FPU.
# Note we only need -Wno-unused-command-line-argument because in Nix
# passes an extra `--gcc-toolchain` flag which we do not need.
CFLAGS := -mstrict-align \
-g3 \
-O3 \
-ffreestanding \
-nostdlib \
-Wno-unused-command-line-argument \
-Wall -Wno-unused-function -Werror \
-I$(VMM_SRC_DIR)/arch/aarch64 -I$(VMM_SRC_DIR) -I$(VMM_SRC_DIR)/util -I$(BOARD_DIR)/include \
-DBOARD_$(BOARD) \
Expand Down

0 comments on commit 17893b3

Please sign in to comment.