Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
vacabun committed Dec 15, 2023
1 parent 634f281 commit dd16655
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 39 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,77 +41,41 @@ jobs:
- name: Build tag(dw1000)
run: |
cd app
if grep -q 'CONFIG_DW3000=y' prj.conf; then
sed -i 's/CONFIG_DW3000=y/CONFIG_DW3000=n/g' prj.conf
fi
if grep -q 'CONFIG_DW1000=n' prj.conf; then
sed -i 's/CONFIG_DW1000=n/CONFIG_DW1000=y/g' prj.conf
fi
make clean
make dw1000
make tag
cd ..
- name: Build anchor(dw1000)
run: |
cd app
if grep -q 'CONFIG_DW3000=y' prj.conf; then
sed -i 's/CONFIG_DW3000=y/CONFIG_DW3000=n/g' prj.conf
fi
if grep -q 'CONFIG_DW1000=n' prj.conf; then
sed -i 's/CONFIG_DW1000=n/CONFIG_DW1000=y/g' prj.conf
fi
make clean
make dw1000
make anchor
cd ..
- name: Build node(dw1000)
run: |
cd app
if grep -q 'CONFIG_DW3000=y' prj.conf; then
sed -i 's/CONFIG_DW3000=y/CONFIG_DW3000=n/g' prj.conf
fi
if grep -q 'CONFIG_DW1000=n' prj.conf; then
sed -i 's/CONFIG_DW1000=n/CONFIG_DW1000=y/g' prj.conf
fi
make clean
make dw1000
make node
cd ..
- name: Build tag(dw3000)
run: |
cd app
if grep -q 'CONFIG_DW3000=n' prj.conf; then
sed -i 's/CONFIG_DW3000=n/CONFIG_DW3000=y/g' prj.conf
fi
if grep -q 'CONFIG_DW1000=y' prj.conf; then
sed -i 's/CONFIG_DW1000=y/CONFIG_DW1000=n/g' prj.conf
fi
make clean
make dw3000
make tag
cd ..
- name: Build anchor(dw3000)
run: |
cd app
if grep -q 'CONFIG_DW3000=n' prj.conf; then
sed -i 's/CONFIG_DW3000=n/CONFIG_DW3000=y/g' prj.conf
fi
if grep -q 'CONFIG_DW1000=y' prj.conf; then
sed -i 's/CONFIG_DW1000=y/CONFIG_DW1000=n/g' prj.conf
fi
make clean
make dw3000
make anchor
cd ..
- name: Build node(dw3000)
run: |
cd app
if grep -q 'CONFIG_DW3000=n' prj.conf; then
sed -i 's/CONFIG_DW3000=n/CONFIG_DW3000=y/g' prj.conf
fi
if grep -q 'CONFIG_DW1000=y' prj.conf; then
sed -i 's/CONFIG_DW1000=y/CONFIG_DW1000=n/g' prj.conf
fi
make clean
make dw3000
make node
Expand Down
16 changes: 14 additions & 2 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
clean:
rm -rf $(CURDIR)/build
dw1000:
cp boards/stm32f401_mini_dw1000.overlay boards/stm32f401_mini.overlay
cp $(CURDIR)/boards/stm32f401_mini_dw1000.overlay $(CURDIR)/boards/stm32f401_mini.overlay
if grep -q 'CONFIG_DW3000=y' $(CURDIR)/prj.conf; then \
sed -i 's/CONFIG_DW3000=y/CONFIG_DW3000=n/g' prj.conf; \
fi
if grep -q 'CONFIG_DW1000=n' $(CURDIR)/prj.conf; then \
sed -i 's/CONFIG_DW1000=n/CONFIG_DW1000=y/g' prj.conf; \
fi
dw3000:
cp boards/stm32f401_mini_dw3000.overlay boards/stm32f401_mini.overlay
cp $(CURDIR)/boards/stm32f401_mini_dw3000.overlay $(CURDIR)/boards/stm32f401_mini.overlay
if grep -q 'CONFIG_DW3000=n' $(CURDIR)/prj.conf; then \
sed -i 's/CONFIG_DW3000=n/CONFIG_DW3000=y/g' prj.conf; \
fi
if grep -q 'CONFIG_DW1000=y' $(CURDIR)/prj.conf; then \
sed -i 's/CONFIG_DW1000=y/CONFIG_DW1000=n/g' prj.conf; \
fi
tag:
west build -- -DTAG_DEF=ON -DANCHOR_DEF=OFF -DNODE_DEF=OFF
anchor:
Expand Down
2 changes: 1 addition & 1 deletion prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ CONFIG_SHELL=y
CONFIG_LOG=y
CONFIG_CBPRINTF_FP_SUPPORT=y

CONFIG_DW3000=n
CONFIG_DW3000=y
CONFIG_DW1000=n

0 comments on commit dd16655

Please sign in to comment.