aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorJack <[email protected]>2021-03-15 13:56:32 -0600
committerJack <[email protected]>2021-03-15 13:56:32 -0600
commitc58028f1a0e50f6916e81039a15126795bd0f395 (patch)
tree5e6c8317bbe7ebaa58e88ed659f5255f6bdbff37 /.github/workflows
parentab874c451f2a7d0738c8ddd15eaa30e5178754a4 (diff)
downloadzmk_build-c58028f1a0e50f6916e81039a15126795bd0f395.tar.gz
zmk_build-c58028f1a0e50f6916e81039a15126795bd0f395.zip
Initialize ZMK config
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build.yml78
1 files changed, 78 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
new file mode 100644
index 0000000..3df16e5
--- /dev/null
+++ b/.github/workflows/build.yml
@@ -0,0 +1,78 @@
+name: Build
+on:
+ - push
+ - pull_request
+ - workflow_dispatch
+jobs:
+ build:
+ runs-on: ubuntu-20.04
+ container:
+ image: zmkfirmware/zmk-build-arm:2.4
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - shield: corne_left
+ board: nice_nano
+ - shield: corne_right
+ board: nice_nano
+ - shield: microdox_left
+ board: nice_nano
+ - shield: microdox_right
+ board: nice_nano
+ - shield: qaz
+ board: nice_nano
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v2
+ - name: Cache west modules
+ uses: actions/cache@v2
+ env:
+ cache-name: cache-zephyr-modules
+ with:
+ path: |
+ bootloader/
+ modules/
+ tools/
+ zephyr/
+ zmk/
+ key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('config/west.yml') }}
+ restore-keys: |
+ ${{ runner.os }}-build-${{ env.cache-name }}-
+ ${{ runner.os }}-build-
+ ${{ runner.os }}-
+ timeout-minutes: 2
+ continue-on-error: true
+ - name: Initialize workspace (west init)
+ run: west init -l config
+ - name: Update modules (west update)
+ run: west update
+ - name: Export Zephyr CMake package (west zephyr-export)
+ run: west zephyr-export
+ - name: Prepare variables
+ id: variables
+ run: |
+ if [ -n "${{ matrix.shield }}" ]; then
+ SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
+ ARTIFACT_NAME="${{ matrix.shield }}-${{ matrix.board }}-zmk"
+ else
+ SHIELD_ARG=
+ ARTIFACT_NAME="${{ matrix.board }}-zmk"
+ fi
+
+ echo ::set-output name=shield-arg::${SHIELD_ARG}
+ echo ::set-output name=artifact-name::${ARTIFACT_NAME}
+ - name: Build (west build)
+ run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }}
+ -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
+ - name: Generated DTS file
+ if: always()
+ run: cat -n build/zephyr/${{ matrix.board }}.dts.pre.tmp
+ - name: Archive artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ steps.variables.outputs.artifact-name }}
+ path: |
+ build/zephyr/zmk.hex
+ build/zephyr/zmk.uf2
+ continue-on-error: true