mirror of
https://github.com/ClaytonWWilson/miryoku_zmk.git
synced 2026-03-10 18:55:04 +00:00
Add Kconfig field to matrix and inputs workflows
- rename outboards files
This commit is contained in:
@@ -28,6 +28,8 @@ jobs:
|
||||
- default
|
||||
mapping:
|
||||
- default
|
||||
kconfig:
|
||||
- default
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
@@ -35,7 +37,6 @@ jobs:
|
||||
id: variables
|
||||
run: |
|
||||
if [ -n "${{ matrix.shield }}" -a "${{ matrix.shield }}" != "default" ]
|
||||
|
||||
then
|
||||
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
|
||||
keyboard=${{ matrix.shield }}
|
||||
@@ -63,17 +64,34 @@ jobs:
|
||||
;;
|
||||
esac
|
||||
done
|
||||
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
|
||||
echo "::set-output name=artifact-build-name::$artifact_build_name"
|
||||
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
||||
echo "::set-output name=artifact-dir::artifacts"
|
||||
|
||||
outboard_file=".github/workflows/outboards/$keyboard"
|
||||
artifacts_dir="artifacts"
|
||||
echo "::set-output name=artifact-dir::$artifacts_dir"
|
||||
mkdir "$artifacts_dir"
|
||||
cp "$configfile" "$artifacts_dir"
|
||||
|
||||
if [ -n "${{ matrix.kconfig }}" -a "${{ matrix.kconfig }}" != 'default' ]
|
||||
then
|
||||
kconfig_file="config/$keyboard.conf"
|
||||
echo "${{ matrix.kconfig }}" > "$kconfig_file"
|
||||
cat "$kconfig_file"
|
||||
cp "$kconfig_file" "$artifacts_dir"
|
||||
artifact_build_name="$artifact_build_name kconfig_"`echo "${{ matrix.kconfig }}" | md5sum | cut -d ' ' -f 1`
|
||||
fi
|
||||
|
||||
outboard_file=".github/workflows/outboards/$keyboard.outboard"
|
||||
if [ -f "$outboard_file" ]
|
||||
then
|
||||
grep -v '^#' "$outboard_file" >> $GITHUB_ENV
|
||||
cat "$outboard_file"
|
||||
cp "$outboard_file" "$artifacts_dir"
|
||||
fi
|
||||
echo "::set-output name=outboard_dir::outboard"
|
||||
|
||||
artifact_build_name=`echo $artifact_build_name | tr ' ' '-'`
|
||||
echo "::set-output name=artifact-build-name::$artifact_build_name"
|
||||
echo "::set-output name=artifact-generic-name::"`echo "$artifact_build_name" | sed 's/_\(left\|right\)//'`
|
||||
|
||||
- name: Checkout outboard
|
||||
if: ${{ env.outboard_repository != '' && env.outboard_ref != '' }}
|
||||
uses: actions/checkout@v2
|
||||
@@ -119,10 +137,8 @@ jobs:
|
||||
run: west zephyr-export
|
||||
- name: Build (west build)
|
||||
run: west build -s zmk/app -b ${{ matrix.board }} -- ${{ steps.variables.outputs.shield-arg }} -DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
||||
- name: Prepare artifacts
|
||||
- name: Prepare firmware artifacts
|
||||
run: |
|
||||
mkdir ${{ steps.variables.outputs.artifact-dir }}
|
||||
cp "${{ steps.variables.outputs.configfile }}" "${{ steps.variables.outputs.artifact-dir }}"
|
||||
for extension in "hex" "uf2"
|
||||
do
|
||||
file="build/zephyr/zmk.$extension"
|
||||
|
||||
Reference in New Issue
Block a user