-
Notifications
You must be signed in to change notification settings - Fork 301
56 lines (49 loc) · 1.51 KB
/
build.yaml
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
name: Build for x64 ubuntu
on:
push:
branches:
- master
tags:
- uuu*
pull_request:
types:
- opened
- synchronize
jobs:
build:
name: Build for x64 ubuntu
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up environment
run: sudo DEBIAN_FRONTEND=noninteractive apt-get --yes --force-yes install libusb-1.0-0-dev libbz2-dev libzstd-dev libtinyxml2-dev
- name: Build
run: |
git fetch --tags --force # Retrieve annotated tags. #issue 290
if [ "${{ matrix.os }}" == "ubuntu-20.04" ]; then git submodule update --init tinyxml2; cd tinyxml2; cmake .; make; cd ..; fi;
if [ "${{ matrix.os }}" == "ubuntu-20.04" ]; then cmake -D 'STATIC=1' -D 'FORCE_OLD=on' . ; else cmake .; fi;
make
- name: Upload Build Artifacts
if: matrix.os == 'ubuntu-20.04'
uses: actions/upload-artifact@v3
with:
name: uuu
path: ./uuu/uuu
- name: Create or Update Release
if: matrix.os == 'ubuntu-20.04' && github.ref_type == 'tag'
uses: ncipollo/release-action@v1
with:
name: Release ${{ github.ref_name }}
tag: ${{ github.ref_name }}
commit: ${{ github.sha }}
allowUpdates: true
prerelease: true
artifacts: "./uuu/uuu"