mirror of
https://github.com/ClaytonWWilson/miryoku_zmk.git
synced 2025-12-13 17:58:47 +00:00
Combine split artifacts
This commit is contained in:
parent
48809afb0d
commit
d146644734
60
.github/workflows/build.yml
vendored
60
.github/workflows/build.yml
vendored
@ -5,16 +5,12 @@ on:
|
|||||||
- workflow_dispatch
|
- workflow_dispatch
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: zmkfirmware/zmk-build-arm:2.4
|
image: zmkfirmware/zmk-build-arm:2.4
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
config:
|
|
||||||
- ""
|
|
||||||
board:
|
|
||||||
- nice_nano
|
|
||||||
shield:
|
shield:
|
||||||
|
|
||||||
# - bfo9000_left
|
# - bfo9000_left
|
||||||
@ -66,6 +62,11 @@ jobs:
|
|||||||
- splitreus62_left
|
- splitreus62_left
|
||||||
- splitreus62_right
|
- splitreus62_right
|
||||||
|
|
||||||
|
board:
|
||||||
|
- nice_nano
|
||||||
|
config:
|
||||||
|
- ""
|
||||||
|
|
||||||
include:
|
include:
|
||||||
|
|
||||||
# - shield: absolem
|
# - shield: absolem
|
||||||
@ -77,9 +78,9 @@ jobs:
|
|||||||
|
|
||||||
- board: planck_rev6
|
- board: planck_rev6
|
||||||
|
|
||||||
- config: clipboard_mac
|
- shield: corne_left
|
||||||
board: nice_nano
|
board: nice_nano
|
||||||
shield: corne_left
|
config: clipboard_mac
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@ -111,21 +112,30 @@ jobs:
|
|||||||
- name: Prepare variables
|
- name: Prepare variables
|
||||||
id: variables
|
id: variables
|
||||||
run: |
|
run: |
|
||||||
ARTIFACT_NAME="Miryoku-ZMK"
|
if [ -n "${{ matrix.shield }}" ]
|
||||||
if [ -n "${{ matrix.shield }}" ]; then
|
then
|
||||||
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
|
SHIELD_ARG="-DSHIELD=${{ matrix.shield }}"
|
||||||
ARTIFACT_NAME="$ARTIFACT_NAME-${{ matrix.shield }}-${{ matrix.board }}"
|
KEYBOARD_BUILD_NAME="${{ matrix.shield }}-${{ matrix.board }}"
|
||||||
|
KEYBOARD_GENERIC_NAME=`echo "${{ matrix.shield }}" | sed 's/_\(left\|right\)$//'`"-${{ matrix.board }}"
|
||||||
else
|
else
|
||||||
SHIELD_ARG=
|
SHIELD_ARG=
|
||||||
ARTIFACT_NAME="$ARTIFACT_NAME-${{ matrix.board }}"
|
KEYBOARD_BUILD_NAME="${{ matrix.board }}"
|
||||||
|
KEYBOARD_GENERIC_NAME=`echo "${{ matrix.board }}" | sed 's/_\(left\|right\)$//'`
|
||||||
fi
|
fi
|
||||||
if [ -n "${{ matrix.config }}" ]; then
|
FIRMWARE_NAME="Miryoku-ZMK"
|
||||||
ARTIFACT_NAME="$ARTIFACT_NAME-${{ matrix.config }}"
|
if [ -n "${{ matrix.config }}" ]
|
||||||
|
then
|
||||||
|
ARTIFACT_BUILD_NAME="$FIRMWARE_NAME-$KEYBOARD_BUILD_NAME-${{ matrix.config }}"
|
||||||
|
ARTIFACT_GENERIC_NAME="$FIRMWARE_NAME-$KEYBOARD_GENERIC_NAME-${{ matrix.config }}"
|
||||||
|
else
|
||||||
|
ARTIFACT_BUILD_NAME="$FIRMWARE_NAME-$KEYBOARD_BUILD_NAME"
|
||||||
|
ARTIFACT_GENERIC_NAME="$FIRMWARE_NAME-$KEYBOARD_GENERIC_NAME"
|
||||||
fi
|
fi
|
||||||
echo ::set-output name=shield-arg::${SHIELD_ARG}
|
TMPDIR=artifacts
|
||||||
echo ::set-output name=artifact-name::${ARTIFACT_NAME}
|
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
||||||
ARTIFACTS_DIR=artifacts
|
echo "::set-output name=artifact-build-name::${ARTIFACT_BUILD_NAME}"
|
||||||
echo "::set-output name=artifacts-dir::$ARTIFACTS_DIR"
|
echo "::set-output name=artifact-generic-name::${ARTIFACT_GENERIC_NAME}"
|
||||||
|
echo "::set-output name=tmpdir::$TMPDIR"
|
||||||
- name: Copy config file
|
- name: Copy config file
|
||||||
run: |
|
run: |
|
||||||
if [ -n "${{ matrix.config }}" ]; then
|
if [ -n "${{ matrix.config }}" ]; then
|
||||||
@ -136,9 +146,9 @@ jobs:
|
|||||||
-DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
-DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
||||||
- name: Prepare artifacts
|
- name: Prepare artifacts
|
||||||
run: |
|
run: |
|
||||||
mkdir ${{ steps.variables.outputs.artifacts-dir }}
|
mkdir ${{ steps.variables.outputs.tmpdir }}
|
||||||
if [ -n "${{ matrix.config }}" ]; then
|
if [ -n "${{ matrix.config }}" ]; then
|
||||||
cp "${GITHUB_WORKSPACE}/miryoku/config.h" ${{ steps.variables.outputs.artifacts-dir }}
|
cp "${GITHUB_WORKSPACE}/miryoku/config.h" ${{ steps.variables.outputs.tmpdir }}
|
||||||
fi
|
fi
|
||||||
basename="build/zephyr/zmk"
|
basename="build/zephyr/zmk"
|
||||||
for extension in "hex" "uf2"
|
for extension in "hex" "uf2"
|
||||||
@ -146,19 +156,13 @@ jobs:
|
|||||||
file="$basename.$extension"
|
file="$basename.$extension"
|
||||||
if [ -f "$file" ]
|
if [ -f "$file" ]
|
||||||
then
|
then
|
||||||
cp "$file" "${{ steps.variables.outputs.artifacts-dir }}/${{ steps.variables.outputs.artifact-name }}.$extension"
|
cp "$file" "${{ steps.variables.outputs.tmpdir }}/${{ steps.variables.outputs.artifact-build-name }}.$extension"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
- name: Archive artifacts
|
- name: Archive artifacts
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ steps.variables.outputs.artifact-name }}
|
name: ${{ steps.variables.outputs.artifact-generic-name }}
|
||||||
path: |
|
path: |
|
||||||
${{ steps.variables.outputs.artifacts-dir }}
|
${{ steps.variables.outputs.tmpdir }}
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# todo:
|
|
||||||
# remove _left and _right from artifact dir and put at the end of artifact filename
|
|
||||||
# fix Array
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user