2024-08-15 07:21:17 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
2024-08-15 06:49:07 +00:00
|
|
|
|
2024-08-15 06:59:00 +00:00
|
|
|
name: Build
|
2024-08-15 06:49:07 +00:00
|
|
|
|
2024-08-09 17:20:17 +00:00
|
|
|
jobs:
|
2024-08-16 09:28:21 +00:00
|
|
|
build-left:
|
2024-08-15 06:49:07 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
2024-08-15 06:59:00 +00:00
|
|
|
image: zmkfirmware/zmk-build-arm:stable
|
2024-08-16 09:28:21 +00:00
|
|
|
name: Build left
|
2024-08-15 06:49:07 +00:00
|
|
|
steps:
|
2024-08-15 06:59:00 +00:00
|
|
|
- name: Install Dependencies
|
|
|
|
run: |
|
|
|
|
apt-get update;
|
|
|
|
apt-get install --yes --no-install-recommends \
|
|
|
|
nodejs \
|
|
|
|
zstd \
|
|
|
|
zip
|
|
|
|
|
2024-08-15 06:49:07 +00:00
|
|
|
- name: Checkout
|
2024-08-15 07:28:36 +00:00
|
|
|
uses: actions/checkout@v4
|
2024-08-15 06:59:00 +00:00
|
|
|
|
|
|
|
- name: Hash west modules
|
|
|
|
id: hash-west
|
|
|
|
run: |
|
|
|
|
FILE_PATH=zephyr/west.yml
|
|
|
|
FILES=$(find . -name build.yml -o -name west.yml -type f -exec sha256sum \; | sort)
|
|
|
|
HASH="$(echo -n $FILES | sha256sum | head -c 64)"
|
|
|
|
echo "hash=$HASH" >> "$GITHUB_OUTPUT"
|
|
|
|
echo "computed hash: $HASH"
|
|
|
|
|
2024-08-15 06:49:07 +00:00
|
|
|
- name: Cache west modules
|
2024-08-15 07:29:47 +00:00
|
|
|
uses: actions/cache@v4
|
2024-08-15 06:49:07 +00:00
|
|
|
env:
|
|
|
|
cache-name: cache-zephyr-modules
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
modules/
|
|
|
|
tools/
|
|
|
|
zephyr/
|
2024-08-15 06:59:00 +00:00
|
|
|
bootloader/
|
2024-08-16 09:36:20 +00:00
|
|
|
key: ${{ runner.os }}-build-left-${{ env.cache-name }}-${{ steps.hash-west.outputs.hash }}
|
2024-08-15 06:49:07 +00:00
|
|
|
restore-keys: |
|
2024-08-16 09:36:20 +00:00
|
|
|
${{ runner.os }}-build-left-${{ env.cache-name }}-
|
|
|
|
${{ runner.os }}-build-left-
|
2024-08-15 06:59:00 +00:00
|
|
|
${{ runner.os }}-
|
|
|
|
timeout-minutes: 5
|
2024-08-15 06:49:07 +00:00
|
|
|
continue-on-error: true
|
|
|
|
|
2024-08-15 06:59:00 +00:00
|
|
|
- name: West Init
|
|
|
|
run: west init -l config
|
|
|
|
|
|
|
|
- name: West Update
|
|
|
|
run: west update
|
2024-08-15 06:49:07 +00:00
|
|
|
|
2024-08-15 06:59:00 +00:00
|
|
|
- name: West Zephyr export
|
|
|
|
run: west zephyr-export
|
2024-08-15 06:49:07 +00:00
|
|
|
|
2024-08-15 07:13:22 +00:00
|
|
|
- name: West Build (Ferris Left)
|
|
|
|
run: west build -s zmk/app -b nice_nano_v2 -- -DSHIELD=cradio_left -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
2024-08-15 06:49:07 +00:00
|
|
|
|
2024-08-15 07:13:22 +00:00
|
|
|
- name: Ferris Left Kconfig file
|
2024-08-15 06:59:00 +00:00
|
|
|
run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$"
|
2024-08-15 06:49:07 +00:00
|
|
|
|
2024-08-15 06:59:00 +00:00
|
|
|
- name: Rename zmk.uf2
|
2024-08-15 07:13:22 +00:00
|
|
|
run: cp build/zephyr/zmk.uf2 cradio_left_nice_nano_v2.uf2
|
2024-08-15 06:49:07 +00:00
|
|
|
|
2024-08-16 09:28:21 +00:00
|
|
|
- name: Hash west modules
|
|
|
|
id: hash-west
|
|
|
|
run: |
|
|
|
|
FILE_PATH=zephyr/west.yml
|
|
|
|
FILES=$(find . -name build.yml -o -name west.yml -type f -exec sha256sum \; | sort)
|
|
|
|
HASH="$(echo -n $FILES | sha256sum | head -c 64)"
|
|
|
|
echo "hash=$HASH" >> "$GITHUB_OUTPUT"
|
|
|
|
echo "computed hash: $HASH"
|
|
|
|
|
|
|
|
- name: Upload Artifact (Left)
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
path: cradio_left_nice_nano_v2.uf2
|
|
|
|
name: left
|
|
|
|
|
|
|
|
build-right:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: zmkfirmware/zmk-build-arm:stable
|
|
|
|
name: Build right
|
|
|
|
steps:
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: |
|
|
|
|
apt-get update;
|
|
|
|
apt-get install --yes --no-install-recommends \
|
|
|
|
nodejs \
|
|
|
|
zstd \
|
|
|
|
zip
|
|
|
|
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Hash west modules
|
|
|
|
id: hash-west
|
|
|
|
run: |
|
|
|
|
FILE_PATH=zephyr/west.yml
|
|
|
|
FILES=$(find . -name build.yml -o -name west.yml -type f -exec sha256sum \; | sort)
|
|
|
|
HASH="$(echo -n $FILES | sha256sum | head -c 64)"
|
|
|
|
echo "hash=$HASH" >> "$GITHUB_OUTPUT"
|
|
|
|
echo "computed hash: $HASH"
|
|
|
|
|
|
|
|
- name: Cache west modules
|
|
|
|
uses: actions/cache@v4
|
|
|
|
env:
|
|
|
|
cache-name: cache-zephyr-modules
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
modules/
|
|
|
|
tools/
|
|
|
|
zephyr/
|
|
|
|
bootloader/
|
2024-08-16 09:36:20 +00:00
|
|
|
key: ${{ runner.os }}-build-left-${{ env.cache-name }}-${{ steps.hash-west.outputs.hash }}
|
2024-08-16 09:28:21 +00:00
|
|
|
restore-keys: |
|
2024-08-16 09:36:20 +00:00
|
|
|
${{ runner.os }}-build-left-${{ env.cache-name }}-
|
|
|
|
${{ runner.os }}-build-left-
|
2024-08-16 09:28:21 +00:00
|
|
|
${{ runner.os }}-
|
|
|
|
timeout-minutes: 5
|
|
|
|
continue-on-error: true
|
|
|
|
|
|
|
|
- name: West Init
|
|
|
|
run: west init -l config
|
|
|
|
|
|
|
|
- name: West Update
|
|
|
|
run: west update
|
|
|
|
|
|
|
|
- name: West Zephyr export
|
|
|
|
run: west zephyr-export
|
|
|
|
|
2024-08-15 07:13:22 +00:00
|
|
|
- name: West Build (Ferris Right)
|
|
|
|
run: west build --pristine -s zmk/app -b nice_nano_v2 -- -DSHIELD=cradio_right -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
2024-08-15 06:49:07 +00:00
|
|
|
|
2024-08-15 07:13:22 +00:00
|
|
|
- name: Ferris Right Kconfig file
|
2024-08-15 06:59:00 +00:00
|
|
|
run: cat build/zephyr/.config | grep -v "^#" | grep -v "^$"
|
2024-08-15 06:49:07 +00:00
|
|
|
|
2024-08-15 06:59:00 +00:00
|
|
|
- name: Rename zmk.uf2
|
2024-08-15 07:13:22 +00:00
|
|
|
run: cp build/zephyr/zmk.uf2 cradio_right_nice_nano_v2.uf2
|
2024-08-15 06:49:07 +00:00
|
|
|
|
2024-08-16 09:28:21 +00:00
|
|
|
- name: Hash west modules
|
|
|
|
id: hash-west
|
|
|
|
run: |
|
|
|
|
FILE_PATH=zephyr/west.yml
|
|
|
|
FILES=$(find . -name build.yml -o -name west.yml -type f -exec sha256sum \; | sort)
|
|
|
|
HASH="$(echo -n $FILES | sha256sum | head -c 64)"
|
|
|
|
echo "hash=$HASH" >> "$GITHUB_OUTPUT"
|
|
|
|
echo "computed hash: $HASH"
|
|
|
|
|
|
|
|
- name: Upload Artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
path: cradio_right_nice_nano_v2.uf2
|
|
|
|
name: right
|
|
|
|
|
|
|
|
build:
|
|
|
|
needs:
|
|
|
|
- build-left
|
|
|
|
- build-right
|
|
|
|
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 \
|
|
|
|
zstd \
|
|
|
|
zip
|
|
|
|
|
|
|
|
- name: Download artifact (right)
|
2024-08-16 09:32:01 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2024-08-16 09:28:21 +00:00
|
|
|
with:
|
|
|
|
path: cradio_right_nice_nano_v2.uf2
|
|
|
|
name: right
|
|
|
|
|
|
|
|
- name: Download artifact (left)
|
2024-08-16 09:32:01 +00:00
|
|
|
uses: actions/download-artifact@v3
|
2024-08-16 09:28:21 +00:00
|
|
|
with:
|
|
|
|
path: cradio_left_nice_nano_v2.uf2
|
|
|
|
name: left
|
|
|
|
|
2024-08-16 06:25:16 +00:00
|
|
|
- name: Move artifacts
|
|
|
|
run: |
|
|
|
|
mkdir firmware
|
|
|
|
mv cradio_left_nice_nano_v2.uf2 firmware/
|
|
|
|
mv cradio_right_nice_nano_v2.uf2 firmware/
|
2024-08-15 06:49:07 +00:00
|
|
|
|
2024-08-15 06:59:00 +00:00
|
|
|
- name: Hash west modules
|
|
|
|
id: hash-west
|
|
|
|
run: |
|
|
|
|
FILE_PATH=zephyr/west.yml
|
|
|
|
FILES=$(find . -name build.yml -o -name west.yml -type f -exec sha256sum \; | sort)
|
|
|
|
HASH="$(echo -n $FILES | sha256sum | head -c 64)"
|
|
|
|
echo "hash=$HASH" >> "$GITHUB_OUTPUT"
|
|
|
|
echo "computed hash: $HASH"
|
2024-08-15 06:49:07 +00:00
|
|
|
|
2024-08-15 06:59:00 +00:00
|
|
|
- name: Upload Artifact
|
|
|
|
uses: actions/upload-artifact@v3
|
2024-08-15 06:49:07 +00:00
|
|
|
with:
|
2024-08-16 06:25:16 +00:00
|
|
|
path: firmware/
|
|
|
|
name: firmware
|