-
Notifications
You must be signed in to change notification settings - Fork 18
99 lines (91 loc) · 2.62 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
name: Docker Image
on:
push:
branches: ["main"]
jobs:
build-image-builder:
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 -cvf build_unittest.tar build_unittest
- uses: actions/upload-artifact@v3
with:
name: build_unittest
path: build_unittest.tar
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 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 -cvf target_autotest.tar ./
- uses: actions/upload-artifact@v3
with:
name: target_autotest
path: target_autotest.tar
build:
needs: build-image-builder
runs-on: ubuntu-latest
container:
image: yanetplatform/builder
steps:
- uses: actions/checkout@v3
- run: |
meson setup --prefix=/target 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
- 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
- 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