-
Notifications
You must be signed in to change notification settings - Fork 17
131 lines (117 loc) · 3.41 KB
/
docker-image.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Docker Image
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
formatting-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Run clang-format style check
uses: jidicula/[email protected]
with:
clang-format-version: '10'
exclude-regex: .*\.proto
build-image-builder:
needs: formatting-check
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- name: Build the yanetplatform/builder
run: |
cd docker
build-unittest:
needs: build-image-builder
runs-on: ubuntu-latest
container:
image: yanetplatform/builder
steps:
- uses: actions/checkout@v3
- run: |
meson setup -Dtarget=unittest build_unittest
meson compile -C build_unittest
- name: bug https://github.com/actions/upload-artifact/issues/38
run: tar -cvzf build_unittest.tar.gz build_unittest
- uses: actions/upload-artifact@v3
with:
name: build_unittest
path: build_unittest.tar.gz
retention-days: 1
build-autotest:
needs: build-image-builder
runs-on: builder
container:
image: yanetplatform/builder
steps:
- uses: actions/checkout@v3
- run: |
meson setup --prefix=/target_autotest -Dtarget=autotest -Dstrip=true build_autotest
meson compile -C build_autotest
- run: meson install -C build_autotest
- name: bug https://github.com/actions/upload-artifact/issues/38
run: tar -C /target_autotest -cvzf target_autotest.tar.gz ./
- uses: actions/upload-artifact@v3
with:
name: target_autotest
path: target_autotest.tar.gz
retention-days: 1
build:
needs: build-image-builder
runs-on: ubuntu-latest
container:
image: yanetplatform/builder
steps:
- uses: actions/checkout@v3
- run: |
meson setup --prefix=/target -Dstrip=true build
meson compile -C build
- run: meson install -C build
build-ubuntu1804:
name: build (Ubuntu 18.04)
needs: build-image-builder
runs-on: ubuntu-latest
container:
image: yanetplatform/builder_ubuntu18.04
steps:
- uses: actions/checkout@v3
- run: |
meson setup --prefix=/target -Dstrip=true build
meson compile -C build
- run: meson install -C build
unittest:
needs: build-unittest
runs-on: ubuntu-latest
container:
image: yanetplatform/builder
steps:
- uses: actions/download-artifact@v3
with:
name: build_unittest
- name: bug https://github.com/actions/upload-artifact/issues/38
run: tar -xf build_unittest.tar.gz
- run: meson test --no-rebuild -C build_unittest
autotest-001_one_port:
name: 001_one_port
needs: build-autotest
runs-on: autotest
container:
image: yanetplatform/builder
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
with:
name: target_autotest
- name: bug https://github.com/actions/upload-artifact/issues/38
run: tar -C /usr -xf target_autotest.tar.gz
- run: yanet-autotest-run.py autotest/units/001_one_port
deploy:
needs:
- unittest
- autotest-001_one_port
- build
runs-on: ubuntu-latest
steps:
- run: echo deploy