From 1217d5afc8ca79da90752113f221c30c1f038038 Mon Sep 17 00:00:00 2001 From: mangoiv Date: Sun, 3 Mar 2024 15:17:55 +0100 Subject: [PATCH 1/7] [feat] switch to new way of running github actions --- .github/workflows/build.yml | 87 ++----------------------------------- 1 file changed, 3 insertions(+), 84 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5cb429b..1103140 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,88 +1,7 @@ -name: Build +name: le_chiff_ble build -env: - config-path: zmk-config - -on: - push: - paths: - - ".github/workflows/build.yml" - - "zmk-config/**" - pull_request: - paths: - - ".github/workflows/build.yml" - - "zmk-config/**" - workflow_dispatch: +on: [push, pull_request, workflow_dispatch] jobs: build: - runs-on: ubuntu-20.04 - container: - image: zmkfirmware/zmk-build-arm:3.5-branch-20231114235846-3.5.0-0.16.3-6c450465d1dd-6870957618 - strategy: - fail-fast: false - matrix: - # List the firmware to build here. Each item use the following properties. - # board: (required) the board to build. - # shield: (optional) the shield to build. Omit for a standalone board. - # cmake-args: (optional) extra arguments to pass to CMake as a string. - include: - - board: le_chiff_ble - 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('${{ env.config-path }}/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 ${{ env.config-path }} - - 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}/${{ env.config-path }}" \ - ${{ matrix.cmake-args }} - # - name: Generated DTS file - # if: always() - # run: cat -n build/zephyr/${{ matrix.board }}.dts.pre.tmp - - name: Rename artifacts - run: | - mkdir build/artifacts - [ -f build/zephyr/zmk.hex ] && cp build/zephyr/zmk.hex "build/artifacts/${{ steps.variables.outputs.artifact-name }}.hex" - [ -f build/zephyr/zmk.uf2 ] && cp build/zephyr/zmk.uf2 "build/artifacts/${{ steps.variables.outputs.artifact-name }}.uf2" - - name: Archive artifacts - uses: actions/upload-artifact@v2 - with: - name: "${{ steps.variables.outputs.artifact-name }}" - path: build/artifacts + uses: zmkfirmware/zmk/.github/workflows/build-user-config.yml@main From c79730b2c4307555747c1623f8b8fc4e0456fc7c Mon Sep 17 00:00:00 2001 From: mangoiv Date: Sun, 3 Mar 2024 15:22:51 +0100 Subject: [PATCH 2/7] [feat] add build.yaml --- build.yaml | 1 + 1 file changed, 1 insertion(+) create mode 100644 build.yaml diff --git a/build.yaml b/build.yaml new file mode 100644 index 0000000..8718d45 --- /dev/null +++ b/build.yaml @@ -0,0 +1 @@ +board: [ "le_chiff_ble" ] From 01fd9fd0e5651b9dfac45073242a8d5a5a25ab3b Mon Sep 17 00:00:00 2001 From: mangoiv Date: Sun, 3 Mar 2024 15:25:30 +0100 Subject: [PATCH 3/7] [fix] rename config dir --- {zmk-config => config}/LICENSE | 0 {zmk-config => config}/boards/arm/le_chiff_ble/Kconfig | 0 {zmk-config => config}/boards/arm/le_chiff_ble/Kconfig.board | 0 {zmk-config => config}/boards/arm/le_chiff_ble/Kconfig.defconfig | 0 {zmk-config => config}/boards/arm/le_chiff_ble/README.md | 0 {zmk-config => config}/boards/arm/le_chiff_ble/board.cmake | 0 {zmk-config => config}/boards/arm/le_chiff_ble/le_chiff_ble.dts | 0 .../boards/arm/le_chiff_ble/le_chiff_ble.keymap | 0 {zmk-config => config}/boards/arm/le_chiff_ble/le_chiff_ble.yaml | 0 .../boards/arm/le_chiff_ble/le_chiff_ble_defconfig | 0 {zmk-config => config}/west.yml | 0 11 files changed, 0 insertions(+), 0 deletions(-) rename {zmk-config => config}/LICENSE (100%) rename {zmk-config => config}/boards/arm/le_chiff_ble/Kconfig (100%) rename {zmk-config => config}/boards/arm/le_chiff_ble/Kconfig.board (100%) rename {zmk-config => config}/boards/arm/le_chiff_ble/Kconfig.defconfig (100%) rename {zmk-config => config}/boards/arm/le_chiff_ble/README.md (100%) rename {zmk-config => config}/boards/arm/le_chiff_ble/board.cmake (100%) rename {zmk-config => config}/boards/arm/le_chiff_ble/le_chiff_ble.dts (100%) rename {zmk-config => config}/boards/arm/le_chiff_ble/le_chiff_ble.keymap (100%) rename {zmk-config => config}/boards/arm/le_chiff_ble/le_chiff_ble.yaml (100%) rename {zmk-config => config}/boards/arm/le_chiff_ble/le_chiff_ble_defconfig (100%) rename {zmk-config => config}/west.yml (100%) diff --git a/zmk-config/LICENSE b/config/LICENSE similarity index 100% rename from zmk-config/LICENSE rename to config/LICENSE diff --git a/zmk-config/boards/arm/le_chiff_ble/Kconfig b/config/boards/arm/le_chiff_ble/Kconfig similarity index 100% rename from zmk-config/boards/arm/le_chiff_ble/Kconfig rename to config/boards/arm/le_chiff_ble/Kconfig diff --git a/zmk-config/boards/arm/le_chiff_ble/Kconfig.board b/config/boards/arm/le_chiff_ble/Kconfig.board similarity index 100% rename from zmk-config/boards/arm/le_chiff_ble/Kconfig.board rename to config/boards/arm/le_chiff_ble/Kconfig.board diff --git a/zmk-config/boards/arm/le_chiff_ble/Kconfig.defconfig b/config/boards/arm/le_chiff_ble/Kconfig.defconfig similarity index 100% rename from zmk-config/boards/arm/le_chiff_ble/Kconfig.defconfig rename to config/boards/arm/le_chiff_ble/Kconfig.defconfig diff --git a/zmk-config/boards/arm/le_chiff_ble/README.md b/config/boards/arm/le_chiff_ble/README.md similarity index 100% rename from zmk-config/boards/arm/le_chiff_ble/README.md rename to config/boards/arm/le_chiff_ble/README.md diff --git a/zmk-config/boards/arm/le_chiff_ble/board.cmake b/config/boards/arm/le_chiff_ble/board.cmake similarity index 100% rename from zmk-config/boards/arm/le_chiff_ble/board.cmake rename to config/boards/arm/le_chiff_ble/board.cmake diff --git a/zmk-config/boards/arm/le_chiff_ble/le_chiff_ble.dts b/config/boards/arm/le_chiff_ble/le_chiff_ble.dts similarity index 100% rename from zmk-config/boards/arm/le_chiff_ble/le_chiff_ble.dts rename to config/boards/arm/le_chiff_ble/le_chiff_ble.dts diff --git a/zmk-config/boards/arm/le_chiff_ble/le_chiff_ble.keymap b/config/boards/arm/le_chiff_ble/le_chiff_ble.keymap similarity index 100% rename from zmk-config/boards/arm/le_chiff_ble/le_chiff_ble.keymap rename to config/boards/arm/le_chiff_ble/le_chiff_ble.keymap diff --git a/zmk-config/boards/arm/le_chiff_ble/le_chiff_ble.yaml b/config/boards/arm/le_chiff_ble/le_chiff_ble.yaml similarity index 100% rename from zmk-config/boards/arm/le_chiff_ble/le_chiff_ble.yaml rename to config/boards/arm/le_chiff_ble/le_chiff_ble.yaml diff --git a/zmk-config/boards/arm/le_chiff_ble/le_chiff_ble_defconfig b/config/boards/arm/le_chiff_ble/le_chiff_ble_defconfig similarity index 100% rename from zmk-config/boards/arm/le_chiff_ble/le_chiff_ble_defconfig rename to config/boards/arm/le_chiff_ble/le_chiff_ble_defconfig diff --git a/zmk-config/west.yml b/config/west.yml similarity index 100% rename from zmk-config/west.yml rename to config/west.yml From 62ae6ecc1d4809cfc33d5f61387be07eeaf6b3b1 Mon Sep 17 00:00:00 2001 From: microfortnight Date: Sun, 3 Mar 2024 00:24:40 +0100 Subject: [PATCH 4/7] Migrate to new nRF52 Pin Assignments --- .../boards/arm/le_chiff_ble/le_chiff_ble.dts | 22 +++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/config/boards/arm/le_chiff_ble/le_chiff_ble.dts b/config/boards/arm/le_chiff_ble/le_chiff_ble.dts index 02f0e37..9e73e1b 100644 --- a/config/boards/arm/le_chiff_ble/le_chiff_ble.dts +++ b/config/boards/arm/le_chiff_ble/le_chiff_ble.dts @@ -106,8 +106,9 @@ status = "okay"; compatible = "nordic,nrf-twi"; - sda-pin = <24>; - scl-pin = <22>; + pinctrl-0 = <&i2c0_default>; + pinctrl-1 = <&i2c0_sleep>; + pinctrl-names = "default", "sleep"; oled: ssd1306@3c { compatible = "solomon,ssd1306fb"; reg = <0x3c>; @@ -125,6 +126,23 @@ }; }; +&pinctrl { + i2c0_default: i2c0_default { + group1 { + psels = , + ; + }; + }; + + i2c0_sleep: i2c0_sleep { + group1 { + psels = , + ; + low-power-enable; + }; + }; +}; + &flash0 { /* * For more information, see: From 86613a9ba04b4e890a591902d0505bf6133933cb Mon Sep 17 00:00:00 2001 From: microfortnight Date: Sun, 3 Mar 2024 00:53:51 +0100 Subject: [PATCH 5/7] Apply SSD1306 OLED Inverse Refactor changes --- config/boards/arm/le_chiff_ble/Kconfig.defconfig | 4 ---- config/boards/arm/le_chiff_ble/le_chiff_ble.dts | 1 + 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/config/boards/arm/le_chiff_ble/Kconfig.defconfig b/config/boards/arm/le_chiff_ble/Kconfig.defconfig index b9f5538..d555f0a 100644 --- a/config/boards/arm/le_chiff_ble/Kconfig.defconfig +++ b/config/boards/arm/le_chiff_ble/Kconfig.defconfig @@ -42,10 +42,6 @@ config I2C config SSD1306 default y -config SSD1306_REVERSE_MODE - default y - - endif # ZMK_DISPLAY if LVGL diff --git a/config/boards/arm/le_chiff_ble/le_chiff_ble.dts b/config/boards/arm/le_chiff_ble/le_chiff_ble.dts index 9e73e1b..efbe870 100644 --- a/config/boards/arm/le_chiff_ble/le_chiff_ble.dts +++ b/config/boards/arm/le_chiff_ble/le_chiff_ble.dts @@ -123,6 +123,7 @@ com-invdir; com-sequential; prechargep = <0x22>; + inversion-on; }; }; From e4c6a1a41823c720e59d50f167fc08e729cd8c17 Mon Sep 17 00:00:00 2001 From: microfortnight Date: Sun, 3 Mar 2024 12:54:36 +0100 Subject: [PATCH 6/7] Add West Flash Support --- config/boards/arm/le_chiff_ble/board.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/config/boards/arm/le_chiff_ble/board.cmake b/config/boards/arm/le_chiff_ble/board.cmake index ccc9c43..dff900b 100644 --- a/config/boards/arm/le_chiff_ble/board.cmake +++ b/config/boards/arm/le_chiff_ble/board.cmake @@ -4,3 +4,4 @@ board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset") include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake) include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake) +include(${ZEPHYR_BASE}/boards/common/uf2.board.cmake) From 1f2f0176ffb3c4856977006a5efe67c604f9b275 Mon Sep 17 00:00:00 2001 From: Magnus Viernickel Date: Mon, 27 May 2024 13:50:46 +0200 Subject: [PATCH 7/7] [chore] run ci on every sunday - zmk breaks every now and then and it's super annoying for end users if they fork this and end up with a non-working CI job, I hope this makes it so that it's reported earlier --- .github/workflows/build.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1103140..0b4c7f3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,11 @@ name: le_chiff_ble build -on: [push, pull_request, workflow_dispatch] +on: + push: + pull_request: + workflow_dispatch: + schedule: + - cron: '0 0 * * 0' jobs: build: