Update .gitea/workflows/build.yaml
This commit is contained in:
parent
5825a8ff76
commit
364816630c
@ -6,11 +6,11 @@ on:
|
|||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build-left:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: zmkfirmware/zmk-build-arm:stable
|
image: zmkfirmware/zmk-build-arm:stable
|
||||||
name: Build
|
name: Build left
|
||||||
steps:
|
steps:
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
@ -68,6 +68,74 @@ jobs:
|
|||||||
- name: Rename zmk.uf2
|
- name: Rename zmk.uf2
|
||||||
run: cp build/zephyr/zmk.uf2 cradio_left_nice_nano_v2.uf2
|
run: cp build/zephyr/zmk.uf2 cradio_left_nice_nano_v2.uf2
|
||||||
|
|
||||||
|
- 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/
|
||||||
|
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ steps.hash-west.outputs.hash }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-build-${{ env.cache-name }}-
|
||||||
|
${{ runner.os }}-build-
|
||||||
|
${{ 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
|
||||||
|
|
||||||
- name: West Build (Ferris Right)
|
- name: West Build (Ferris Right)
|
||||||
run: west build --pristine -s zmk/app -b nice_nano_v2 -- -DSHIELD=cradio_right -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
run: west build --pristine -s zmk/app -b nice_nano_v2 -- -DSHIELD=cradio_right -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
||||||
|
|
||||||
@ -77,6 +145,50 @@ jobs:
|
|||||||
- name: Rename zmk.uf2
|
- name: Rename zmk.uf2
|
||||||
run: cp build/zephyr/zmk.uf2 cradio_right_nice_nano_v2.uf2
|
run: cp build/zephyr/zmk.uf2 cradio_right_nice_nano_v2.uf2
|
||||||
|
|
||||||
|
- 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)
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
path: cradio_right_nice_nano_v2.uf2
|
||||||
|
name: right
|
||||||
|
|
||||||
|
- name: Download artifact (left)
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
path: cradio_left_nice_nano_v2.uf2
|
||||||
|
name: left
|
||||||
|
|
||||||
- name: Move artifacts
|
- name: Move artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir firmware
|
mkdir firmware
|
||||||
|
Loading…
x
Reference in New Issue
Block a user