-
Notifications
You must be signed in to change notification settings - Fork 3
42 lines (34 loc) · 968 Bytes
/
build.yaml
File metadata and controls
42 lines (34 loc) · 968 Bytes
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
name: Build Reimu from C++ Source Code
on:
push:
branches:
- '**'
tags:
- 'v*.*.*'
pull_request:
branches:
- '**'
permissions:
contents: write
jobs:
build_cpp:
runs-on: ubuntu-latest
steps:
- name: Set up Git repository
uses: actions/checkout@v4
- name: Set up xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: latest
- name: Build binary from source (use clang)
run: xmake f --toolchain=clang -y && xmake -y
- name: Build binary from source (use gcc)
run: xmake f --toolchain=gcc -y && xmake -y
# TODO: maybe we need unit test here
- name: Create GitHub Release and Upload Binary
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
files: build/linux/x86_64/release/reimu
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}