-
Notifications
You must be signed in to change notification settings - Fork 27
100 lines (86 loc) · 3.09 KB
/
build_windows.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
name: Windows
on:
push:
branches: [ master, '*-ci' ]
pull_request:
branches: [ master, '*-ci' ]
workflow_dispatch:
jobs:
zserio:
uses: "./.github/workflows/build_windows_zserio.yml"
cpp:
needs: [zserio]
uses: "./.github/workflows/build_windows_cpp.yml"
java:
needs: [zserio]
uses: "./.github/workflows/build_windows_java.yml"
python:
needs: [zserio]
uses: "./.github/workflows/build_windows_python.yml"
doc:
needs: [zserio]
uses: "./.github/workflows/build_windows_doc.yml"
xml:
needs: [zserio]
uses: "./.github/workflows/build_windows_xml.yml"
release:
needs: [cpp, java, python, doc, xml]
runs-on: "windows-2022"
steps:
- name: Install dependencies
shell: bash
run: |
choco install zip
# update when https://github.com/actions/download-artifact/issues/315 is fixed
- name: "Download Zserio release artifacts"
uses: actions/download-artifact@v3
with:
name: zserio-bin-java8
path: zserio-bin-java8
- name: "Download Java runtime release artifacts"
uses: actions/download-artifact@v3
with:
name: zserio-runtime-java8
path: zserio-runtime-java8
- name: "Download C++ runtime release artifacts"
uses: actions/download-artifact@v3
with:
name: zserio-runtime-cpp
path: zserio-runtime-cpp
- name: "Download Python runtime release artifacts"
uses: actions/download-artifact@v3
with:
name: zserio-runtime-python
path: zserio-runtime-python
- name: "Get Zserio version"
shell: bash
run: |
RELEASE_DIR=$(ls -1 zserio-bin-java8 | head -n 1)
ZSERIO_VERSION=${RELEASE_DIR#release-}
echo "ZSERIO_VERSION=${ZSERIO_VERSION}" >> ${GITHUB_ENV}
- name: "Compose final release"
shell: bash
run: |
RELEASE_DIR=release-${ZSERIO_VERSION}
mkdir ${RELEASE_DIR}
# zserio compiler with all extensions
cp zserio-bin-java8/release-*/zserio-*-bin.zip ${RELEASE_DIR}/.
# prepare all runtime libraries
mkdir runtime_libs
# add zserio java runtime library
unzip -q zserio-runtime-java8/release-*/zserio-*-runtime-libs.zip -d zserio-runtime-java8
cp -r zserio-runtime-java8/runtime_libs/java runtime_libs/.
# add zserio cpp runtime library
unzip -q zserio-runtime-cpp/release-*/zserio-*-runtime-libs.zip -d zserio-runtime-cpp
cp -r zserio-runtime-cpp/runtime_libs/cpp runtime_libs/.
# add zserio python runtime library
unzip -q zserio-runtime-python/release-*/zserio-*-runtime-libs.zip -d zserio-runtime-python
cp -r zserio-runtime-python/runtime_libs/python runtime_libs/.
# zip runtime libraries
zip -rq ${RELEASE_DIR}/zserio-${ZSERIO_VERSION}-runtime-libs.zip "runtime_libs"
- name: "Archive release artifacts"
# update when https://github.com/actions/upload-artifact/issues/543 is fixed
uses: actions/upload-artifact@v3
with:
name: windows-release-${{env.ZSERIO_VERSION}}
path: release-${{env.ZSERIO_VERSION}}