Skip to content

Commit

Permalink
ci: Optimize west fetching and default to it
Browse files Browse the repository at this point in the history
Using treeless clones from zmkfirmware/zmk#2757
and manifest.project-filter from https://github.com/zmkfirmware/zmk-cli/blob/main/zmk/repo.py#L253
to reduce amount of data fetched.

Remove caching since it is no longer very necessary and default to turning it on,
since it adds <10s to runtime.
  • Loading branch information
caksoylar committed Jan 18, 2025
1 parent c50df4c commit c18dc56
Showing 1 changed file with 7 additions and 27 deletions.
34 changes: 7 additions & 27 deletions .github/workflows/draw-zmk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ on:
required: false
type: string
west_config_path:
description: 'Path to the folder containing west.yml, e.g. `config`. If specified, west will be initialized to fetch modules defined in west.yml'
default: ''
description: 'Path to the folder containing west.yml, e.g. `config`. Set to empty to skip fetching modules from west.yml'
default: 'config'
required: false
type: string
output_folder:
Expand Down Expand Up @@ -108,32 +108,12 @@ jobs:
if: inputs.west_config_path != ''
run: pipx install west

- name: Cache west modules
- name: Fetch west modules
if: inputs.west_config_path != ''
uses: actions/cache@v4
continue-on-error: true
env:
cache_name: cache-zephyr-3.5.0-modules
with:
path: |
modules/
tools/
zephyr/
bootloader/
zmk/
key: ${{ runner.os }}-build-${{ env.cache_name }}-${{ hashFiles('**/west.yml', '**/build.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache_name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: West Init
if: inputs.west_config_path != ''
run: west init -l ${{ inputs.west_config_path }}

- name: West Update
if: inputs.west_config_path != ''
run: west update
run: |
west init -l ${{ inputs.west_config_path }}
west config --local manifest.project-filter " -zmk"
west update --fetch-opt=--filter=tree:0
- name: Draw keymaps
id: draw
Expand Down

0 comments on commit c18dc56

Please sign in to comment.