-
-
Notifications
You must be signed in to change notification settings - Fork 859
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
98 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
# Builds Betaflight Configurator on Windows, Android, Linux and macOS platforms. | ||
# | ||
# After building, artifacts are released to a seperate repository. | ||
|
||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- '*-maintenance' | ||
pull_request: | ||
branches: | ||
- master | ||
- '*-maintenance' | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: yarn | ||
|
||
- run: yarn install --immutable --immutable-cache --check-cache | ||
|
||
- name: Run unit tests | ||
run: yarn test | ||
|
||
- name: Publish Unit Test Results | ||
uses: EnricoMi/publish-unit-test-result-action@043296c976c53f4536194ebe3841ed720e04d496 # v1.26 | ||
if: always() | ||
with: | ||
files: test-results-junit/**/*.xml | ||
comment_mode: 'off' | ||
|
||
build: | ||
name: Build (${{ matrix.name }}) | ||
needs: test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
include: | ||
- name: Android | ||
os: ubuntu-20.04 | ||
releaseArgs: --android | ||
|
||
- name: Linux | ||
os: ubuntu-20.04 | ||
releaseArgs: --linux64 | ||
|
||
- name: macOS | ||
os: macos-11 | ||
releaseArgs: --osx64 | ||
|
||
- name: Windows | ||
os: windows-2022 | ||
releaseArgs: --win64 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache NW.js | ||
uses: actions/cache@v2 | ||
with: | ||
path: cache/ | ||
key: ${{ runner.os }}-${{ hashFiles('cache/**') }} | ||
|
||
- name: Install Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: yarn | ||
|
||
- name: Install Java JDK 8 | ||
uses: actions/setup-java@v2 | ||
if: ${{ matrix.name == 'Android' }} | ||
with: | ||
distribution: temurin | ||
java-version: '8' | ||
|
||
- run: yarn install --immutable --immutable-cache --check-cache | ||
|
||
# - run: yarn gulp release ${{ matrix.releaseArgs }} | ||
- run: yarn gulp debug-release ${{ matrix.releaseArgs }} | ||
|
||
- name: Publish build artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: Betaflight-Configurator-${{ matrix.name }} | ||
path: release/ | ||
retention-days: 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters