forked from slint-ui/slint
-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (83 loc) · 2.89 KB
/
cpp_package.yaml
File metadata and controls
86 lines (83 loc) · 2.89 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
# Copyright © SixtyFPS GmbH <info@slint-ui.com>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial
name: Build the C++ binary package
on:
workflow_dispatch:
workflow_call:
jobs:
cmake_package:
env:
DYLD_FRAMEWORK_PATH: /Users/runner/work/slint/Qt/6.2.1/clang_64/lib
QT_QPA_PLATFORM: offscreen
CARGO_INCREMENTAL: false
strategy:
matrix:
os: [ubuntu-20.04, macOS-11, windows-2019]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install Linux Dependencies
if: matrix.os == 'ubuntu-20.04'
run: sudo apt-get install libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev
- name: Cache Qt
if: matrix.os != 'windows-2019'
id: cache-qt
uses: actions/cache@v2
with:
path: ~/work/slint/Qt
key: ${{ runner.os }}-${{ github.job }}-cpp-Qt
- name: Install Qt (Ubuntu)
uses: jurplel/install-qt-action@v2
if: matrix.os == 'ubuntu-20.04'
with:
version: 5.15.2
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Install Qt (Windows, uncached)
if: matrix.os == 'windows-2019'
uses: jurplel/install-qt-action@v2
with:
version: 6.2.1
- name: Install Qt (cached)
if: matrix.os != 'ubuntu-20.04' && matrix.os != 'windows-2019'
uses: jurplel/install-qt-action@v2
with:
version: 6.2.1
cached: ${{ steps.cache-qt.outputs.cache-hit }}
setup-python: false
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/install@v0.1
with:
crate: cargo-about
- name: Prepare licenses (with Qt)
if: matrix.os == 'windows-2019' || matrix.os == 'macOS-11'
run: bash -x ./scripts/prepare_binary_package.sh . --with-qt
- name: Prepare licenses (without Qt)
if: matrix.os != 'windows-2019' && matrix.os != 'macOS-11'
run: bash -x ./scripts/prepare_binary_package.sh .
- uses: ilammy/msvc-dev-cmd@v1
- name: Select MSVC (windows)
run: |
echo "CC=cl.exe" >> $GITHUB_ENV
echo "CXX=cl.exe" >> $GITHUB_ENV
if: matrix.os == 'windows-2019'
- name: C++ Build
uses: lukka/run-cmake@v3.4
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: CMakeLists.txt
cmakeAppendedArgs: '-DCMAKE_BUILD_TYPE=RelWithDebInfo -DSLINT_PACKAGE_BUNDLE_QT=ON'
buildDirectory: ${{ runner.workspace }}/cppbuild
buildWithCMakeArgs: '--config Release'
- name: cpack
working-directory: ${{ runner.workspace }}/cppbuild
run: cmake --build . --config Release --target package
- name: "Upload C++ packages"
uses: actions/upload-artifact@v2
with:
name: cpp_bin
path: ${{ runner.workspace }}/cppbuild/Slint-cpp-*