-
Notifications
You must be signed in to change notification settings - Fork 10
65 lines (55 loc) · 1.58 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
# 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: ubuntu-20.04
package: ZIP
- os: macos-12
package: ZIP
- os: macos-14
package: ZIP
configure_args: "-DCPACK_SYSTEM_NAME=Darwin-arm64"
steps:
- name: Setup Windows/MSVC
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64_x86
- name: Setup Linux/gcc-8
if: runner.os == 'Linux'
run: |
sudo apt-get install g++-8
echo 'CC=gcc-8' >> $GITHUB_ENV
echo 'CXX=g++-8' >> $GITHUB_ENV
- 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"
tags: true
draft: false