Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

um: add uml test for circleci #3

Merged
merged 1 commit into from
Sep 19, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,51 @@ do_steps: &do_steps
- store_artifacts:
path: ~/junit


do_uml_steps: &do_uml_steps
steps:
- run: echo "$CROSS_COMPILE" > ~/_cross_compile
- restore_cache:
key: code-tree-shallow-{{ .Environment.CACHE_VERSION }}
- run:
name: checkout build tree
command: |
mkdir -p ~/.ssh/
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
if ! [ -d .git ]; then
git clone --depth=1 $CIRCLE_REPOSITORY_URL .;
fi
if [[ $CIRCLE_BRANCH == pull/* ]]; then
git fetch --depth=1 origin $CIRCLE_BRANCH/head;
else
git fetch --depth=1 origin $CIRCLE_BRANCH;
fi
git reset --hard $CIRCLE_SHA1
- save_cache:
key: code-tree-shallow-{{ .Environment.CACHE_VERSION }}-{{ epoch }}
paths:
- /home/ubuntu/project/.git
- run: mkdir -p /home/ubuntu/.ccache
- restore_cache:
key: compiler-cache-{{ checksum "~/_cross_compile" }}-{{ .Environment.CACHE_VERSION }}
- run:
name: build
command: |
make defconfig ARCH=um
make ARCH=um
- save_cache:
paths:
- /home/ubuntu/.ccache
key: compiler-cache-{{ checksum "~/_cross_compile" }}-{{ .Environment.CACHE_VERSION }}-{{ epoch }}
- run:
name: test
command: |
./linux rootfstype=hostfs ro mem=1g loglevel=10 init="/bin/bash -c exit" || export RETVAL=$?
# SIGABRT=6 => 128+6
if [ $RETVAL != "134" ]; then
exit 1
fi

## Customize the test machine
jobs:
x86_64:
Expand Down Expand Up @@ -147,6 +192,14 @@ jobs:
VALGRIND: 1
<<: *do_steps

x86_64_uml:
docker:
- image: lkldocker/circleci-x86_64:0.7
environment:
CROSS_COMPILE: ""
TMPDIR: "/tmp" # required for not using /dev/shm
<<: *do_uml_steps

checkpatch:
docker:
- image: lkldocker/circleci:0.5
Expand All @@ -173,6 +226,7 @@ workflows:
- freebsd11_x86_64
- checkpatch
- i386
- x86_64_uml
nightly:
triggers:
- schedule:
Expand Down