Updated Workflow for use on Forgejo
This commit is contained in:
parent
6988d3a06e
commit
92cf5189a3
2 changed files with 59 additions and 7 deletions
19
.github/workflows/build-user-config.yml
vendored
19
.github/workflows/build-user-config.yml
vendored
|
@ -32,7 +32,12 @@ jobs:
|
||||||
build_matrix: ${{ env.build_matrix }}
|
build_matrix: ${{ env.build_matrix }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
run: printf "/home/runner/externals/node20/bin\n" >> $GITHUB_PATH
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: apt-get update
|
||||||
|
- run: apt-get -y install python3-pip jq
|
||||||
|
|
||||||
- name: Install yaml2json
|
- name: Install yaml2json
|
||||||
run: python3 -m pip install remarshal
|
run: python3 -m pip install remarshal
|
||||||
|
@ -53,7 +58,8 @@ jobs:
|
||||||
matrix: ${{ fromJson(needs.matrix.outputs.build_matrix) }}
|
matrix: ${{ fromJson(needs.matrix.outputs.build_matrix) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
run: printf "/home/runner/externals/node20/bin\n" >> $GITHUB_PATH
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Create build directory
|
- name: Create build directory
|
||||||
run: |
|
run: |
|
||||||
|
@ -94,7 +100,8 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Cache west modules
|
- name: Cache west modules
|
||||||
uses: actions/cache@v4
|
run: printf "/home/runner/externals/node20/bin\n" >> $GITHUB_PATH
|
||||||
|
- uses: actions/cache@v4
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
cache_name: cache-zephyr-${{ env.zephyr_version }}-modules
|
cache_name: cache-zephyr-${{ env.zephyr_version }}-modules
|
||||||
|
@ -164,7 +171,8 @@ jobs:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Archive (${{ env.display_name }})
|
- name: Archive (${{ env.display_name }})
|
||||||
uses: actions/upload-artifact@v3
|
run: printf "/home/runner/externals/node20/bin\n" >> $GITHUB_PATH
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: artifact-${{ env.artifact_name }}
|
name: artifact-${{ env.artifact_name }}
|
||||||
path: ${{ env.build_dir }}/artifacts
|
path: ${{ env.build_dir }}/artifacts
|
||||||
|
@ -175,7 +183,8 @@ jobs:
|
||||||
name: Merge Output Artifacts
|
name: Merge Output Artifacts
|
||||||
steps:
|
steps:
|
||||||
- name: Merge Artifacts
|
- name: Merge Artifacts
|
||||||
uses: actions/upload-artifact/merge@v4
|
run: printf "/home/runner/externals/node20/bin\n" >> $GITHUB_PATH
|
||||||
|
- uses: actions/upload-artifact/merge@v4
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.archive_name }}
|
name: ${{ inputs.archive_name }}
|
||||||
pattern: artifact-*
|
pattern: artifact-*
|
||||||
|
|
45
.github/workflows/build.yml
vendored
45
.github/workflows/build.yml
vendored
|
@ -2,5 +2,48 @@ on: [push, pull_request, workflow_dispatch]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
uses: ./.github/workflows/build-user-config.yml
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: zmkfirmware/zmk-build-arm:stable
|
||||||
|
steps:
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: |
|
||||||
|
apt-get update
|
||||||
|
apt-get install tree curl -y
|
||||||
|
|
||||||
|
- name: Install Node.JS Workarround, see https://github.com/nektos/act/issues/973
|
||||||
|
run: |
|
||||||
|
curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
||||||
|
apt install -y nodejs
|
||||||
|
node --version
|
||||||
|
|
||||||
|
- name: Git checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Clone ZMK Repo
|
||||||
|
run: git clone -b feat/pointers-move-scroll https://github.com/petejohanson/zmk.git
|
||||||
|
|
||||||
|
- name: Initialize ZMK
|
||||||
|
working-directory: ./zmk
|
||||||
|
run: |
|
||||||
|
west init -l app/
|
||||||
|
west update
|
||||||
|
- name: Build Left Shield
|
||||||
|
working-directory: ./zmk/app
|
||||||
|
run: west build -d build/left -b nice_nano_v2 -- -DSHIELD=kyria_rev3_left -DZMK_CONFIG="../../config"
|
||||||
|
- name: Build Right Shield
|
||||||
|
working-directory: ./zmk/app
|
||||||
|
run: west build -d build/right -b nice_nano_v2 -- -DSHIELD=kyria_rev3_right -DZMK_CONFIG="../../config"
|
||||||
|
|
||||||
|
- name: Rename artifacts
|
||||||
|
working-directory: .
|
||||||
|
run: |
|
||||||
|
mkdir "./artifacts"
|
||||||
|
cp ./zmk/app/build/left/zephyr/zmk.uf2 ./artifacts/kyria_rev3_left-nice_nano_v2-zmk.uf2
|
||||||
|
cp ./zmk/app/build/right/zephyr/zmk.uf2 ./artifacts/kyria_rev3_right-nice_nano_v2-zmk.uf2
|
||||||
|
|
||||||
|
- name: Upload Artifacts
|
||||||
|
if: ${{ true }}
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: firmware
|
||||||
|
path: ./artifacts
|
||||||
|
|
Loading…
Add table
Reference in a new issue