diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/build.yml | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000000..74cb639bba --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,101 @@ +name: Build firmware +on: + push: + paths-ignore: + - '**.md' + +jobs: + build-default: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + keyboard: + - ergodox_ez + - ergodox_ez/shine + - ergodox_ez/glow + - moonlander + - planck/ez + - planck/ez/glow + keymap: + - default + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + persist-credentials: false + submodules: true + + - name: Build + id: build + run: | + TARGET="${{ matrix.keyboard }}" + + if [ -n "${{ matrix.keymap }}" ]; then + TARGET="${TARGET}:${{ matrix.keymap }}" + fi + + sed -i 's/run --rm -it/run --rm/' util/docker_build.sh + util/docker_build.sh ${TARGET} + + ls + + echo ::set-output name=artifact-name::${TARGET//[:<>|*?\\\/]/_} + echo "Artifact-name: ${{ steps.build.outputs.artifact-name }}" + + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: "${{ steps.build.outputs.artifact-name }}" + path: | + *.hex + *.bin + continue-on-error: true + + build-default: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + keyboard: + - ergodox_ez + - ergodox_ez/shine + - ergodox_ez/glow + - moonlander + - planck/ez + - planck/ez/glow + keymap: + - oryx + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 1 + persist-credentials: false + submodules: true + + - name: Build + id: build + run: | + TARGET="${{ matrix.keyboard }}" + + if [ -n "${{ matrix.keymap }}" ]; then + TARGET="${TARGET}:${{ matrix.keymap }}" + fi + + sed -i 's/run --rm -it/run --rm/' util/docker_build.sh + util/docker_build.sh ${TARGET} + + ls + + echo ::set-output name=artifact-name::${TARGET//[:<>|*?\\\/]/_} + echo "Artifact-name: ${{ steps.build.outputs.artifact-name }}" + + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: "${{ steps.build.outputs.artifact-name }}" + path: | + *.hex + *.bin + continue-on-error: true |