forked from betaflight/blackbox-log-viewer
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (51 loc) · 1.58 KB
/
ci.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
# Builds Betaflight Blackbox Explorer on Windows, Linux and macOS platforms.
#
# After building, artifacts are released to a seperate repository.
name: CI
on:
workflow_call:
inputs:
debug_build:
description: 'Specifies if it is a debug build or a release build'
default: true
required: false
type: boolean
jobs:
build:
name: Build (${{ matrix.name }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- name: Linux
os: ubuntu-22.04
releaseArgs: --linux64
- name: macOS
os: macos-12
releaseArgs: --osx64
- name: Windows
os: windows-2022
releaseArgs: --win64
steps:
- uses: actions/checkout@v3
- name: Cache NW.js
uses: actions/cache@v3
with:
path: cache/
key: ${{ runner.os }}-${{ hashFiles('gulpfile.js') }}
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: yarn
- run: yarn install --immutable --immutable-cache --check-cache
- run: yarn gulp release ${{ matrix.releaseArgs }}
if: ${{ !inputs.debug_build }}
- run: yarn gulp debug-release ${{ matrix.releaseArgs }}
if: ${{ inputs.debug_build }}
- name: Publish build artifacts
uses: actions/upload-artifact@v3
with:
name: Betaflight-Blackbox-Explorer${{ inputs.debug_build == 'true' && '-Debug' || '' }}-${{ matrix.name }}
path: release/
retention-days: 90