-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy path.ci.yml
108 lines (97 loc) · 3.17 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
107
108
image: "d2s://external/docker/debian:bookworm"
variables:
COMMON_DEPS: git autoconf automake coreutils g++ gcc libgtk2.0-0 libtool policykit-1 python3 python3 python3-pip python3-venv screen uml-utilities wget
.install-dependencies: &install_dependencies |-
apt-get -qqy update &> /dev/null
apt-get -qqy install ${COMMON_DEPS} ${JOB_DEPS}
.install-dotnet: &install_dotnet |-
wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
apt-get -qqy update &> /dev/null
apt-get -qqy install -y dotnet-sdk-8.0 dotnet-runtime-6.0 &> /dev/null
dotnet --list-sdks && dotnet --list-runtimes
.init-python: &init_python |-
python3 -m venv .venv && source .venv/bin/activate
pip install .
pip install -r examples/requirements.txt
.run-tests: &run_tests |
for i in examples/*.py; do echo "Running test $i..."; timeout 240 python3 $i; done
test-mono-pkg:
stage: build
tags: ['ace-x86_64']
variables:
JOB_DEPS: gtk-sharp2 mono-complete
script:
- *install_dependencies
- *init_python
# Download Renode pkg
- wget --progress=dot:giga https://builds.renode.io/renode-latest.pkg.tar.xz
- export PYRENODE_RUNTIME=mono
- export PYRENODE_PKG=$PWD/renode-latest.pkg.tar.xz
- *run_tests
test-installed-pkg:
stage: build
tags: ['ace-x86_64']
variables:
JOB_DEPS: gtk-sharp2 mono-complete
script:
- *install_dependencies
- *init_python
# Download and install Renode
- wget --progress=dot:giga https://builds.renode.io/renode-latest.deb
- apt-get install ./renode-latest.deb
- *run_tests
test-dotnet-build:
stage: build
tags: ['ace-x86_64']
variables:
JOB_DEPS: cmake
script:
- *install_dependencies
- *install_dotnet
- *init_python
# Build Renode
- git clone https://github.com/antmicro/renode.git
- pushd renode && ./build.sh --net && popd
- export PYRENODE_RUNTIME=coreclr
- export PYRENODE_BUILD_DIR=$PWD/renode
- *run_tests
test-dotnet-portable:
stage: build
tags: ['ace-x86_64']
script:
- *install_dependencies
- *init_python
# Download Renode pkg
- wget --progress=dot:giga https://builds.renode.io/renode-latest.linux-portable-dotnet.tar.gz
- tar xvf renode-latest.linux-portable-dotnet.tar.gz
- export PYRENODE_RUNTIME=coreclr
- export PYRENODE_BIN=$(realpath $PWD/renode_*-dotnet_portable/renode)
test-dotnet-pkg:
stage: build
tags: ['ace-x86_64']
variables:
JOB_DEPS: curl jq zip
script:
- *install_dependencies
- *install_dotnet
- *init_python
- curl -s https://builds.renode.io/renode-latest.linux-dotnet.tar.gz -o renode-dotnet.tar.gz
- export PYRENODE_RUNTIME=coreclr
- export PYRENODE_PKG=$PWD/renode-dotnet.tar.gz
- *run_tests
test-mono-build:
stage: build
tags: ['ace-x86_64']
variables:
JOB_DEPS: cmake gtk-sharp2 mono-complete
script:
- *install_dependencies
- *init_python
# Build Renode
- git clone https://github.com/antmicro/renode.git
- pushd renode && ./build.sh && popd
- export PYRENODE_RUNTIME=mono
- export PYRENODE_BUILD_DIR=$(pwd)/renode
- *run_tests