-
Notifications
You must be signed in to change notification settings - Fork 5
123 lines (116 loc) · 3.2 KB
/
release.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
name: Release Builds
on: push
env:
QT_VERSION: "v6.7.0"
ZLIB_VERSION: "v1.3.1" # not used for msvc builds
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: "ubuntu-20.04"
shell: "bash"
CONFIGURE_EXTRAS: "-DFEATURE_xcb=ON -DINPUT_bundled_xcb_xinput=yes -DFEATURE_libudev=OFF"
- os: "macos-13"
shell: "bash"
- os: "windows-2022"
shell: "msys2 {0}"
CONFIGURE_EXTRAS: "-DQT_QMAKE_TARGET_MKSPEC=win32-g++"
defaults:
run:
shell: ${{ matrix.shell }}
env:
CONFIGURE_EXTRAS: ${{ matrix.CONFIGURE_EXTRAS }}
steps:
- uses: spatial-model-editor/setup-ci@v1
- uses: actions/checkout@v4
- name: Build script
run: ./build.sh
- uses: actions/upload-artifact@v4
with:
name: artifacts-${{ matrix.os }}
path: ./artefacts/*
retention-days: 3
win32-mingw:
name: Windows 32-bit Mingw
runs-on: windows-2022
env:
INSTALL_PREFIX: "/c/smelibs"
SUDO_CMD: ""
CONFIGURE_EXTRAS: "-DQT_QMAKE_TARGET_MKSPEC=win32-g++"
OS: "win32-mingw"
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW32
update: true
install: mingw-w64-i686-gcc mingw-w64-i686-cmake mingw-w64-i686-ninja git
- name: Build script
run: ./build.sh
- uses: actions/upload-artifact@v4
with:
name: artifacts-win32-mingw
path: ./artefacts/*
win64-msvc:
name: Windows 64-bit MSVC
runs-on: windows-2022
env:
INSTALL_PREFIX: 'C:\smelibs'
OS: "win64-msvc"
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
toolset: 14.0
- name: Build script
run: ./build.ps1
- uses: actions/upload-artifact@v4
with:
name: artifacts-win64-msvc
path: ./artefacts/*
win32-msvc:
name: Windows 32-bit MSVC
runs-on: windows-2022
env:
INSTALL_PREFIX: 'C:\smelibs'
OS: "win32-msvc"
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
toolset: 14.0
- name: Build script
run: ./build.ps1
- uses: actions/upload-artifact@v4
with:
name: artifacts-win32-msvc
path: ./artefacts/*
release:
needs: [build, win32-mingw, win64-msvc, win32-msvc]
runs-on: ubuntu-latest
permissions:
contents: write
# upload binaries to github release if commit is tagged
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4
with:
pattern: artifacts-*
merge-multiple: true
path: binaries
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: binaries/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true