forked from hermit-os/hermit-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
70 lines (62 loc) · 1.93 KB
/
.gitlab-ci.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
variables:
IMAGE: ubuntu:with-rust
GIT_SUBMODULE_STRATEGY: normal
stages:
- prepare
- build
- test
# Stage: prepare
##############################################################################
docker:
stage: prepare
script:
- docker build --no-cache -t ${IMAGE} .
tags:
- shell
- linux
# Stage build
##############################################################################
build:
stage: build
script:
- cargo build -Z build-std=std,core,alloc,panic_abort --target x86_64-unknown-hermit
- RUSTFLAGS="-Clinker-plugin-lto" cargo build -Z build-std=std,core,alloc,panic_abort --target x86_64-unknown-hermit --release
image: ${IMAGE}
cache:
paths:
- target/x86_64-unknown-hermit/debug/rusty_demo
- target/x86_64-unknown-hermit/release/rusty_demo
key: build
artifacts:
paths:
- target/x86_64-unknown-hermit/debug/rusty_demo
- target/x86_64-unknown-hermit/release/rusty_demo
tags:
- docker
# Stage: test
##############################################################################
#test:tarpaulin:
# stage: test
# script:
# - rm -rf tests loader
# - cargo tarpaulin -v --exclude-files src/arch/aarch64
# image: ${IMAGE}
# tags:
# - docker
#test:cargo:
# stage: test
# script:
# - cargo test --target x86_64-unknown-linux-gnu
# image: ${IMAGE}
# tags:
# - docker
test:qemu:
stage: test
script:
- cd loader
- make
- qemu-system-x86_64 -display none -smp 1 -m 64M -serial stdio -kernel target/x86_64-unknown-hermit-loader/debug/rusty-loader -initrd ../target/x86_64-unknown-hermit/debug/rusty_demo -cpu qemu64,apic,fsgsbase,rdtscp,xsave,fxsr,rdrand
- qemu-system-x86_64 -display none -smp 1 -m 64M -serial stdio -kernel target/x86_64-unknown-hermit-loader/debug/rusty-loader -initrd ../target/x86_64-unknown-hermit/release/rusty_demo -cpu qemu64,apic,fsgsbase,rdtscp,xsave,fxsr,rdrand
image: ${IMAGE}
tags:
- docker