mirror of
https://github.com/cesanta/mongoose.git
synced 2024-12-28 07:28:13 +08:00
Merge pull request #2309 from cesanta/arduino
move Arduino tests to its dir
This commit is contained in:
commit
a24b6c1909
24
.github/workflows/test.yml
vendored
24
.github/workflows/test.yml
vendored
@ -75,14 +75,6 @@ jobs:
|
||||
- run: if ./test/match_changed_files.sh '^test|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
|
||||
- if: ${{ env.GO == 1 }}
|
||||
run: make vc98 vc17 vc22 mingw mingw++
|
||||
arduino-xiao:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with: { fetch-depth: 2 }
|
||||
- run: if ./test/match_changed_files.sh '^examples/arduino|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
|
||||
- if: ${{ env.GO == 1 }}
|
||||
run: make arduino-xiao
|
||||
arm:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@ -122,6 +114,7 @@ jobs:
|
||||
- run: make examples_mac
|
||||
- run: make clean_examples_mac
|
||||
|
||||
|
||||
test_f7:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@ -206,6 +199,21 @@ jobs:
|
||||
- if: ${{ env.GO == 1 }}
|
||||
run: make -C examples/rp2040/pico-w5500 test VCON_API_KEY=${{secrets.VCON_API_KEY}}
|
||||
|
||||
|
||||
arduino:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with: { fetch-depth: 2 }
|
||||
- run: if ./test/match_changed_files.sh '^examples/arduino|^src/.*.[ch]' ; then echo GO=1 >> $GITHUB_ENV ; fi
|
||||
- if: ${{ env.GO == 1 }}
|
||||
run: make -C examples/arduino arduino-xiao
|
||||
# - if: ${{ env.GO == 1 }}
|
||||
# run: make -C examples/arduino arduino-nano
|
||||
- if: ${{ env.GO == 1 }}
|
||||
run: make -C examples/arduino clean
|
||||
|
||||
|
||||
matrix_examples:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
|
26
Makefile
26
Makefile
@ -154,30 +154,6 @@ mingw: Makefile mongoose.h $(SRCS)
|
||||
$(DOCKER) mdashnet/mingw x86_64-w64-mingw32-gcc $(SRCS) -W -Wall -Werror -I. $(DEFS) -lwsock32 -o $@.exe
|
||||
$(DOCKER) mdashnet/mingw wine64 $@.exe
|
||||
|
||||
arduino: ENV = -v $(CWD)/arduino:/root
|
||||
arduino:
|
||||
curl -sL http://downloads.arduino.cc/arduino-1.8.19-linux64.tar.xz | unxz | tar -xf -
|
||||
mv arduino-* $@
|
||||
|
||||
arduino-xiao-board:
|
||||
$(DOCKER) mdashnet/cc2 ./arduino/arduino --pref "boardsmanager.additional.urls=https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json" --save-prefs
|
||||
$(DOCKER) mdashnet/cc2 ./arduino/arduino --pref "compiler.warning_level=all" --save-prefs
|
||||
$(DOCKER) mdashnet/cc2 ./arduino/arduino --install-boards Seeeduino:samd
|
||||
|
||||
arduino-xiao: ENV = -v $(CWD)/arduino:/root
|
||||
arduino-xiao: arduino arduino-xiao-board
|
||||
rm -rf tmp; mkdir tmp
|
||||
cp examples/arduino/w5500/w5500.ino tmp/tmp.ino
|
||||
cp mongoose.c mongoose.h examples/arduino/w5500/mongoose_custom.h tmp/
|
||||
$(DOCKER) mdashnet/cc2 ./arduino/arduino --verbose --verify --board Seeeduino:samd:seeed_XIAO_m0 tmp/tmp.ino
|
||||
|
||||
arduino-nano: ENV = -v $(CWD)/arduino:/root
|
||||
arduino-nano: arduino
|
||||
rm -rf tmp; mkdir tmp
|
||||
cp examples/arduino/w5500/w5500.ino tmp/tmp.ino
|
||||
cp mongoose.c mongoose.h examples/arduino/w5500/mongoose_custom.h tmp/
|
||||
$(DOCKER) mdashnet/cc2 ./arduino/arduino --verbose --verify --board arduino:avr:nano tmp/tmp.ino
|
||||
|
||||
mingw++: Makefile mongoose.h $(SRCS)
|
||||
$(DOCKER) mdashnet/mingw x86_64-w64-mingw32-g++ $(SRCS) -W -Wall -Werror -I. $(DEFS) -lwsock32 -o $@.exe
|
||||
|
||||
@ -203,7 +179,7 @@ mongoose.h: $(HDRS) Makefile
|
||||
|
||||
|
||||
clean: clean_examples clean_embedded
|
||||
rm -rf $(PROG) *.exe *.o *.dSYM *_test* ut fuzzer *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb slow-unit* _CL_* infer-out data.txt crash-* test/packed_fs.c pack arduino tmp
|
||||
rm -rf $(PROG) *.exe *.o *.dSYM *_test* ut fuzzer *.gcov *.gcno *.gcda *.obj *.exe *.ilk *.pdb slow-unit* _CL_* infer-out data.txt crash-* test/packed_fs.c pack
|
||||
#find examples -maxdepth 3 -name zephyr -prune -o -name Makefile -print | xargs dirname | xargs -n1 make clean -C
|
||||
|
||||
clean_embedded:
|
||||
|
34
examples/arduino/Makefile
Normal file
34
examples/arduino/Makefile
Normal file
@ -0,0 +1,34 @@
|
||||
DOCKER ?= docker run --platform linux/amd64 --rm $(ENV) -v $(CWD):$(CWD) -w $(CWD)
|
||||
CWD ?= $(realpath $(CURDIR))
|
||||
|
||||
all:
|
||||
example:
|
||||
true
|
||||
|
||||
arduino: ENV = -v $(CWD):/root
|
||||
arduino:
|
||||
curl -sL http://downloads.arduino.cc/arduino-1.8.19-linux64.tar.xz | unxz | tar -xf -
|
||||
mv arduino-* $@
|
||||
|
||||
arduino-xiao-board:
|
||||
$(DOCKER) mdashnet/cc2 ./arduino/arduino --pref "boardsmanager.additional.urls=https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json" --save-prefs
|
||||
$(DOCKER) mdashnet/cc2 ./arduino/arduino --pref "compiler.warning_level=all" --save-prefs
|
||||
$(DOCKER) mdashnet/cc2 ./arduino/arduino --install-boards Seeeduino:samd
|
||||
|
||||
arduino-xiao: ENV = -v $(CWD):/root
|
||||
arduino-xiao: arduino arduino-xiao-board
|
||||
rm -rf tmp; mkdir tmp
|
||||
cp w5500/w5500.ino tmp/tmp.ino
|
||||
cp ../../mongoose.[ch] w5500/mongoose_custom.h tmp/
|
||||
$(DOCKER) mdashnet/cc2 ./arduino/arduino --verbose --verify --board Seeeduino:samd:seeed_XIAO_m0 tmp/tmp.ino
|
||||
|
||||
arduino-nano: ENV = -v $(CWD)/arduino:/root
|
||||
arduino-nano: arduino
|
||||
rm -rf tmp; mkdir tmp
|
||||
cp w5500/w5500.ino tmp/tmp.ino
|
||||
cp ../../mongoose.[ch] w5500/mongoose_custom.h tmp/
|
||||
$(DOCKER) mdashnet/cc2 ./arduino/arduino --verbose --verify --board arduino:avr:nano tmp/tmp.ino
|
||||
|
||||
clean:
|
||||
rm -rf arduino tmp
|
||||
|
Loading…
x
Reference in New Issue
Block a user