mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-26 22:41:03 +08:00
Reduce Zephyr test time
This commit is contained in:
parent
f8445a4c85
commit
21e8b08ed9
25
.github/workflows/test.yml
vendored
25
.github/workflows/test.yml
vendored
@ -121,19 +121,18 @@ jobs:
|
||||
- uses: actions/checkout@v3
|
||||
- name: ${{ matrix.example.path }}
|
||||
run: make -C examples/${{ matrix.example.path }} build
|
||||
matrix_zephyr_examples:
|
||||
zephyr_examples:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
zephyrexample:
|
||||
- path: zephyr/device-dashboard
|
||||
- path: zephyr/http-client
|
||||
- path: zephyr/http-server
|
||||
- path: zephyr/mqtt-aws-client
|
||||
- path: zephyr/websocket-server
|
||||
name: ${{ matrix.zephyrexample.name }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: ${{ matrix.zephyrexample.path }}
|
||||
run: make -C examples/${{ matrix.zephyrexample.path }} zephyr build
|
||||
- run: make -C examples/zephyr init
|
||||
- name: minify manifest
|
||||
uses: mikefarah/yq@master
|
||||
with:
|
||||
cmd: yq -i eval '(.manifest.defaults, .manifest.remotes, .manifest.projects[] | select(.name == "cmsis" or .name == "hal_stm32" or .name == "mbedtls" or .name == "mcuboot" or .name == "picolibc" | del(.null) ), .manifest.self) as $i ireduce({};setpath($i | path; $i)) | del(.manifest.projects.[].null) | del(..|select(length==0))' examples/zephyr/zephyrproject/zephyr/west.yml
|
||||
- run: make -C examples/zephyr update
|
||||
- run: make -C examples/zephyr/device-dashboard build
|
||||
- run: make -C examples/zephyr/http-client build
|
||||
- run: make -C examples/zephyr/http-server build
|
||||
- run: make -C examples/zephyr/mqtt-aws-client build
|
||||
- run: make -C examples/zephyr/websocket-server build
|
||||
|
29
examples/zephyr/Makefile
Normal file
29
examples/zephyr/Makefile
Normal file
@ -0,0 +1,29 @@
|
||||
DOCKER_PROJECT_DIR ?= /workdir
|
||||
ZEPHYR_DIR ?= zephyrproject
|
||||
PROJECT_PATH = $(realpath $(CURDIR))
|
||||
ZEPHYR_PATH = $(realpath $(CURDIR))/$(ZEPHYR_DIR)
|
||||
DOCKER_PROJECT_PATH = $(DOCKER_PROJECT_DIR)
|
||||
DOCKER_ZEPHYR_PATH = $(DOCKER_PROJECT_DIR)/$(ZEPHYR_DIR)
|
||||
|
||||
DOCKER ?= docker run --rm -v $(PROJECT_PATH):$(DOCKER_PROJECT_PATH) -v $(ZEPHYR_PATH):$(DOCKER_ZEPHYR_PATH)
|
||||
REPO ?= zephyrprojectrtos/ci
|
||||
|
||||
YQ ?= yq
|
||||
|
||||
example:
|
||||
true
|
||||
|
||||
init:
|
||||
ifeq ($(wildcard $(ZEPHYR_PATH)/.*),)
|
||||
mkdir $(ZEPHYR_PATH)
|
||||
$(DOCKER) $(REPO) /bin/sh -c 'cd $(DOCKER_PROJECT_DIR) && west init ./$(ZEPHYR_DIR)'
|
||||
endif
|
||||
|
||||
update:
|
||||
$(DOCKER) $(REPO) /bin/sh -c 'cd $(DOCKER_ZEPHYR_PATH) && west update'
|
||||
|
||||
minify:
|
||||
$(YQ) -i eval '(.manifest.defaults, .manifest.remotes, .manifest.projects[] | select(.name == "cmsis" or .name == "hal_stm32" or .name == "mbedtls" or .name == "mcuboot" or .name == "picolibc" | del(.null) ), .manifest.self) as $$i ireduce({};setpath($$i | path; $$i)) | del(.manifest.projects.[].null) | del(..|select(length==0))' zephyrproject/zephyr/west.yml
|
||||
|
||||
zephyr: init minify update
|
||||
|
Loading…
x
Reference in New Issue
Block a user