-
Notifications
You must be signed in to change notification settings - Fork 15
145 lines (131 loc) · 4.48 KB
/
build.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
# Copyright (c) 2021 Luca Cappa
# Released under the term specified in file LICENSE.txt
# SPDX short identifier: MIT
#
# The peculiarity of this workflow is that assumes vcpkg stored as a submodule of this repository.
# This workflow does the following:
# - Restores vcpkg artifacts from cache.
# - Sets up vcpkg if needed, then run CMake with CMakePreset.json using a configuration
# that leverages the vcpkg's toolchain file. This will automatically run vcpkg to install dependencies
# described by the vcpkg.json manifest file. It will be a no-op if those are restored from cache.
# - Finally builds the sources with Ninja.
name: build
on: [push, workflow_dispatch]
jobs:
VCPKG:
name: ${{ matrix.os }}-${{ github.workflow }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-2022]
include:
- os: 'ubuntu-latest'
mono: 'mono'
triplet: 'x64-linux'
artifact: 'x86_64-linux'
exe_ext: ''
build_dir: ninja-vcpkg
- os: 'windows-2022'
mono: ''
triplet: 'x64-win'
artifact: 'x86_64-windows'
exe_ext: '.exe'
build_dir: vs-vcpkg
- os: 'macos-latest'
mono: 'mono'
triplet: 'x64-osx'
artifact: 'x86_64-macos'
exe_ext: ''
build_dir: ninja-vcpkg
env:
VCPKG_BINARY_SOURCES: 'clear;nuget,GitHub,readwrite'
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: seanmiddleditch/gha-setup-ninja@master
if: startsWith(matrix.os, 'win')
- uses: lukka/get-cmake@latest
if: startsWith(matrix.os, 'win')
- name: Setup MacOS
if: startsWith(matrix.os, 'macOS')
run: brew upgrade && brew install automake autoconf ninja cmake nuget || true
- name: Setup Ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt update && sudo apt upgrade && sudo apt install
build-essential gperf ninja-build cmake
libatspi2.0-dev
libfontconfig1-dev
libfreetype6-dev
libgl1-mesa-dev
libglu1-mesa-dev
libx11-dev
libx11-xcb-dev
'^libxcb.*-dev'
libxcb-damage0-dev
libxcb-dpms0-dev
libxcb-glx0-dev
libxcb-icccm4-dev
libxcb-image0-dev
libxcb-keysyms1-dev
libxcb-present-dev
libxcb-randr0-dev
libxcb-record0-dev
libxcb-render-util0-dev
libxcb-render0-dev
libxcb-res0-dev
libxcb-shape0-dev
libxcb-shm0-dev
libxcb-sync-dev
libxcb-util-dev
libxcb-xfixes0-dev
libxcb-xinerama0-dev
libxcb-xkb-dev
libxcb1-dev
libxext-dev
libxfixes-dev
libxi-dev
libxkbcommon-dev
libxkbcommon-x11-dev
libxrender-dev
libxrender-dev
nuget
- name: 'Bootstrap VCPKG'
shell: bash
run: vcpkg/bootstrap-vcpkg.sh
- name: 'Setup NuGet Credentials (windows)'
if: startsWith(matrix.os, 'win')
shell: 'bash'
run: >
${{ matrix.mono }} `./vcpkg/vcpkg fetch nuget | tail -n 1`
sources add
-source "https://nuget.pkg.github.com/free-audio/index.json"
-storepasswordincleartext
-name "GitHub"
-username "free-audio"
-password "${{ secrets.GITHUB_TOKEN }}"
- name: 'Setup NuGet Credentials (unix)'
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macOS')
shell: 'bash'
run: >
nuget sources add
-source "https://nuget.pkg.github.com/free-audio/index.json"
-storepasswordincleartext
-name "GitHub"
-username "free-audio"
-password "${{ secrets.GITHUB_TOKEN }}"
- name: Build
shell: bash
run: scripts/build.sh ${{ matrix.triplet }}
- name: Archive artifact
shell: bash
run: tar -cvJf clap-host.tar.xz --strip-components 4 builds/${{matrix.build_dir}}/host/Release/clap-host${{matrix.exe_ext}}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: clap-host-${{ matrix.artifact }}.tar.xz
path: clap-host.tar.xz
- uses: actions/delete-package-versions@v3
with:
package-name: qtbase_${{ matrix.triplet }}-clap-host