-
Notifications
You must be signed in to change notification settings - Fork 6
142 lines (138 loc) · 4.57 KB
/
win.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
name: "Windows CI"
on:
push:
branches:
- '**'
release:
types: [published]
pull_request:
workflow_dispatch:
jobs:
build:
strategy:
matrix:
os: [windows-latest]
arch: [amd64, amd64_arm64]
include:
- arch: amd64
qtArch: win64_msvc2019_64
buildArch: x64
- arch: amd64_arm64
qtArch: win64_msvc2019_arm64
buildArch: arm64
runs-on: ${{ matrix.os }}
steps:
- uses: vicr123/libcontemporary/prepare-vars@actions
id: vars
- name: Install ninja
run: |
choco install ninja
- name: Install Host Qt
uses: vicr123/install-qt-action@win-aarch64-test
if: matrix.qtArch != 'win64_msvc2019_64'
with:
version: ${{ steps.vars.outputs.qtVersion }}
arch: win64_msvc2019_64
modules: addons.qtmultimedia addons.qtwebsockets qt5compat
- name: "Set Qt path"
shell: bash
run: |
echo "QT_HOST_PATH=$Qt6_DIR" >> $GITHUB_ENV
- name: Set up Host MSVC
uses: ilammy/[email protected]
if: matrix.qtArch != 'win64_msvc2019_64'
with:
sdk: 10.0.22000.0
arch: amd64
- name: Build Host libcontemporary
uses: vicr123/libcontemporary/install-libcontemporary@actions
if: matrix.qtArch != 'win64_msvc2019_64'
with:
qcoroVersion: ${{ steps.vars.outputs.qcoroVersion }}
commitish: features/win-aarch64
arch: x64
- name: Install Qt
uses: vicr123/install-qt-action@win-aarch64-test
with:
version: ${{ steps.vars.outputs.qtVersion }}
arch: ${{ matrix.qtArch }}
modules: addons.qtmultimedia addons.qtwebsockets qt5compat
- name: Set up MSVC
uses: ilammy/[email protected]
with:
sdk: 10.0.22000.0
arch: ${{ matrix.arch }}
- name: Build libcontemporary
uses: vicr123/libcontemporary/install-libcontemporary@actions
with:
qcoroVersion: ${{ steps.vars.outputs.qcoroVersion }}
commitish: features/win-aarch64
arch: ${{ matrix.buildArch }}
- uses: vicr123/libcontemporary/build-project@actions
name: "Build contemporary-theme"
with:
project: "vicr123/contemporary-theme"
commitish: "blueprint"
arch: ${{ matrix.buildArch }}
- uses: vicr123/libcontemporary/build-project@actions
name: "Build taglib"
with:
project: "taglib/taglib"
commitish: "v1.12"
extra-cmake-args: -DBUILD_SHARED_LIBS=ON
arch: ${{ matrix.buildArch }}
- uses: actions/checkout@v1
with:
submodules: 'recursive'
- uses: vicr123/libcontemporary/build-project@actions
name: "Build project"
with:
project: "."
arch: ${{ matrix.buildArch }}
extra-cmake-args: ${{ format('-DTAGLIB_ROOT=D:\a\theBeat\cmake-install\{0} -DCNTP_TARGET_ARCH={0}', matrix.buildArch) }}
- name: "Prepare for deployment"
shell: bash
run: |
mkdir -p ./build/application/deploy
mkdir -p ./build/application/deploy/plugins
cp ./build/plugins/*/*.dll ./build/application/deploy/plugins
cp ./build/cdlib/src/CDLib-build/CDLib.dll ./build/application/deploy
- uses: vicr123/libcontemporary/deploy-project@actions
id: deploy
name: "Deploy project"
with:
subdir: "application"
arch: ${{ matrix.buildArch }}
- uses: actions/upload-artifact@v1
name: Upload Artifact to GitHub Actions
with:
name: ${{ format('thebeat-win-{0}', matrix.buildArch) }}
path: ${{ steps.deploy.outputs.package }}
release:
permissions:
contents: write
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'release'
steps:
- uses: actions/download-artifact@v3
name: "Download x64 Artifact"
id: download_x64
with:
name: "thebeat-win-x64"
path: "thebeat-win-x64"
- uses: actions/download-artifact@v3
name: "Download arm64 Artifact"
id: download_arm64
with:
name: "thebeat-win-arm64"
path: "thebeat-win-arm64"
- run: |
zip -r thebeat-win-x64.zip thebeat-win-x64
zip -r thebeat-win-arm64.zip thebeat-win-arm64
- name: "Upload to Release"
uses: softprops/action-gh-release@v1
with:
files: |
thebeat-win-x64.zip
thebeat-win-arm64.zip