@@ -19,13 +19,77 @@ permissions:
19
19
contents : read
20
20
21
21
jobs :
22
+ image :
23
+ name : Build image
24
+ runs-on : ubuntu-20.04
25
+ strategy :
26
+ matrix :
27
+ image :
28
+ - intel-dlb-plugin
29
+ - intel-dlb-initcontainer
30
+ - dlb-libdlb-demo
31
+ builder : [docker]
32
+ steps :
33
+ - uses : actions/checkout@v3
34
+ - uses : actions/cache@v3
35
+ with :
36
+ path : |
37
+ ~/.cache/go-build
38
+ ~/go/pkg/mod
39
+ key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
40
+ restore-keys : |
41
+ ${{ runner.os }}-go-
42
+ - uses : actions/setup-go@v3
43
+ - run : make -e vendor
44
+ - name : Build image
45
+ env :
46
+ IMAGE_NAME : ${{ matrix.image }}
47
+ BUILDER_NAME : ${{ matrix.builder }}
48
+ run : |
49
+ make ${IMAGE_NAME} BUILDER=${BUILDER_NAME}
50
+ mkdir -p artifacts-${{ github.sha }}
51
+ docker tag intel/${IMAGE_NAME}:devel intel/${IMAGE_NAME}:${{ github.sha }}
52
+ docker save intel/${IMAGE_NAME}:devel > artifacts-${{ github.sha }}/${IMAGE_NAME}.tar
53
+
54
+ - name : Temporarily save Docker image
55
+ uses : actions/upload-artifact@v2
56
+ with :
57
+ name : artifacts-${{ github.sha }}
58
+ path : artifacts-${{ github.sha }}
59
+ retention-days : 1
60
+
61
+ transfer-images :
62
+ name : transfer-images
63
+ # runs-on: self-hosted
64
+ runs-on : simics-gnr
65
+ needs : image
66
+ steps :
67
+ - name : Wait for ready state
68
+ run : ../../../../bmetal/actions-bmetal-runstage.sh waitready
69
+ - name : Describe environment
70
+ run : |
71
+ env |sort
72
+ date
73
+ - name : Retrieve saved artifacts
74
+ uses : actions/download-artifact@v2
75
+ with :
76
+ name : artifacts-${{ github.sha }}
77
+ path : artifacts-${{ github.sha }}
78
+ - name : Show the artifacts
79
+ run : |
80
+ date
81
+ ls -la artifacts-${{ github.sha }}
82
+ - name : Push images to local registry
83
+ run : ../../../../bmetal/actions-bmetal-runstage.sh push
84
+
22
85
e2e-dlb :
23
86
name : e2e-dlb
24
87
strategy :
25
88
fail-fast : false
26
89
matrix :
27
90
runner : [simics-spr, simics-gnr]
28
91
runs-on : ${{ matrix.runner }}
92
+ needs : transfer-images
29
93
steps :
30
94
- uses : actions/checkout@v3
31
95
with :
@@ -37,9 +101,10 @@ jobs:
37
101
echo "Ref: ${{ github.ref }}"
38
102
echo "SHA: ${{ github.sha }}"
39
103
echo "Images: $IMAGES"
104
+
40
105
- name : Wait for ready state
41
106
run : ../../../../bmetal/actions-bmetal-runstage.sh waitready
42
107
- name : Prepare test environment
43
- run : ../../../../bmetal/actions-bmetal-runstage.sh prepare
108
+ run : ../../../../bmetal/actions-bmetal-runstage.sh prepare2
44
109
- name : Run tests
45
- run : ../../../../bmetal/actions-bmetal-runstage.sh test
110
+ run : ../../../../bmetal/actions-bmetal-runstage.sh test2
0 commit comments