From 67540297f709abc7a0a4f5df052151ee0a8bfe73 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Mon, 17 Jul 2023 12:23:59 +0200 Subject: [PATCH 01/40] [CI] Upload Artifacts --- .gitea/workflows/build.yml | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 7a7a224..4a7a369 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -10,7 +10,7 @@ jobs: name: Build steps: - name: Install Dependencies - run: apt update; apt install -y nodejs ssh + run: apt update; apt install -y nodejs ssh zip - name: Setup Node uses: actions/setup-node@v3 - name: Checkout @@ -42,30 +42,20 @@ jobs: run: west build -s zmk/app -b nice_nano_v2 -- -DSHIELD=corne_left -DZMK_CONFIG="${GITHUB_WORKSPACE}/config" - name: Corne Left Kconfig file run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$" - # - name: Rename zmk.uf2 - # run: cp build/zephyr/zmk.uf2 corne_left_nice_nano_v2.uf2 - # - name: Archive (Corne Left) - # uses: https://github.com/actions/upload-artifact@v3 - # with: - # name: firmware - # path: corne_left_nice_nano_v2.uf2 + - name: Rename zmk.uf2 + run: cp build/zephyr/zmk.uf2 corne_left_nice_nano_v2.uf2 - name: West Build (Corne Right) run: west build --pristine -s zmk/app -b nice_nano_v2 -- -DSHIELD=corne_right -DZMK_CONFIG="${GITHUB_WORKSPACE}/config" - name: Corne Right Kconfig file run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$" - # - name: Rename zmk.uf2 - # run: cp build/zephyr/zmk.uf2 corne_right_nice_nano_v2.uf2 - # - name: Archive (Corne Right) - # uses: https://github.com/actions/upload-artifact@v3 - # with: - # name: firmware - # path: corne_right_nice_nano_v2.uf2 + - name: Rename zmk.uf2 + run: cp build/zephyr/zmk.uf2 corne_right_nice_nano_v2.uf2 - # - name: Upload artifacts as release - # uses: https://github.com/softprops/action-gh-release@v1 - # if: startsWith(github.ref, 'refs/tags/') - # with: - # files: | - # corne_left_nice_nano_v2.uf2 - # corne_right_nice_nano_v2.uf2 + - name: Create Zip Archive + run: zip firmware.zip corne_left_nice_nano_v2.uf2 corne_right_nice_nano_v2.uf2 + - name: Upload Artifacts + uses: actions/upload-artifact@v3 + with: + name: firmware.zip + path: firmware.zip From e70264c4492246f26347f8909b47211eb7cb209e Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Mon, 17 Jul 2023 12:26:05 +0200 Subject: [PATCH 02/40] [CI] use apt-get instead of aptt --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 4a7a369..2f9ef10 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -10,7 +10,7 @@ jobs: name: Build steps: - name: Install Dependencies - run: apt update; apt install -y nodejs ssh zip + run: apt-get update; apt-get install -y nodejs ssh zip - name: Setup Node uses: actions/setup-node@v3 - name: Checkout From 80708ca955b5eab2bd9cdcc728dda94ffe435f8b Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:10:26 +0200 Subject: [PATCH 03/40] [CI] cache west modules --- .gitea/workflows/build.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 2f9ef10..c049613 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -11,12 +11,15 @@ jobs: steps: - name: Install Dependencies run: apt-get update; apt-get install -y nodejs ssh zip + - name: Setup Node uses: actions/setup-node@v3 + - name: Checkout uses: actions/checkout@v3 + - name: Cache west modules - uses: https://github.com/actions/cache@v2 + uses: actions/cache@v3 env: cache-name: cache-zephyr-modules with: @@ -31,29 +34,37 @@ jobs: ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- ${{ runner.os }}- + - name: West Init run: west init -l config + - name: West Update run: west update + - name: West Zephyr export run: west zephyr-export - name: West Build (Corne Left) run: west build -s zmk/app -b nice_nano_v2 -- -DSHIELD=corne_left -DZMK_CONFIG="${GITHUB_WORKSPACE}/config" + - name: Corne Left Kconfig file run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$" + - name: Rename zmk.uf2 run: cp build/zephyr/zmk.uf2 corne_left_nice_nano_v2.uf2 - name: West Build (Corne Right) run: west build --pristine -s zmk/app -b nice_nano_v2 -- -DSHIELD=corne_right -DZMK_CONFIG="${GITHUB_WORKSPACE}/config" + - name: Corne Right Kconfig file run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$" + - name: Rename zmk.uf2 run: cp build/zephyr/zmk.uf2 corne_right_nice_nano_v2.uf2 - name: Create Zip Archive run: zip firmware.zip corne_left_nice_nano_v2.uf2 corne_right_nice_nano_v2.uf2 + - name: Upload Artifacts uses: actions/upload-artifact@v3 with: From 82eaf0cc1cf6e66f939e265fd511264681366450 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Mon, 17 Jul 2023 16:25:48 +0200 Subject: [PATCH 04/40] [CI] downgrade cache action --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index c049613..dd83112 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -19,7 +19,7 @@ jobs: uses: actions/checkout@v3 - name: Cache west modules - uses: actions/cache@v3 + uses: actions/cache@v2 env: cache-name: cache-zephyr-modules with: From 734f8d9afd5e56cb0c062681d2d121890f388503 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:11:24 +0200 Subject: [PATCH 05/40] [CI] enable debugging --- .gitea/workflows/build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index dd83112..2b3bc3b 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -2,6 +2,9 @@ on: [push, pull_request, workflow_dispatch] name: Build +env: + ACTIONS_STEP_DEBUG: true + jobs: build: runs-on: ubuntu-latest @@ -19,7 +22,7 @@ jobs: uses: actions/checkout@v3 - name: Cache west modules - uses: actions/cache@v2 + uses: actions/cache@v3 env: cache-name: cache-zephyr-modules with: From 750ea8ae94adaa4a94d46933b7325001eae9abd5 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:14:49 +0200 Subject: [PATCH 06/40] [CI] disable caching --- .gitea/workflows/build.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 2b3bc3b..434b291 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -21,22 +21,22 @@ jobs: - name: Checkout uses: actions/checkout@v3 - - name: Cache west modules - uses: actions/cache@v3 - env: - cache-name: cache-zephyr-modules - with: - path: | - modules/ - tools/ - zephyr/ - bootloader/ - zmk/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('manifest-dir/west.yml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- + # - name: Cache west modules + # uses: actions/cache@v3 + # env: + # cache-name: cache-zephyr-modules + # with: + # path: | + # modules/ + # tools/ + # zephyr/ + # bootloader/ + # zmk/ + # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('manifest-dir/west.yml') }} + # restore-keys: | + # ${{ runner.os }}-build-${{ env.cache-name }}- + # ${{ runner.os }}-build- + # ${{ runner.os }}- - name: West Init run: west init -l config From 65e05d50159537d053e6cd14cd0df6ed019f580a Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:34:22 +0200 Subject: [PATCH 07/40] [CI] hope.. --- .gitea/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 434b291..56a9d02 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -73,3 +73,4 @@ jobs: with: name: firmware.zip path: firmware.zip + if-no-files-found: ignore From dcf545b708c50d925a4627d0e4ca06b867e5359f Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Mon, 17 Jul 2023 17:54:05 +0200 Subject: [PATCH 08/40] [CI] don't setup nodejs --- .gitea/workflows/build.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 56a9d02..ed611b6 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -13,10 +13,12 @@ jobs: name: Build steps: - name: Install Dependencies - run: apt-get update; apt-get install -y nodejs ssh zip + run: | + apt-get update; + apt-get install --yes --no-install-recommends nodejs ssh zip - - name: Setup Node - uses: actions/setup-node@v3 + # - name: Setup Node + # uses: actions/setup-node@v3 - name: Checkout uses: actions/checkout@v3 From fc3b06d87f3dbbf2ee73e07c7cd70facf5e3c23f Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Mon, 17 Jul 2023 18:13:50 +0200 Subject: [PATCH 09/40] [CI] Don't zip the files before uploading --- .gitea/workflows/build.yml | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index ed611b6..5c801d7 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -17,29 +17,9 @@ jobs: apt-get update; apt-get install --yes --no-install-recommends nodejs ssh zip - # - name: Setup Node - # uses: actions/setup-node@v3 - - name: Checkout uses: actions/checkout@v3 - # - name: Cache west modules - # uses: actions/cache@v3 - # env: - # cache-name: cache-zephyr-modules - # with: - # path: | - # modules/ - # tools/ - # zephyr/ - # bootloader/ - # zmk/ - # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('manifest-dir/west.yml') }} - # restore-keys: | - # ${{ runner.os }}-build-${{ env.cache-name }}- - # ${{ runner.os }}-build- - # ${{ runner.os }}- - - name: West Init run: west init -l config @@ -67,12 +47,10 @@ jobs: - name: Rename zmk.uf2 run: cp build/zephyr/zmk.uf2 corne_right_nice_nano_v2.uf2 - - name: Create Zip Archive - run: zip firmware.zip corne_left_nice_nano_v2.uf2 corne_right_nice_nano_v2.uf2 - - name: Upload Artifacts uses: actions/upload-artifact@v3 with: name: firmware.zip - path: firmware.zip if-no-files-found: ignore + path: | + *.uf2 From 8062f0ac6c911c67ed8e9a346b1c71707f3b149e Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:39:47 +0200 Subject: [PATCH 10/40] [CI] Zip files before uploading; instatll openssl and ca-ertificates --- .gitea/workflows/build.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 5c801d7..3f4699b 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -15,7 +15,11 @@ jobs: - name: Install Dependencies run: | apt-get update; - apt-get install --yes --no-install-recommends nodejs ssh zip + apt-get install --yes --no-install-recommends \ + nodejs \ + zip \ + openssl \ + ca-certificates - name: Checkout uses: actions/checkout@v3 @@ -46,11 +50,12 @@ jobs: - name: Rename zmk.uf2 run: cp build/zephyr/zmk.uf2 corne_right_nice_nano_v2.uf2 + + - name: Zip Artifacts + run: zip firmware.zip corne_left_nice_nano_v2.uf2 corne_right_nice_nano_v2.uf2 - - name: Upload Artifacts + - name: Upload Artifact uses: actions/upload-artifact@v3 with: - name: firmware.zip + path: firmware.zip if-no-files-found: ignore - path: | - *.uf2 From 812284df38d98401a8e768de6ae62be7fd3ed596 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:42:31 +0200 Subject: [PATCH 11/40] [CI] Test in a more controlled setting --- .gitea/workflows/test.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .gitea/workflows/test.yml diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..8eb18b8 --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,29 @@ +on: [push, pull_request, workflow_dispatch] + +name: Test + +jobs: + build: + runs-on: ubuntu-latest + container: + image: zmkfirmware/zmk-build-arm:stable + name: Build + steps: + - name: Install Dependencies + run: | + apt-get update; + apt-get install --yes --no-install-recommends \ + nodejs \ + ca-certificates + + - name: Checkout + uses: actions/checkout@v3 + + - name: Create some File + run: echo "lalala" > test.txt + + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + path: test.txt + if-no-files-found: ignore From 990395c44f843f6963748ea22f2e649dc68007cf Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:49:13 +0200 Subject: [PATCH 12/40] [CI] cleanup --- .gitea/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 3f4699b..c77d3c0 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -2,9 +2,6 @@ on: [push, pull_request, workflow_dispatch] name: Build -env: - ACTIONS_STEP_DEBUG: true - jobs: build: runs-on: ubuntu-latest From 600c3d1fed3ce6d1a798996b2b36652b48620d92 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:50:06 +0200 Subject: [PATCH 13/40] [CI] Test with the QMK Container --- .gitea/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 8eb18b8..3e4e212 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -6,7 +6,7 @@ jobs: build: runs-on: ubuntu-latest container: - image: zmkfirmware/zmk-build-arm:stable + image: ghcr.io/qmk/qmk_base_container:latest name: Build steps: - name: Install Dependencies From 9f17a83561b0332f3a11727b77cb22dfdd9ba503 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:51:55 +0200 Subject: [PATCH 14/40] [CI] Try with zmk-build-arm:3.2 container --- .gitea/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 3e4e212..41b7bd2 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -6,7 +6,7 @@ jobs: build: runs-on: ubuntu-latest container: - image: ghcr.io/qmk/qmk_base_container:latest + image: zmkfirmware/zmk-build-arm:3.2 name: Build steps: - name: Install Dependencies From f956e1d0535df97f737c0aad3a3e950fb07dbcf3 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Tue, 18 Jul 2023 15:56:10 +0200 Subject: [PATCH 15/40] [CI] try one more tag --- .gitea/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 41b7bd2..88465b2 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -6,7 +6,7 @@ jobs: build: runs-on: ubuntu-latest container: - image: zmkfirmware/zmk-build-arm:3.2 + image: zmkfirmware/zmk-build-arm:3.2-branch name: Build steps: - name: Install Dependencies From c521a712fc4b3294a994f531db9c33fa18b01a11 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Tue, 18 Jul 2023 16:03:57 +0200 Subject: [PATCH 16/40] [CI] rely on integrated nodejs --- .gitea/workflows/test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 88465b2..ace8ce2 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -12,9 +12,7 @@ jobs: - name: Install Dependencies run: | apt-get update; - apt-get install --yes --no-install-recommends \ - nodejs \ - ca-certificates + apt-get upgrade --yes - name: Checkout uses: actions/checkout@v3 From 783e6bf234cd105289d0051d34a1985515136ede Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Tue, 18 Jul 2023 16:04:44 +0200 Subject: [PATCH 17/40] [CI] define artifact filename --- .gitea/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index ace8ce2..25e90ca 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -24,4 +24,5 @@ jobs: uses: actions/upload-artifact@v3 with: path: test.txt + name: test.txt if-no-files-found: ignore From 109326adc6461919671875ddac6405f7b8844e57 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Tue, 18 Jul 2023 16:05:57 +0200 Subject: [PATCH 18/40] [CI] install nodejs --- .gitea/workflows/test.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 25e90ca..9fd57c8 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -13,6 +13,8 @@ jobs: run: | apt-get update; apt-get upgrade --yes + apt-get install --yes --no-install-recommends \ + nodejs - name: Checkout uses: actions/checkout@v3 From 43da84896d7fac00e3d03d085a19178ee7e3ecd7 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Tue, 18 Jul 2023 16:29:40 +0200 Subject: [PATCH 19/40] [CI] Try a 3rd party container --- .gitea/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml index 9fd57c8..67776dd 100644 --- a/.gitea/workflows/test.yml +++ b/.gitea/workflows/test.yml @@ -6,7 +6,7 @@ jobs: build: runs-on: ubuntu-latest container: - image: zmkfirmware/zmk-build-arm:3.2-branch + image: ghcr.io/bcdevices/zephyr:latest name: Build steps: - name: Install Dependencies From e2f294d402f7284efb79cdf2822d1ee85c0bc105 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Wed, 19 Jul 2023 16:43:44 +0200 Subject: [PATCH 20/40] [CI] Use 3rd party image for the build and remove test action --- .gitea/workflows/build.yml | 7 ++----- .gitea/workflows/test.yml | 30 ------------------------------ 2 files changed, 2 insertions(+), 35 deletions(-) delete mode 100644 .gitea/workflows/test.yml diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index c77d3c0..bf6c50e 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -6,17 +6,14 @@ jobs: build: runs-on: ubuntu-latest container: - image: zmkfirmware/zmk-build-arm:stable + image: ghcr.io/bcdevices/zephyr:latest name: Build steps: - name: Install Dependencies run: | apt-get update; apt-get install --yes --no-install-recommends \ - nodejs \ - zip \ - openssl \ - ca-certificates + nodejs - name: Checkout uses: actions/checkout@v3 diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml deleted file mode 100644 index 67776dd..0000000 --- a/.gitea/workflows/test.yml +++ /dev/null @@ -1,30 +0,0 @@ -on: [push, pull_request, workflow_dispatch] - -name: Test - -jobs: - build: - runs-on: ubuntu-latest - container: - image: ghcr.io/bcdevices/zephyr:latest - name: Build - steps: - - name: Install Dependencies - run: | - apt-get update; - apt-get upgrade --yes - apt-get install --yes --no-install-recommends \ - nodejs - - - name: Checkout - uses: actions/checkout@v3 - - - name: Create some File - run: echo "lalala" > test.txt - - - name: Upload Artifact - uses: actions/upload-artifact@v3 - with: - path: test.txt - name: test.txt - if-no-files-found: ignore From afa8c476bbf8c62a72720faddd7902d1ee1a9aef Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Wed, 19 Jul 2023 16:53:49 +0200 Subject: [PATCH 21/40] [CI] name the artifact file --- .gitea/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index bf6c50e..7cc7dde 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -52,4 +52,5 @@ jobs: uses: actions/upload-artifact@v3 with: path: firmware.zip + name: firmware.zip if-no-files-found: ignore From fb2124d0edc22f9deb82fd411e23bb46187697b5 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Wed, 19 Jul 2023 16:54:15 +0200 Subject: [PATCH 22/40] [CI] Don't update west --- .gitea/workflows/build.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 7cc7dde..c7293af 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -21,9 +21,6 @@ jobs: - name: West Init run: west init -l config - - name: West Update - run: west update - - name: West Zephyr export run: west zephyr-export From 801353c2493c96adc7720fe2acf816aa160653df Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Wed, 19 Jul 2023 16:55:41 +0200 Subject: [PATCH 23/40] [CI] don't zip artifacts --- .gitea/workflows/build.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index c7293af..00f1077 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -41,13 +41,10 @@ jobs: - name: Rename zmk.uf2 run: cp build/zephyr/zmk.uf2 corne_right_nice_nano_v2.uf2 - - - name: Zip Artifacts - run: zip firmware.zip corne_left_nice_nano_v2.uf2 corne_right_nice_nano_v2.uf2 - name: Upload Artifact uses: actions/upload-artifact@v3 with: - path: firmware.zip - name: firmware.zip + path: | + *.uf2 if-no-files-found: ignore From 0e11f06ca7bd6f00b02e87389223732060326c36 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Wed, 19 Jul 2023 17:04:33 +0200 Subject: [PATCH 24/40] Revert "[CI] Don't update west" This reverts commit fb2124d0edc22f9deb82fd411e23bb46187697b5. --- .gitea/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 00f1077..566ac27 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -21,6 +21,9 @@ jobs: - name: West Init run: west init -l config + - name: West Update + run: west update + - name: West Zephyr export run: west zephyr-export From 28757d7b2674a154fef6462024fa125feb127e1e Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Wed, 19 Jul 2023 17:06:53 +0200 Subject: [PATCH 25/40] [CI] cache west modules --- .gitea/workflows/build.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 566ac27..c74a0bf 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -18,6 +18,24 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Cache west modules + uses: actions/cache@v3 + env: + cache-name: cache-zephyr-modules + with: + path: | + modules/ + tools/ + zephyr/ + bootloader/ + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + timeout-minutes: 2 + continue-on-error: true + - name: West Init run: west init -l config From b981cbcf1e08a4d9024f3f2cd6cf69f9d4cd3842 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Wed, 19 Jul 2023 17:13:34 +0200 Subject: [PATCH 26/40] Revert "[CI] don't zip artifacts" This reverts commit 801353c2493c96adc7720fe2acf816aa160653df. --- .gitea/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index c74a0bf..8d98ba9 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -62,10 +62,13 @@ jobs: - name: Rename zmk.uf2 run: cp build/zephyr/zmk.uf2 corne_right_nice_nano_v2.uf2 + + - name: Zip Artifacts + run: zip firmware.zip corne_left_nice_nano_v2.uf2 corne_right_nice_nano_v2.uf2 - name: Upload Artifact uses: actions/upload-artifact@v3 with: - path: | - *.uf2 + path: firmware.zip + name: firmware.zip if-no-files-found: ignore From e17b5743ec3f725531533c9082d3729e818a36ee Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Wed, 19 Jul 2023 17:24:10 +0200 Subject: [PATCH 27/40] [CI] simplify cache step --- .gitea/workflows/build.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 8d98ba9..b08708c 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -28,11 +28,7 @@ jobs: tools/ zephyr/ bootloader/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }} - restore-keys: | - ${{ runner.os }}-build-${{ env.cache-name }}- - ${{ runner.os }}-build- - ${{ runner.os }}- + key: ${{ hashFiles('app/west.yml') }} timeout-minutes: 2 continue-on-error: true From 4c1391fd18d1879308f52620a1fe3fa693e009d3 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Wed, 19 Jul 2023 17:38:47 +0200 Subject: [PATCH 28/40] Revert "[CI] simplify cache step" This reverts commit e17b5743ec3f725531533c9082d3729e818a36ee. --- .gitea/workflows/build.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index b08708c..8d98ba9 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -28,7 +28,11 @@ jobs: tools/ zephyr/ bootloader/ - key: ${{ hashFiles('app/west.yml') }} + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- timeout-minutes: 2 continue-on-error: true From dbc707eca2b2b1139e9eb115ea743afd5e0e628b Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Wed, 19 Jul 2023 17:39:22 +0200 Subject: [PATCH 29/40] [CI] praying again --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 8d98ba9..4395906 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -28,7 +28,7 @@ jobs: tools/ zephyr/ bootloader/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }} + key: "${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}" restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- From d6afe8ca16c5861a51e9a9800144d66be4538abd Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Wed, 19 Jul 2023 17:42:32 +0200 Subject: [PATCH 30/40] Revert "[CI] praying again" This reverts commit dbc707eca2b2b1139e9eb115ea743afd5e0e628b. --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 4395906..8d98ba9 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -28,7 +28,7 @@ jobs: tools/ zephyr/ bootloader/ - key: "${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }}" + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }} restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- From 2cd9d3031f4c4686c2548a46a3c67549e9564def Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Wed, 19 Jul 2023 17:56:15 +0200 Subject: [PATCH 31/40] [CI] replace 'hashFiles' with actions/go-hashfiles --- .gitea/workflows/build.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 8d98ba9..f59b3e6 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -18,6 +18,13 @@ jobs: - name: Checkout uses: actions/checkout@v3 + - name: Hash west module + uses: https://gitea.com/actions/go-hashfiles@v0.0.1 + id: hash-west + with: + patterns: |- + app/west.yml + - name: Cache west modules uses: actions/cache@v3 env: @@ -28,7 +35,7 @@ jobs: tools/ zephyr/ bootloader/ - key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('app/west.yml') }} + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ steps.hash-west.outputs.hash }} restore-keys: | ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- From 64fa7e3bcb9f2a3cef3cac8713322bbea95b1e6c Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+Sporqist@users.noreply.github.com> Date: Wed, 19 Jul 2023 17:59:01 +0200 Subject: [PATCH 32/40] [CI] install go --- .gitea/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index f59b3e6..4e6f76e 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -13,7 +13,8 @@ jobs: run: | apt-get update; apt-get install --yes --no-install-recommends \ - nodejs + nodejs \ + golang-go - name: Checkout uses: actions/checkout@v3 From 2b39c6fec76eb7091e36fa87db17f323ed1efc74 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer Date: Wed, 19 Jul 2023 18:20:57 +0000 Subject: [PATCH 33/40] [CI] try globbing for west.yml --- .gitea/workflows/build.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 4e6f76e..fd47f33 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -23,8 +23,7 @@ jobs: uses: https://gitea.com/actions/go-hashfiles@v0.0.1 id: hash-west with: - patterns: |- - app/west.yml + patterns: '**west.yml' - name: Cache west modules uses: actions/cache@v3 From 6693b7040585392362e27398ea7e842749866db9 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer Date: Thu, 20 Jul 2023 09:31:48 +0000 Subject: [PATCH 34/40] [CI] don't ignore missing artifact files --- .gitea/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index fd47f33..59dc658 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -78,4 +78,3 @@ jobs: with: path: firmware.zip name: firmware.zip - if-no-files-found: ignore From 71d0d5b92f8d5424c611c2bec19593032de1bcbc Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer Date: Thu, 20 Jul 2023 14:43:11 +0000 Subject: [PATCH 35/40] [CI] install zstd for cache compression --- .gitea/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 59dc658..cd89502 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -14,7 +14,8 @@ jobs: apt-get update; apt-get install --yes --no-install-recommends \ nodejs \ - golang-go + golang-go \ + zstd - name: Checkout uses: actions/checkout@v3 From f7dc7174e69722dec4840555fe5b4d171e00593e Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer Date: Thu, 20 Jul 2023 14:51:32 +0000 Subject: [PATCH 36/40] [CI] increase cache timeout --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index cd89502..d4ac370 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -41,7 +41,7 @@ jobs: ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- ${{ runner.os }}- - timeout-minutes: 2 + timeout-minutes: 15 continue-on-error: true - name: West Init From 4b3d523f8dc1d685d3bc7904de0ecaafdd34c9da Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer Date: Thu, 20 Jul 2023 16:26:41 +0000 Subject: [PATCH 37/40] [CI] set a reasonable cache timeout --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index d4ac370..2ce82ec 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -41,7 +41,7 @@ jobs: ${{ runner.os }}-build-${{ env.cache-name }}- ${{ runner.os }}-build- ${{ runner.os }}- - timeout-minutes: 15 + timeout-minutes: 5 continue-on-error: true - name: West Init From 00a6aa0482f11ff252203ea5c1c98b229d54aae4 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+sporqist@users.noreply.github.com> Date: Thu, 20 Jul 2023 19:57:06 +0000 Subject: [PATCH 38/40] [CI] get rid of go dependency --- .gitea/workflows/build.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 2ce82ec..017ed06 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -14,17 +14,16 @@ jobs: apt-get update; apt-get install --yes --no-install-recommends \ nodejs \ - golang-go \ zstd - name: Checkout uses: actions/checkout@v3 - name: Hash west module - uses: https://gitea.com/actions/go-hashfiles@v0.0.1 id: hash-west - with: - patterns: '**west.yml' + run: | + HASH=$(sha256sum config/west.yml) + echo "hash=$HASH" >> "$GITHUB_OUTPUT" - name: Cache west modules uses: actions/cache@v3 @@ -70,7 +69,7 @@ jobs: - name: Rename zmk.uf2 run: cp build/zephyr/zmk.uf2 corne_right_nice_nano_v2.uf2 - + - name: Zip Artifacts run: zip firmware.zip corne_left_nice_nano_v2.uf2 corne_right_nice_nano_v2.uf2 From 85a61106621ebaabd7e397e2d1d3aebcec84904a Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+sporqist@users.noreply.github.com> Date: Thu, 20 Jul 2023 20:00:11 +0000 Subject: [PATCH 39/40] [CI] output hash --- .gitea/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 017ed06..86d9edb 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -24,6 +24,7 @@ jobs: run: | HASH=$(sha256sum config/west.yml) echo "hash=$HASH" >> "$GITHUB_OUTPUT" + echo "computed hash: $HASH" - name: Cache west modules uses: actions/cache@v3 From 0177f28427ba161a8892e9833ad8d974a1e0fa51 Mon Sep 17 00:00:00 2001 From: Marius Alwan Meyer <22202402+sporqist@users.noreply.github.com> Date: Thu, 20 Jul 2023 20:05:09 +0000 Subject: [PATCH 40/40] [CI] strip sha256 output --- .gitea/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 86d9edb..fcacbc2 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -22,7 +22,7 @@ jobs: - name: Hash west module id: hash-west run: | - HASH=$(sha256sum config/west.yml) + HASH=$(sha256sum config/west.yml | head -c 64) echo "hash=$HASH" >> "$GITHUB_OUTPUT" echo "computed hash: $HASH"