forked from cloudius-systems/osv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
72 lines (72 loc) · 3.62 KB
/
.travis.yml
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
sudo: required
dist: bionic
language: c
python: 3.6
services:
- docker
branches:
only:
- master
- ipv6
addons:
apt:
packages:
- bridge-utils
- libpulse0
- libvirt-bin
- qemu-kvm
- virtinst
- ubuntu-vm-builder
- python3-pip
before_install:
# Set up KVM
- sudo adduser $USER libvirt
- sudo adduser $USER kvm
- echo "$DOCKER_ACCESS_TOKEN" | docker login --username osvunikernel --password-stdin
- pushd docker && docker build -t osv/builder -f ./Dockerfile.builder --build-arg DIST="ubuntu-20.10" . && popd
- docker run -it --privileged -d --name build osv/builder
stages:
- build_and_publish
env:
global:
- CIRP_GITHUB_REPO_SLUG="osvunikernel/osv-nightly-releases"
jobs:
include:
- stage: build_and_publish
script:
- docker exec build ./scripts/build clean
- docker exec build ./scripts/build -j$(nproc) image=tests
- docker exec build lscpu
- docker exec build ./scripts/test.py -d tracing_smoke_test -d tst-time.so
- docker exec build ./scripts/build-capstan-mpm-packages kernel
- docker exec build ./scripts/build-capstan-mpm-packages unit_tests
- docker exec build ./scripts/build-capstan-mpm-packages monitoring
- docker exec build ./scripts/osv-version.sh > /tmp/osv-version
- export ARTIFACTS_DIR="$(mktemp -d)"
- cp /tmp/osv-version "$ARTIFACTS_DIR"
- docker cp build:/root/.capstan/repository/osv-loader/osv-loader.qemu.x86_64 "$ARTIFACTS_DIR"/osv-loader-with-zfs.qemu.x86_64
- gzip "$ARTIFACTS_DIR"/osv-loader-with-zfs.qemu.x86_64
- docker cp build:/git-repos/osv/build/release/loader-stripped.elf "$ARTIFACTS_DIR"/loader-with-zfs.elf.x86_64
- gzip "$ARTIFACTS_DIR"/loader-with-zfs.elf.x86_64
- docker cp build:/root/.capstan/repository/osv-loader/index.yaml "$ARTIFACTS_DIR"
- docker cp build:/root/.capstan/packages/osv.zfs.mpm.x86_64 "$ARTIFACTS_DIR"
- docker cp build:/root/.capstan/packages/osv.zfs.yaml "$ARTIFACTS_DIR"
- docker cp build:/root/.capstan/packages/osv.bootstrap.mpm.x86_64 "$ARTIFACTS_DIR"
- docker cp build:/root/.capstan/packages/osv.bootstrap.yaml "$ARTIFACTS_DIR"
- docker cp build:/root/.capstan/packages/osv.common-tests.mpm.x86_64 "$ARTIFACTS_DIR"
- docker cp build:/root/.capstan/packages/osv.common-tests.yaml "$ARTIFACTS_DIR"
- docker cp build:/root/.capstan/packages/osv.zfs-tests.mpm.x86_64 "$ARTIFACTS_DIR"
- docker cp build:/root/.capstan/packages/osv.zfs-tests.yaml "$ARTIFACTS_DIR"
- docker cp build:/root/.capstan/packages/osv.rofs-tests.mpm.x86_64 "$ARTIFACTS_DIR"
- docker cp build:/root/.capstan/packages/osv.rofs-tests.yaml "$ARTIFACTS_DIR"
- docker cp build:/root/.capstan/packages/osv.httpserver-monitoring-api.mpm.x86_64 "$ARTIFACTS_DIR"
- docker cp build:/root/.capstan/packages/osv.httpserver-monitoring-api.yaml "$ARTIFACTS_DIR"
- docker exec build rm -rf ./build/release.x64
- docker exec build ./scripts/build-capstan-mpm-packages kernel conf_hide_symbols=1 fs=rofs loader_image=osv-loader-hidden
- docker cp build:/root/.capstan/repository/osv-loader-hidden/osv-loader-hidden.qemu.x86_64 "$ARTIFACTS_DIR"/osv-loader-hidden.qemu.x86_64
- gzip "$ARTIFACTS_DIR"/osv-loader-hidden.qemu.x86_64
- docker cp build:/git-repos/osv/build/release/loader-stripped.elf "$ARTIFACTS_DIR"/loader-hidden.elf.x86_64
- gzip "$ARTIFACTS_DIR"/loader-hidden.elf.x86_64
- ./.travis/cirp/cleanup4.sh
- ./.travis/cirp/publish.sh "$ARTIFACTS_DIR" $(cat /tmp/osv-version)
- ./.travis/cirp/cleanup5.sh