-
Notifications
You must be signed in to change notification settings - Fork 4
/
.ci.yml
106 lines (99 loc) · 4.55 KB
/
.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
image: debian:bookworm
stages:
- build
- local-tests
.common:
only:
refs:
- master
- merge_requests
.build:
extends: .common
stage: build
variables:
ENABLE_TRANSFORMERS: "--enable-transformers"
before_script:
- apt update
- apt -qqy install --no-install-recommends gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 python3-subunit zstd liblz4-tool file locales libacl1 pipx curl openssh-client sudo gfortran &>/dev/null
- git config --global url."$CI_URL".insteadOf https://github.com/antmicro/
- curl https://storage.googleapis.com/git-repo-downloads/repo > /usr/bin/repo && chmod a+rx /usr/bin/repo
- PIPX_BIN_DIR=/usr/bin/ pipx install git+https://github.com/antmicro/tuttest@63160-snippet-transform
- sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && locale-gen
- export LANG=en_US.UTF-8
- ln -sf /usr/share/zoneinfo/UTC0 /usr/share/zoneinfo/UTC
- useradd -m builder
build-rdfm:
extends: .build
script:
- |-
if [ $CI_COMMIT_REF_NAME == "master" ]; then
ENABLE_TRANSFORMERS=""
fi
- cd system-releases/rdfm-unmatched-demo
- tuttest README.md fetch-sources $ENABLE_TRANSFORMERS | bash -
- chown -R builder:root .
- cd rdfm-unmatched-demo
- tuttest ../README.md setup-yocto,target-renode,build-image | sudo -u builder XZ_MEMLIMIT=25% XZ_DEFAULTS=--memlimit-compress=25% BB_ENV_PASSTHROUGH_ADDITIONS="XZ_MEMLIMIT XZ_DEFAULTS" bash -eo pipefail -
- cd ..
- tuttest README.md copy-artifacts | bash -eo pipefail -
artifacts:
expire_in: 4 hours
paths:
- system-releases/rdfm-unmatched-demo/renode/rdfm-image-minimal-unmatched.rdfm
- system-releases/rdfm-unmatched-demo/renode/rdfm-image-upgraded-unmatched.rdfm
- system-releases/rdfm-unmatched-demo/renode/u-boot-spl.bin
- system-releases/rdfm-unmatched-demo/renode/u-boot.itb
- system-releases/rdfm-unmatched-demo/renode/sdcard.sdimg
build-jetson-orin:
extends: .build
script:
- |-
if [ $CI_COMMIT_REF_NAME == "master" ]; then
ENABLE_TRANSFORMERS=""
fi
- cd system-releases/nvidia-jetson-orin-baseboard-demo
- tuttest README.md fetch-repo $ENABLE_TRANSFORMERS | bash -
- chown -R builder:root .
- cd orin-baseboard-demo
- tuttest ../README.md build-bsp | sudo -u builder XZ_MEMLIMIT=25% XZ_DEFAULTS=--memlimit-compress=25% BB_ENV_PASSTHROUGH_ADDITIONS="XZ_MEMLIMIT XZ_DEFAULTS" bash -eo pipefail -
artifacts:
paths:
- system-releases/nvidia-jetson-orin-baseboard-demo/orin-baseboard-demo/build/tmp/deploy/images/p3509-a02-p3767-0000
build-rdfm-artifact:
extends: .common
stage: build
before_script:
- apt update
- apt -qqy install --no-install-recommends golang gcc make ca-certificates pkg-config git libc-dev liblzma-dev libssl-dev
script:
- git clone https://github.com/antmicro/rdfm.git
- make -C rdfm/tools/rdfm-artifact install GOBIN=$(pwd)
artifacts:
expire_in: 1 day
paths:
- rdfm-artifact
test-rdfm-unmatched-demo:
extends: .common
stage: local-tests
dependencies: [ 'build-rdfm', 'build-rdfm-artifact' ]
before_script:
- apt update
- apt install -qqy iproute2 python3-venv python-is-python3 git wget sudo dirmngr ca-certificates gnupg &>/dev/null
- gpg --homedir /tmp --no-default-keyring --keyring /usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
- echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/debian stable-buster main" > /etc/apt/sources.list.d/mono-official-stable.list
- wget --progress=dot:mega 'https://builds.renode.io/renode_1.15.0+20240319git9111b18ef_amd64.deb' -O renode.deb
- apt update && apt -qqy install mono-complete ./renode.deb
- python -m venv demo && source demo/bin/activate
- pip install 'pyrenode3[all] @ git+https://github.com/antmicro/pyrenode3.git' 'tuttest @ git+https://github.com/antmicro/tuttest.git'
script:
- export PATH="${PATH}:$(pwd)"
- source demo/bin/activate
- cd system-releases/rdfm-unmatched-demo/renode
- tuttest ../README.md create-delta,setup-tap,setup-host | bash -eo pipefail -
- (tuttest ../README.md start-server | bash -eo pipefail -) &
- (tail -F uart0.log 2>/dev/null) &
- python unmatched.py
artifacts:
when: always
paths:
- system-releases/rdfm-unmatched-demo/renode/uart0.log