Implement Build Workflows

This commit is contained in:
GHOSCHT 2021-06-30 10:09:24 +02:00
parent 0cd8abb897
commit 99ea9c2b55
5 changed files with 62 additions and 83 deletions

26
.github/workflows/Electron.yml vendored Normal file
View file

@ -0,0 +1,26 @@
name: Electron Build
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: cd Dashboard && yarn --network-timeout 1000000000
- name: Build
run: cd Dashboard && yarn build

36
.github/workflows/PlatformIO.yml vendored Normal file
View file

@ -0,0 +1,36 @@
name: PlatformIO CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache pip
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v2
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v2
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- name: Build console
run: pio run --environment console --project-dir "./Arduino/Console"
- name: Build control
run: pio run --environment control --project-dir "./Arduino/Control"

View file

@ -1,19 +0,0 @@
name: Arduino Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run arduino-builder
uses: Legion2/arduino-builder-action@v2.0.0
with:
sketch: ./Arduino/ArduinoControl.ino

View file

@ -1,37 +0,0 @@
name: Dashboard Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: cd Dashboard && yarn --network-timeout 1000000000
- name: Package for Windows
run: cd Dashboard && yarn pack:win
- name: Upload installer
uses: actions/upload-artifact@v2
with:
name: LightControl-Setup
path: Dashboard/dist/LightControl-Setup.exe
- name: Upload portable files
uses: actions/upload-artifact@v2
with:
name: LightControl-Portable
path: Dashboard/dist/win-unpacked

View file

@ -1,27 +0,0 @@
name: Dashboard Lint
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
lint:
runs-on: windows-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: cd Dashboard && yarn --network-timeout 1000000000
- name: Lint
run: cd Dashboard && yarn lint