-
Notifications
You must be signed in to change notification settings - Fork 7
154 lines (149 loc) Β· 5.13 KB
/
build-release.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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
name: Build Release
run-name: Build ${{ github.ref_name }} π
on:
push:
branches:
- main
- release/*
defaults:
run:
shell: bash
jobs:
CallPR:
name: β Run PR Workflow
uses: ./.github/workflows/build-pr.yml
with:
is_called_workflow: true
do_instrumentation: ${{ github.ref_name == 'main' }}
secrets: inherit
DeployDocumentation:
name: βοΈ Deploy documentation
runs-on: [ self-hosted, Linux, Docker ]
if: github.ref_name == 'main'
permissions: write-all
needs:
- CallPR
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # load all commits
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: Documentation-assets
- name: Deploy documentation to github pages
run: tools/publish-docs-on-github.sh
DeployInstaller:
name: βοΈ Deploy Installer
runs-on: [ self-hosted, Linux, Docker ]
permissions: write-all
needs:
- CallPR
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # load all commits
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: BuildInstaller-user-assets
- name: Deploy release assets to github
run: tools/upload-github-release-asset.sh "${{ github.token }}"
GenerateReport:
name: π Generate Reports
runs-on: [ self-hosted, Linux, Docker ]
if: github.ref_name == 'main'
needs:
- CallPR
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download all artifacts
id: download
uses: actions/download-artifact@v4
with:
path: artifacts
- name: π₯ Download report cache from FTP
id: cache-download
run: |
tools/ftp-upload/download-files.sh \
-s "${{ vars.GHA_MIES_FTP_ARTEFACT_STORAGE_DNS }}" \
-u "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_USER }}" \
-p "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_PWD }}" \
-d "history" \
-t "cache/coverage-history"
- name: π Generate Reports
id: gen
run: |
tools/report-generator/build.sh \
-s "$(pwd)" \
-d "${{ steps.download.outputs.download-path }}" \
-h "${{ steps.cache-download.outputs.data }}" \
-o report \
-l "${{ secrets.GHA_MIES_REPORTGENERATOR_LICENSE }}"
- name: π€ Upload latest report to FTP
run: |
tools/ftp-upload/upload-files.sh \
-s "${{ vars.GHA_MIES_FTP_ARTEFACT_STORAGE_DNS }}" \
-u "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_USER }}" \
-p "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_PWD }}" \
-d "${{ steps.gen.outputs.report }}" \
-t "report/coverage"
- name: π€ Upload report cache to FTP
run: |
tools/ftp-upload/upload-files.sh \
-s "${{ vars.GHA_MIES_FTP_ARTEFACT_STORAGE_DNS }}" \
-u "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_USER }}" \
-p "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_PWD }}" \
-d "${{ steps.gen.outputs.history }}" \
-t "cache/coverage-history"
- name: upload artifacts
uses: actions/upload-artifact@v4
if: always()
with:
name: report-artifacts
path: |
${{ steps.gen.outputs.report }}
if-no-files-found: warn
FTPUpload:
name: π¦ FTP Upload Artifacts
runs-on: [ self-hosted, Linux, Docker ]
if: ${{ !cancelled() }}
needs:
# All jobs that create new artifacts
- CallPR
- GenerateReport
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Initial repo config
run: tools/initial-repo-config.sh
- name: Download all artifacts
id: download
uses: actions/download-artifact@v4
with:
path: artifacts
- name: Flatten artifact structure
run: |
find "${{ steps.download.outputs.download-path }}" -mindepth 1 -maxdepth 1 -type d |\
xargs -I {} tools/ftp-upload/flatten-files.sh "{}"
- name: Compress some artifacts
run: tools/ftp-upload/compress-files.sh "${{ steps.download.outputs.download-path }}"
- name: Upload artifacts using FTP
run: |
tools/ftp-upload/upload-files.sh \
-s "${{ vars.GHA_MIES_FTP_ARTEFACT_STORAGE_DNS }}" \
-u "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_USER }}" \
-p "${{ secrets.GHA_MIES_FTP_ARTEFACT_STORAGE_PWD }}" \
-d "${{ steps.download.outputs.download-path }}" \
-t "deploy/$(echo "${{ github.ref_name }}" | sed "s@/@_@g")/${{ github.sha }}/${{ github.run_attempt }}"