-
-
Notifications
You must be signed in to change notification settings - Fork 9
111 lines (92 loc) · 2.49 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
name: Build and test
on:
pull_request:
types:
- opened # PR created
- synchronize # commit pushed to PR
- reopened # closed PR reopened
env:
ARCHIVE_HOST: test1.acts.hu
IMAGE_NAME: sutoj/piler
TEST_TAG: test
DISTRO: noble
PROJECT_ID: piler
ARCH: arm64
CONTAINER: piler
RT: 1
jobs:
get-version:
runs-on:
- self-hosted
- X64
outputs:
IMAGE_TAG: ${{ steps.get-version.outputs.IMAGE_TAG }}
COMMIT_ID: ${{ steps.get-version.outputs.COMMIT_ID }}
VERSION: ${{ steps.get-version.outputs.VERSION }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
VERSION
.github
sparse-checkout-cone-mode: false
- name: Get version
id: get-version
uses: ./.github/actions/version
build-package:
needs:
- get-version
runs-on:
- self-hosted
- ARM64
outputs:
PACKAGE: ${{ steps.build-package.outputs.PACKAGE }}
steps:
- uses: actions/checkout@v4
- name: Build package
id: build-package
uses: ./.github/actions/build/package
with:
ARCH: ${{ env.ARCH }}
COMMIT_ID: ${{ needs.get-version.outputs.COMMIT_ID }}
DISTRO: ${{ env.DISTRO }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}
PROJECT_ID: ${{ env.PROJECT_ID }}
VERSION: ${{ needs.get-version.outputs.VERSION }}
build-image:
runs-on:
- self-hosted
- ARM64
needs:
- get-version
- build-package
steps:
- uses: actions/checkout@v4
- name: Download packages
uses: actions/download-artifact@v4
with:
name: package-${{ env.ARCH }}
path: docker
- name: Build image
uses: ./.github/actions/build/image
with:
DOCKER_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKER_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}:${{ env.TEST_TAG }}
LOAD: true
PACKAGE: ${{ env.PROJECT_ID }}_${{ needs.get-version.outputs.VERSION }}-${{ env.DISTRO }}-${{ needs.get-version.outputs.COMMIT_ID }}
PLATFORMS: 'linux/arm64'
PUSH: false
run-tests:
runs-on:
- self-hosted
- ARM64
needs:
- build-image
steps:
- name: Run tests
uses: ./.github/actions/test
with:
ARCHIVE_HOST: ${{ env.ARCHIVE_HOST }}
CONTAINER: 'piler'
TEST_TAG: ${{ env.TEST_TAG }}