Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RIOT
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cm-projects
RIOT
Commits
5710fd89
Unverified
Commit
5710fd89
authored
6 years ago
by
Kaspar Schleiser
Committed by
GitHub
6 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #9398 from miri64/murdock/enh/llvm
murdock: also compile with LLVM/clang
parents
100f10d3
9160b9cc
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.murdock
+36
-16
36 additions, 16 deletions
.murdock
makefiles/murdock.inc.mk
+1
-1
1 addition, 1 deletion
makefiles/murdock.inc.mk
with
37 additions
and
17 deletions
.murdock
+
36
−
16
View file @
5710fd89
#!/bin/sh
export
TEST_BOARDS_AVAILABLE
=
${
TEST_BOARDS_AVAILABLE
:-
"samr21-xpro"
}
:
${
TEST_BOARDS_AVAILABLE
:
=
"samr21-xpro"
}
:
${
TEST_BOARDS_LLVM_COMPILE
:
=
"native"
}
export
RIOT_CI_BUILD
=
1
export
STATIC_TESTS
=
${
STATIC_TESTS
:-
1
}
export
CFLAGS_DBG
=
""
...
...
@@ -92,21 +94,36 @@ get_supported_boards() {
done
|
$(
_greplist
$BOARDS
)
}
# given an app dir as parameter, print "$appdir board" for each supported
# board. Only print for boards in $BOARDS.
get_app_board_pairs
()
{
get_supported_toolchains
()
{
local
appdir
=
$1
local
board
=
$2
local
toolchains
=
"gnu"
if
is_in_list
"
${
board
}
"
"
${
TEST_BOARDS_LLVM_COMPILE
}
"
;
then
toolchains
=
"
$(
make
-s
--no-print-directory
-C
${
appdir
}
BOARD
=
${
board
}
\
info-toolchains-supported 2> /dev/null |
grep
-o
-e
"llvm"
-e
"gnu"
)
"
fi
echo
"
${
toolchains
}
"
}
# given an app dir as parameter, print "$appdir $board:$toolchain" for each
# supported board and toolchain. Only print for boards in $BOARDS.
get_app_board_toolchain_pairs
()
{
local
appdir
=
$1
for
board
in
$(
get_supported_boards
$appdir
)
do
echo
$appdir
$board
for
toolchain
in
$(
get_supported_toolchains
$appdir
$board
)
do
echo
$appdir
$board
:
$toolchain
done
done
|
$(
_greplist
$BOARDS
)
}
# use dwqc to create full "appdir board" compile job list
# use dwqc to create full "appdir board
toolchain
" compile job list
get_compile_jobs
()
{
get_apps |
\
dwqc
${
DWQ_ENV
}
-s
\
"
$0
get_app_board_pairs
\$
{1}"
\
"
$0
get_app_board_
toolchain_
pairs
\$
{1}"
\
| xargs
'-d\n'
-n
1
echo
$0
compile
}
...
...
@@ -115,10 +132,11 @@ print_worker() {
echo
"-- running on worker
${
DWQ_WORKER
}
thread
${
DWQ_WORKER_THREAD
}
, build number
$DWQ_WORKER_BUILDNUM
."
}
# compile one app for one board. delete intermediates.
# compile one app for one board
with one toolchain
. delete intermediates.
compile
()
{
local
appdir
=
$1
local
board
=
$2
local
board
=
$(
echo
$2
|
cut
-f
1
-d
':'
)
local
toolchain
=
$(
echo
$2
|
cut
-f
2
-d
':'
)
[
"
$board
"
=
"makefile_broken"
]
&&
error
"
$0
: Makefile in
\"
$appdir
\"
seems to be broken!"
...
...
@@ -132,12 +150,12 @@ compile() {
print_worker
# sanity checks
[
$#
-ne
2
]
&&
error
"
$0
: compile: invalid parameters (expected
\$
appdir
\$
board)"
[
$#
-ne
2
]
&&
error
"
$0
: compile: invalid parameters (expected
\$
appdir
\$
board
:
\$
toolchain
)"
[
!
-d
"
$appdir
"
]
&&
error
"
$0
: compile: error: application directory
\"
$appdir
\"
doesn't exist"
[
!
-d
"boards/
$board
"
]
&&
error
"
$0
: compile: error: board directory
\"
boards/
$board
\"
doesn't exist"
# compile
CCACHE_BASEDIR
=
"
$(
pwd
)
"
BOARD
=
$board
RIOT_CI_BUILD
=
1
\
CCACHE_BASEDIR
=
"
$(
pwd
)
"
BOARD
=
$board
TOOLCHAIN
=
$toolchain
RIOT_CI_BUILD
=
1
\
make
-C
${
appdir
}
clean all
-j
${
JOBS
:-
4
}
RES
=
$?
...
...
@@ -169,7 +187,8 @@ compile() {
test_job
()
{
local
appdir
=
$1
local
board
=
$2
local
board
=
$(
echo
$2
|
cut
-f
1
-d
':'
)
local
toolchain
=
$(
echo
$2
|
cut
-f
2
-d
':'
)
local
flashfile
=
"
$3
"
[
!
-f
"
$flashfile
"
]
&&
{
...
...
@@ -183,16 +202,17 @@ test_job() {
--file
$flashfile
:
$appdir
/bin/
${
board
}
/
$(
basename
$flashfile
)
\
--queue
${
TEST_QUEUE
:-
$board
}
\
--maxfail
1
\
"./.murdock run_test
$appdir
$board
"
"./.murdock run_test
$appdir
$board
:
$toolchain
"
}
run_test
()
{
local
appdir
=
$1
local
board
=
$2
local
board
=
$(
echo
$2
|
cut
-f
1
-d
':'
)
local
toolchain
=
$(
echo
$2
|
cut
-f
2
-d
':'
)
print_worker
echo
"-- executing tests for
$appdir
on
$board
:"
echo
"-- executing tests for
$appdir
on
$board
(compiled with
$toolchain
toolchain)
:"
hook run_test_pre
BOARD
=
$board
make
-C
$appdir
flash-only
test
BOARD
=
$board
TOOLCHAIN
=
${
toolchain
}
make
-C
$appdir
flash-only
test
}
# execute static tests
...
...
This diff is collapsed.
Click to expand it.
makefiles/murdock.inc.mk
+
1
−
1
View file @
5710fd89
...
...
@@ -16,7 +16,7 @@ test-murdock:
cd
$(
RIOTBASE
)
&&
\
./.murdock test_job
\
$$(
realpath
--relative-to
$(
RIOTBASE
)
$(
APPDIR
))
\
$(
BOARD
)
\
"
$(
BOARD
)
:
$(
TOOLCHAIN
)
"
\
$(
FLASHFILE
)
# don't whitelist tests if there's no binary
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment