-
Notifications
You must be signed in to change notification settings - Fork 1
151 lines (122 loc) · 4.18 KB
/
tests.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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
name: Tests and Coverage
on: [push]
jobs:
kernel:
name: Kernel Build compare
runs-on: ubuntu-20.04
steps:
- name: Prepare dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libfuse3-dev wget
sudo apt-get install -y libelf-dev flex bison libssl-dev bc
- name: Install hiredis 1.0
run: |
cd /tmp
wget https://github.com/redis/hiredis/archive/refs/tags/v1.0.0.tar.gz
tar -xf v1.0.0.tar.gz
cd hiredis-1.0.0
make -j 8
sudo make PREFIX=/usr install
- name: Install libunwind 1.5.0
run: |
cd /tmp
wget https://github.com/libunwind/libunwind/releases/download/v1.5/libunwind-1.5.0.tar.gz
tar -xf libunwind-1.5.0.tar.gz
cd libunwind-1.5.0
./configure --prefix=/usr
make -j 8
sudo make install
- name: Checkout development code
uses: actions/checkout@v1
- name: Build filesystem
run: |
make production
- name: Build 0-db
run: |
git clone -b development-v2 https://github.com/threefoldtech/0-db
cd 0-db/libzdb && make release
cd ../zdbd && make release
- name: Run 0-db backend
run: |
cd 0-db/zdbd && ./zdb --mode seq --background
- name: Run zdbfs (0-db-fs)
run: |
sudo mkdir /mnt/zdbfs
sudo ./zdbfs -o allow_other -o background -o autons /mnt/zdbfs
- name: Download Linux Kernel
working-directory: /tmp
run: wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.9.13.tar.xz
- name: Extract the kernel on the root filesystem
run: tar -xf /tmp/linux-5.9.13.tar.xz -C /tmp/
- name: Extract the kernel on zdbfs
run: tar -xf /tmp/linux-5.9.13.tar.xz -C /mnt/zdbfs/
- name: Compare extracted kernel
run: diff -qr /tmp/linux-5.9.13 /mnt/zdbfs/linux-5.9.13
- name: Prepare the kernel on root filesystem
working-directory: /tmp/linux-5.9.13
run: make V=1 defconfig
env:
KBUILD_BUILD_TIMESTAMP: Tue Dec 15 03:54:50 AM CET 2020
- name: Prepare kernel configuration on zdbfs
working-directory: /mnt/zdbfs/linux-5.9.13
run: make V=1 defconfig
env:
KBUILD_BUILD_TIMESTAMP: Tue Dec 15 03:54:50 AM CET 2020
- name: Build the kernel on root filesystem
working-directory: /tmp/linux-5.9.13
run: make -j 8
env:
KBUILD_BUILD_TIMESTAMP: Tue Dec 15 03:54:50 AM CET 2020
- name: Build kernel on zdbfs
working-directory: /mnt/zdbfs/linux-5.9.13
run: make -j 8
env:
KBUILD_BUILD_TIMESTAMP: Tue Dec 15 03:54:50 AM CET 2020
- name: Compare builds
run: diff -qr -x tools -x x86 /tmp/linux-5.9.13 /mnt/zdbfs/linux-5.9.13
sanity:
name: Filesystem Sanity checks
runs-on: ubuntu-20.04
steps:
- name: Prepare dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential libfuse3-dev wget
sudo apt-get install -y libelf-dev flex bison libssl-dev bc
- name: Install hiredis 1.0
run: |
cd /tmp
wget https://github.com/redis/hiredis/archive/refs/tags/v1.0.0.tar.gz
tar -xf v1.0.0.tar.gz
cd hiredis-1.0.0
make -j 8
sudo make PREFIX=/usr install
- name: Install libunwind 1.5.0
run: |
cd /tmp
wget https://github.com/libunwind/libunwind/releases/download/v1.5/libunwind-1.5.0.tar.gz
tar -xf libunwind-1.5.0.tar.gz
cd libunwind-1.5.0
./configure --prefix=/usr
make -j 8
sudo make install
- name: Checkout development code
uses: actions/checkout@v1
- name: Build filesystem
run: |
make production
- name: Build 0-db
run: |
git clone -b development-v2 https://github.com/threefoldtech/0-db
cd 0-db/libzdb && make release
cd ../zdbd && make release
- name: Run 0-db backend
run: |
cd 0-db/zdbd && ./zdb --mode seq --background
- name: Run 0-db-fs (zdbfs)
run: |
sudo mkdir /mnt/zdbfs
sudo ./zdbfs -o allow_other -o background -o autons /mnt/zdbfs
- name: Run sanity check
run: ./tests/basic.sh /mnt/zdbfs