-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathspread.yaml
62 lines (50 loc) · 1.48 KB
/
spread.yaml
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
project: oxidizr
kill-timeout: 90m
workers: 1
environment:
CI: "$(HOST: echo $CI)"
backends:
lxd:
type: adhoc
allocate: |
CONTAINER_NAME="${oxidizr-${SPREAD_SYSTEM/./-}-${RANDOM}}"
lxc launch \
"${SPREAD_SYSTEM/-/:}" \
"${CONTAINER_NAME}" \
-c user.user-data="$(sed "s|SPREAD_PASSWORD|$SPREAD_PASSWORD|g" tests/lib/cloud-config.yaml)"
# Wait for the spread user
while ! lxc exec "${CONTAINER_NAME}" -- id -u spread &>/dev/null; do sleep 0.5; done
# Set the instance address for spread
ADDRESS "$(lxc ls -f csv | grep "${CONTAINER_NAME}" | cut -d"," -f3 | cut -d" " -f1)"
discard: |
instance_name="$(lxc ls -f csv | grep oxidizr | grep $SPREAD_SYSTEM_ADDRESS | cut -f1 -d",")"
lxc delete -f $instance_name
systems:
- ubuntu-24.04:
username: spread
workers: 1
- ubuntu-24.10:
username: spread
workers: 1
suites:
tests/:
summary: Spread tests
exclude:
- .git
- .github
path: /root/proj
prepare: |
snap refresh --hold
if systemctl is-enabled unattended-upgrades.service; then
systemctl stop unattended-upgrades.service
systemctl mask unattended-upgrades.service
fi
pushd "$SPREAD_PATH"
if [[ ! -f "$PWD/target/debug/oxidizr" ]]; then
apt-get update
apt-get install -y build-essential
snap install --classic rustup
rustup default stable
cargo build
fi
install -Dm755 "$PWD/target/debug/oxidizr" /usr/bin/oxidizr