forked from zmkfirmware/zmk
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(build): Move config files to a tmp workspace.
- Loading branch information
1 parent
4cfc148
commit 202012f
Showing
1 changed file
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,30 +66,32 @@ jobs: | |
shield: ${{ matrix.shield }} | ||
artifact_name: ${{ matrix.artifact-name }} | ||
run: | | ||
echo "tmp_dir=$(mktemp -d)" >> $GITHUB_ENV | ||
echo "tmp_config_dir=${{ env.tmp_dir }}/config/" >> $GITHUB_ENV | ||
if [ -e zephyr/module.yml ]; then | ||
export zmk_load_arg="-DZMK_EXTRA_MODULES='${GITHUB_WORKSPACE}'" | ||
else | ||
export zmk_load_arg="-DZMK_CONFIG='${GITHUB_WORKSPACE}/${{ inputs.config_path }}'" | ||
export zmk_load_arg=" -DZMK_EXTRA_MODULES='${GITHUB_WORKSPACE}'" | ||
fi | ||
echo "load_arg=${zmk_load_arg}" >> $GITHUB_ENV | ||
echo "zephyr_version=${ZEPHYR_VERSION}" >> $GITHUB_ENV | ||
echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}" >> $GITHUB_ENV | ||
echo "extra_cmake_args=${shield:+-DSHIELD=\"$shield\"}${zmk_load_arg}" >> $GITHUB_ENV | ||
echo "display_name=${shield:+$shield - }${board}" >> $GITHUB_ENV | ||
echo "artifact_name=${artifact_name:-${shield:+$shield-}${board}-zmk}" >> $GITHUB_ENV | ||
- name: Move config files to isolate temporary directory | ||
run: mv ${{ input.config_path }}/* "${{ env.tmp_config_dir }}/"" | ||
- name: Cache west modules | ||
uses: actions/[email protected] | ||
continue-on-error: true | ||
env: | ||
cache_name: cache-zephyr-${{ env.zephyr_version }}-modules | ||
with: | ||
path: | | ||
modules/ | ||
tools/ | ||
zephyr/ | ||
bootloader/ | ||
zmk/ | ||
${{ env.tmp_dir }}/modules/ | ||
${{ env.tmp_dir }}/tools/ | ||
${{ env.tmp_dir }}/zephyr/ | ||
${{ env.tmp_dir }}/bootloader/ | ||
${{ env.tmp_dir }}/zmk/ | ||
key: ${{ runner.os }}-build-${{ env.cache_name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-build-${{ env.cache_name }}- | ||
|
@@ -107,7 +109,7 @@ jobs: | |
|
||
- name: West Build (${{ env.display_name }}) | ||
shell: sh -x {0} | ||
run: west build -s zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" -- ${{ env.load_arg }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }} | ||
run: west build -s ${{ env.tmp_dir }}/zmk/app -d "${{ env.build_dir }}" -b "${{ matrix.board }}" -- -DZMK_CONFIG=${{ env.tmp_config_dir }} ${{ env.extra_cmake_args }} ${{ matrix.cmake-args }} | ||
|
||
- name: ${{ env.display_name }} Kconfig file | ||
run: | | ||
|