-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create Build and Release workflows (#11)
- Loading branch information
Showing
1 changed file
with
85 additions
and
0 deletions.
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,85 @@ | ||
name: Build and release | ||
on: [push, pull_request] | ||
|
||
jobs: | ||
build_arythmatik: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
module: ["A-RYTH-MATIK"] | ||
firmware: ["Certainty", "Uncertainty"] | ||
|
||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@master | ||
|
||
- name: Setup Arduino CLI | ||
uses: arduino/[email protected] | ||
|
||
- name: Install platform | ||
run: | | ||
arduino-cli core update-index | ||
arduino-cli core install arduino:avr | ||
arduino-cli lib install "Adafruit GFX Library" | ||
arduino-cli lib install "Adafruit SSD1306" | ||
arduino-cli lib install SimpleRotary | ||
- name: Compile Sketch | ||
working-directory: ./${{ matrix.module}} | ||
run: | | ||
arduino-cli compile -v -b arduino:avr:nano ${{ matrix.firmware}} -e --output-dir=./build | ||
mkdir -p ./release && cp ./build/${{ matrix.firmware }}.ino.hex ./release/${{ matrix.module}}_${{ matrix.firmware }}.hex | ||
- name: Upload bin | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: release-artifacts | ||
path: ./${{ matrix.module}}/release/${{ matrix.module}}_${{ matrix.firmware }}.hex | ||
|
||
|
||
build_synclfo: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
module: ["SyncLFO"] | ||
firmware: ["ADSR", "Baby4", "GenerativeSequencer", "MultiModeEnv", "Polyrhythm"] | ||
|
||
steps: | ||
- name: Clone repo | ||
uses: actions/checkout@master | ||
|
||
- name: Setup Arduino CLI | ||
uses: arduino/[email protected] | ||
|
||
- name: Install platform | ||
run: | | ||
arduino-cli core update-index | ||
arduino-cli core install arduino:avr | ||
- name: Compile Sketch | ||
working-directory: ./${{ matrix.module}} | ||
run: | | ||
ARDUINO_DIRECTORIES_USER=$GITHUB_WORKSPACE/${{ matrix.module}} arduino-cli compile -v -b arduino:avr:nano ${{ matrix.firmware}} -e --output-dir=./build | ||
mkdir -p ./release && cp ./build/${{ matrix.firmware }}.ino.hex ./release/${{ matrix.module}}_${{ matrix.firmware }}.hex | ||
- name: Upload bin | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: release-artifacts | ||
path: ./${{ matrix.module}}/release/${{ matrix.module}}_${{ matrix.firmware }}.hex | ||
|
||
release: | ||
needs: [build_arythmatik, build_synclfo] | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/download-artifact@master | ||
with: | ||
name: release-artifacts | ||
path: releases/ | ||
|
||
- name: Create Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: releases/*.hex |