Skip to content

Commit

Permalink
Merge pull request qmk#25 from ilc/vial
Browse files Browse the repository at this point in the history
Fixes for build breaks, adding CI/CD for PRs.
  • Loading branch information
morganvenable committed Apr 6, 2024
2 parents 5971b9b + 5249e91 commit cd29b9a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 7 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/build-firmware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,43 @@ jobs:
container: ghcr.io/qmk/qmk_cli

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout code - Non PR
uses: actions/checkout@v4
if: ${{ needs.pr-check.outputs.number == 'null' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.ref }}
fetch-depth: 0
submodules: 'recursive'

- name: Checkout code - PR
uses: actions/checkout@v4
if: ${{ needs.pr-check.outputs.number != 'null' }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
submodules: 'recursive'

- name: Get tag version
if: ${{ needs.pr-check.outputs.number == 'null' }}
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}

- name: Build firmware
id: build_firmware
run: |
git config --global --add safe.directory '*'
make ${{ inputs.keyboard }}/${{ inputs.side }}:${{ inputs.keymap }}
shell: bash

- name: Move file into position
id: move_file
if: ${{ startsWith(github.ref, 'refs/tags/') }}
run: |
KEYBOARD_NAME="${{ inputs.keyboard }}"
KEYBOARD_NAME="${KEYBOARD_NAME//\//_}"
FILE_NAME="${KEYBOARD_NAME}${DOWNKEY}_${{ inputs.side }}_${{ inputs.keymap }}_${{ steps.get_version.outputs.VERSION }}.uf2"
git config --global --add safe.directory '*'
make ${{ inputs.keyboard }}/${{ inputs.side }}:${{ inputs.keymap }}
mv ${KEYBOARD_NAME}_${{ inputs.side }}_${{ inputs.keymap }}.uf2 "$FILE_NAME"
echo "::set-output name=file_name::$FILE_NAME"
shell: bash
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
push:
tags:
- 'v*'
pull_request_target:
types: [opened, synchronize, reopened]


permissions: write-all

Expand All @@ -16,6 +19,6 @@ jobs:
side: ${{ matrix.side }}
strategy:
matrix:
keyboard: [ svalboard/trackpoint, svalboard, svalboard/trackball ]
keyboard: [ svalboard/trackpoint, svalboard, svalboard/trackball, svalboard/ballpoint, svalboard/pointball ]
keymap: [ vial ]
side: [ left, right ]
2 changes: 1 addition & 1 deletion keyboards/svalboard/ballpoint/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

// Pointing device stuff
#define SPLIT_POINTING_ENABLE
#define POINTING_DEVICE_LEFT
#define POINTING_DEVICE_COMBINED
#define POINTING_DEVICE_AUTO_MOUSE_MH_ENABLE

#if defined(POINTING_DEVICE_IS_PIMORONI)
Expand Down
2 changes: 1 addition & 1 deletion keyboards/svalboard/pointball/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

// Pointing device stuff
#define SPLIT_POINTING_ENABLE
#define POINTING_DEVICE_RIGHT
#define POINTING_DEVICE_COMBINED
#define POINTING_DEVICE_AUTO_MOUSE_MH_ENABLE

#if defined(POINTING_DEVICE_IS_PIMORONI)
Expand Down

0 comments on commit cd29b9a

Please sign in to comment.