111 lines (109 loc) · 2.7 KB
/
nin.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
name: Nin
on:
push:
branches:
- "*"
tags:
- "v*"
pull_request:
jobs:
build:
strategy:
fail-fast: false
matrix:
name:
- win64
- win32
- macos
- linux
include:
- name: win64
os: windows-2019
qt_arch: win64_msvc2017_64
cmake_opts: -A x64
- name: win32
os: windows-2019
qt_arch: win32_msvc2015
cmake_opts: -A Win32
- name: macos
os: macos-latest
cmake_opts: -DCMAKE_BUILD_TYPE=Release
- name: linux
os: ubuntu-16.04
cmake_opts: -DCMAKE_BUILD_TYPE=Release
runs-on: ${{ matrix.os }}
env:
QT_VERSION: 5.9.9
steps:
- name: Cache Qt
id: cache-qt
uses: actions/cache@v1
with:
path: ../Qt
key: Qt-${{ env.QT_VERSION }}-${{ matrix.name }}
- name: Install Qt
uses: jurplel/install-qt-action@v2
with:
arch: ${{ matrix.qt_arch }}
cached: ${{ steps.cache-qt.outputs.cache-hit }}
version: ${{ env.QT_VERSION }}
- name: Install Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.x
- name: Checkout
uses: actions/checkout@v2
- name: Setup
run: |
mkdir build
- name: Build
run: |
cmake .. ${{ matrix.cmake_opts }}
cmake --build . --config Release
working-directory: ./build
- name: Test
run: cmake --build . --config Release --target test
working-directory: ./build
- name: Package
run: |
cmake --build . --config Release --target package
cmake -E remove_directory ./pkg/_CPack_Packages
working-directory: ./build
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: ${{ matrix.name }}
path: build/pkg
release:
if: startsWith(github.ref, 'refs/tags/')
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Download win64
uses: actions/download-artifact@v1
with:
name: win64
path: pkg
- name: Download win32
uses: actions/download-artifact@v1
with:
name: win32
path: pkg
- name: Download macOS
uses: actions/download-artifact@v1
with:
name: macOS
path: pkg
- name: Download linux
uses: actions/download-artifact@v1
with:
name: linux
path: pkg
- name: Release
uses: softprops/action-gh-release@v1
with:
files: "pkg/*"
draft: true
prerelease: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}