-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathsteps.sh
More file actions
executable file
·73 lines (55 loc) · 1.71 KB
/
Copy pathsteps.sh
File metadata and controls
executable file
·73 lines (55 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/bash
#
# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
#
# SPDX-License-Identifier: BSD-2-Clause
#
# Docker entrypoint for seL4 preprocess test
set -e
# required parameters:
export L4V_ARCH="${INPUT_L4V_ARCH}"
export L4V_FEATURES="${INPUT_L4V_FEATURES}"
# actions:
echo "::group::Setting up"
checkout-manifest.sh
REPOS="$(pwd)"
SEL4_REPO="${REPOS}/seL4"
REMOTE=$(git -C ${SEL4_REPO} remote)
if [ "$(echo "${REMOTE}" | wc -l)" -ne 1 ]; then
echo "::error::Expected exactly one remote, got: ${REMOTE}"
exit 1
fi
if [ -n "${INPUT_BASE_REF}" ]
then
# Use the tip of the specified base branch instead of the manifest hash
git -C ${SEL4_REPO} fetch -q --depth 1 "${REMOTE}" "${INPUT_BASE_REF}"
git -C ${SEL4_REPO} checkout -q FETCH_HEAD
fi
BASE_REV=$(git -C ${SEL4_REPO} rev-parse HEAD)
cd "${SEL4_REPO}"
export BRANCH_NAME="github-ci-work/pr-branch"
fetch-branch.sh
# Use sha from here
TEST_REF=$(git rev-parse HEAD)
# restore previous state
git checkout -q ${BASE_REV}
cd - > /dev/null
repo-util hashes
# provide precompiled c-parser
cp -r /c-parser "${REPOS}/l4v/tools/"
echo "::endgroup::"
# one test for the default L4V_ARCH/L4V_FEATURES combination
test_munge.sh -ac -p "${REPOS}" $BASE_REV $TEST_REF
# then all platform combinations if any exist
# find all L4V_PLAT for the provided L4V_ARCH/L4V_FEATURES combination in
# seL4/configs/ and store them in the array CONFIGS
FEAT="${L4V_FEATURES:+${L4V_FEATURES}_}"
shopt -s nullglob
cd "${SEL4_REPO}/configs/"
CONFIGS=$(echo ${L4V_ARCH}_${FEAT}[a-z0-9]*_verified.cmake)
cd - > /dev/null
for CONFIG in ${CONFIGS}; do
L4V_PLAT=${CONFIG##${L4V_ARCH}_${FEAT}}
export L4V_PLAT=${L4V_PLAT%_verified.cmake}
test_munge.sh -ac -p "${REPOS}" $BASE_REV $TEST_REF
done