-
Notifications
You must be signed in to change notification settings - Fork 28
69 lines (58 loc) · 1.82 KB
/
build.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
# Github Actions configuration file
name: Build
on:
release:
types:
- published
jobs:
build:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os: windows-latest
package: ZIP
- os: windows-latest
package: WIX
- os: ubuntu-22.04
package: TGZ
- os: ubuntu-22.04
package: DEB
- os: ubuntu-22.04
package: RPM
- os: ubuntu-20.04
package: DEB
configure_args: "-DCPACK_SYSTEM_NAME=Ubuntu-20.04"
steps:
- name: Setup Windows/MSVC
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
- name: Setup Linux
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install libudev-dev libusb-1.0-0-dev libx11-dev libdbus-1-dev libwayland-dev libxkbcommon-dev libgtk-3-dev libayatana-appindicator3-dev rpm
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_INSTALL_PREFIX=dist ${{matrix.config.configure_args}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config Release
- name: Install
run: cmake --install ${{github.workspace}}/build --config Release
- name: Package
run: cpack -G ${{ matrix.config.package }} --config ${{github.workspace}}/build/CPackConfig.cmake
- name: Upload to Github release
uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "*.zip;*.tar.gz;*.msi;*.deb;*.rpm"
tags: true
draft: false