-
Notifications
You must be signed in to change notification settings - Fork 36
128 lines (120 loc) · 3.78 KB
/
test.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
name: Test
on: [push, pull_request]
permissions:
actions: read
jobs:
build:
runs-on: ubuntu-latest
name: "Build"
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: sudo ./hacking/installdeps.sh
- name: Install fsck.erofs
run: sudo apt install erofs-utils
- name: Configure
run: ./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH) CFLAGS='-Wall -Werror'
- name: Build
run: make -j $(nproc) CFLAGS='-fsanitize=address -fsanitize=undefined'
- name: Unit tests
run: make check
- name: Capture build
run: make install DESTDIR=$(pwd)/instroot && tar -C instroot -czf composefs.tar .
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: composefs.tar
path: composefs.tar
build-baseline:
runs-on: ubuntu-latest
name: "Build on Ubuntu Focal"
container: ubuntu:focal
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update -y
ALLOW_MISSING="libfsverity-dev" ./hacking/installdeps.sh
- name: Configure
run: |
./autogen.sh
./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH) CFLAGS='-Wall -Werror'
- name: Build
run: make -j $(nproc) CFLAGS='-fsanitize=address -fsanitize=undefined'
build-unit-cross:
runs-on: ubuntu-latest
name: Build on ${{ matrix.arch }}
strategy:
matrix:
include:
- arch: armv7
distro: ubuntu_latest
- arch: aarch64
distro: ubuntu_latest
- arch: s390x
distro: ubuntu_latest
- arch: ppc64le
distro: ubuntu_latest
steps:
- uses: actions/[email protected]
with:
submodules: true
set-safe-directory: true
- uses: uraimo/[email protected]
name: Build
id: build
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
githubToken: ${{ github.token }}
run: |
apt-get update -y
./hacking/installdeps.sh
./autogen.sh
./configure CFLAGS='-Wall -Werror'
make -j $(nproc)
make check
integration:
needs: build
runs-on: ubuntu-latest
steps:
- run: sudo apt-get update -y
- name: Install erofs kmod
run: sudo apt install linux-modules-extra-$(uname -r)
- name: Install sanitizer dependencies
run: sudo apt install libasan6 libubsan1
- name: Checkout repository
uses: actions/checkout@v3
- name: Download
uses: actions/download-artifact@v2
with:
name: composefs.tar
- run: sudo tar -C / -xvf composefs.tar
- name: Integration tests
run: sudo ./tests/integration.sh
clang-format:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y make clang-format
- name: check formatting
run: |
sudo docker build -t clang-format hacking/clang-format
sudo docker run --rm -w /src -v ${PWD}:/src clang-format
distcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install dependencies
run: sudo ./hacking/installdeps.sh
- name: Configure
run: ./autogen.sh && ./configure CFLAGS='-Wall -Werror'
- name: Run make distcheck
run: make -j$(nproc) distcheck