-
Notifications
You must be signed in to change notification settings - Fork 32
90 lines (76 loc) · 2.34 KB
/
CI.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
name: CI
on:
pull_request:
push:
branches:
- main
tags:
- 'v*'
jobs:
tests:
runs-on: macos-12
name: macos-12
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
path: src
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: 3.22.2
- name: Setup python
uses: actions/[email protected]
with:
python-version: '3.7'
- name: Install scikit-ci-addons
run: pip install -U scikit-ci-addons
- name: Download Qt archive
uses: carlosperate/[email protected]
with:
file-url: 'https://github.com/jcfr/qt-static-build/releases/download/qt-5.15.2-macosx10.13-static-x86_64/qt-5.15.2-macosx10.13-static-x86_64.tar.bz2'
sha256: '13a1df0c939c22618fb979072c3c16191cb42f7759ea3d8ec344aa229a04bca0'
- name: Extract Qt archive
run: |
tar -xjvf qt-5.15.2-macosx10.13-static-x86_64.tar.bz2
mv qt-5.15.2-macosx10.13-static-x86_64 qt
- name: Configure
run: |
cmake \
-DQt5_DIR:DIR=$(pwd)/qt/lib/cmake/Qt5 \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.13 \
-DCMAKE_OSX_ARCHITECTURES:STRING=x86_64 \
-B build -S src
env:
CC: clang
CXX: clang++
- name: Build
run: |
cmake --build build -- -j4
- name: Package
run: |
cmake --build build --target package
# Exclude tests requiring X Display
- name: Test
run: |
cd build
ctest -LE XDisplayRequired -VV
- name: Publish packages
uses: actions/upload-artifact@v2
with:
name: macos-packages
path: build/CTKAppLauncher-*.tar.gz
# See https://github.com/scikit-build/scikit-ci-addons/issues/96
#- name: Publish packages
# run: |
# cd src
# ci_addons publish_github_release commontk/applauncher \
# --exit-success-if-missing-token \
# --prerelease-sha main \
# --prerelease-packages ../build/CTKAppLauncher-*.tar.gz \
# --prerelease-packages-clear-pattern "*macosx*" \
# --prerelease-packages-keep-pattern "*<COMMIT_SHORT_SHA>*" \
# --release-packages build/CTKAppLauncher-*.tar.gz
# env:
# GITHUB_TOKEN: secrets.COMMONTKBOT_GITHUB_TOKEN