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
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: zmkfirmware/zmk-build-arm:2.4
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
config:
|
||||
- ""
|
||||
board:
|
||||
- nice_nano
|
||||
shield:
|
||||
|
||||
# - bfo9000_left
|
||||
@ -66,6 +62,11 @@ jobs:
|
||||
- splitreus62_left
|
||||
- splitreus62_right
|
||||
|
||||
board:
|
||||
- nice_nano
|
||||
config:
|
||||
- ""
|
||||
|
||||
include:
|
||||
|
||||
# - shield: absolem
|
||||
@ -77,9 +78,9 @@ jobs:
|
||||
|
||||
- board: planck_rev6
|
||||
|
||||
- config: clipboard_mac
|
||||
- shield: corne_left
|
||||
board: nice_nano
|
||||
shield: corne_left
|
||||
config: clipboard_mac
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@ -111,21 +112,30 @@ jobs:
|
||||
- name: Prepare variables
|
||||
id: variables
|
||||
run: |
|
||||
ARTIFACT_NAME="Miryoku-ZMK"
|
||||
if [ -n "${{ matrix.shield }}" ]; then
|
||||
if [ -n "${{ matrix.shield }}" ]
|
||||
then
|
||||
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
|
||||
SHIELD_ARG=
|
||||
ARTIFACT_NAME="$ARTIFACT_NAME-${{ matrix.board }}"
|
||||
KEYBOARD_BUILD_NAME="${{ matrix.board }}"
|
||||
KEYBOARD_GENERIC_NAME=`echo "${{ matrix.board }}" | sed 's/_\(left\|right\)$//'`
|
||||
fi
|
||||
if [ -n "${{ matrix.config }}" ]; then
|
||||
ARTIFACT_NAME="$ARTIFACT_NAME-${{ matrix.config }}"
|
||||
FIRMWARE_NAME="Miryoku-ZMK"
|
||||
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
|
||||
echo ::set-output name=shield-arg::${SHIELD_ARG}
|
||||
echo ::set-output name=artifact-name::${ARTIFACT_NAME}
|
||||
ARTIFACTS_DIR=artifacts
|
||||
echo "::set-output name=artifacts-dir::$ARTIFACTS_DIR"
|
||||
TMPDIR=artifacts
|
||||
echo "::set-output name=shield-arg::${SHIELD_ARG}"
|
||||
echo "::set-output name=artifact-build-name::${ARTIFACT_BUILD_NAME}"
|
||||
echo "::set-output name=artifact-generic-name::${ARTIFACT_GENERIC_NAME}"
|
||||
echo "::set-output name=tmpdir::$TMPDIR"
|
||||
- name: Copy config file
|
||||
run: |
|
||||
if [ -n "${{ matrix.config }}" ]; then
|
||||
@ -136,9 +146,9 @@ jobs:
|
||||
-DZMK_CONFIG="${GITHUB_WORKSPACE}/config"
|
||||
- name: Prepare artifacts
|
||||
run: |
|
||||
mkdir ${{ steps.variables.outputs.artifacts-dir }}
|
||||
mkdir ${{ steps.variables.outputs.tmpdir }}
|
||||
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
|
||||
basename="build/zephyr/zmk"
|
||||
for extension in "hex" "uf2"
|
||||
@ -146,19 +156,13 @@ jobs:
|
||||
file="$basename.$extension"
|
||||
if [ -f "$file" ]
|
||||
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
|
||||
done
|
||||
- name: Archive artifacts
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ steps.variables.outputs.artifact-name }}
|
||||
name: ${{ steps.variables.outputs.artifact-generic-name }}
|
||||
path: |
|
||||
${{ steps.variables.outputs.artifacts-dir }}
|
||||
${{ steps.variables.outputs.tmpdir }}
|
||||
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