Skip to content

Commit

Permalink
um: add uml test for circleci
Browse files Browse the repository at this point in the history
Signed-off-by: Hajime Tazaki <thehajime@gmail.com>
  • Loading branch information
thehajime committed Sep 3, 2019
1 parent 1ed7783 commit 18b8105
Showing 1 changed file with 54 additions and 0 deletions.
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

0 comments on commit 18b8105

Please sign in to comment.