-
Notifications
You must be signed in to change notification settings - Fork 1
122 lines (99 loc) · 3.51 KB
/
Copy pathcmake.yml
File metadata and controls
122 lines (99 loc) · 3.51 KB
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
name: Compile and Package
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build-linux:
runs-on: ubuntu-22.04
strategy:
matrix:
dockeros: ['Ubuntu', 'Fedora']
include:
- dockeros: Ubuntu
container: "thijswithaar/ubuntu:devel"
package: "build.release/MooerManager-0.1-ubuntu-oracular-x86_64.deb"
- dockeros: Fedora
container: "thijswithaar/fedora:rawhide"
package: "build.release/MooerManager-0.1-fedora-rawhide-x86_64.rpm"
container:
image: ${{ matrix.container }}
env:
DEBIAN_FRONTEND: 'noninteractive'
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Build
run: |
cmake --preset release
cmake --build --preset release -- package
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.dockeros }} installer
path: |
${{github.workspace}}/${{ matrix.package }}
- name: Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ${{github.workspace}}/${{ matrix.package }}
build-macos:
# https://github.com/actions/runner-images/blob/main/images/macos/macos-15-Readme.md
runs-on: macos-15 # 15=Sequioa
timeout-minutes: 120 # QT takes a long time to build under vcpkg
env:
VCPKG_ROOT: '${{ github.workspace }}/vcpkg'
VCPKG_BINARY_SOURCES: 'clear;files,${{ github.workspace }}/vcpkg.cache,readwrite'
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install tools
# These brew-bottles are already in the image: pkg-config llvm@18
run: |
brew install --quiet ninja autoconf automake libtool autoconf-archive llvm@18 imagemagick
git clone https://github.com/microsoft/vcpkg ${{ env.VCPKG_ROOT }}
${{ env.VCPKG_ROOT }}/bootstrap-vcpkg.sh
- name: Cache Vcpkg
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/vcpkg.cache
key: ${{ runner.os }}-${{ hashFiles('**/vcpkg.json') }}-${{ hashFiles('**/cmake/triplets/arm64-osx.cmake') }}-v2
- name: Build
run: |
cmake --preset vcpkg_macos
cmake --build --preset release_macos -- package
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: MacOS installer
path: ${{github.workspace}}/build*/*.dmg
build-windows:
runs-on: windows-latest
timeout-minutes: 120 # QT takes a long time to build under vcpkg
env:
# VCPKG is here, https://github.com/actions/runner-images/blob/main/images/windows/Windows2022-Readme.md#environment-variables
VCPKG_ROOT: 'C:\vcpkg'
VCPKG_BINARY_SOURCES: 'clear;files,${{ github.workspace }}\vcpkg.cache,readwrite'
steps:
- name: Checkout source code
uses: actions/checkout@v4
# v7.1.1.4300 is already installed
#- name: Install tools (Chocolatey)
# run: choco install --no-progress imagemagick.app
- name: Cache Vcpkg
uses: actions/cache@v4
with:
path: ${{ github.workspace }}\vcpkg.cache
key: ${{ runner.os }}-${{ hashFiles('**/vcpkg.json') }}-v3
- name: Build
run: |
cmake --preset vcpkg_msvc
cmake --build --preset release_msvc --target=package
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: Windows installer
path: ${{github.workspace}}/build*/*.zip