Skip to content

Commit 7be9f76

Browse files
authored
Merge pull request #331 from lovyan03/develop
v0.5.0
2 parents 3af4725 + 9c3fa21 commit 7be9f76

File tree

128 files changed

+26939
-15136
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

128 files changed

+26939
-15136
lines changed

.github/scripts/installOpenCV.bat

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
::@echo off
22
setlocal enabledelayedexpansion
33
::DO_NOT_CHANGE::
4-
::============================================::
4+
:: ============================================::
55
set cvVersion=4.5.5
66
echo Installing OpenCV-%cvVersion%
7-
::============================================::
7+
:: ============================================::
88
mkdir opencv-%cvVersion%
99
cd opencv-%cvVersion%
1010
mkdir Installation
1111
set count=1
1212
set cwd=%cd%
13-
::============================================::
13+
:: ============================================::
1414
echo Downloading opencv from github
15-
::download opencv from git
16-
git clone https://github.com/opencv/opencv.git
17-
cd opencv
18-
::checkout appropriate cv version
19-
git checkout %cvVersion%
20-
cd ..
21-
::============================================::
22-
echo Compiling using cmake
15+
:: download latest opencv from git
16+
git clone https://github.com/opencv/opencv.git -b %cvVersion% --depth=1
2317
cd opencv
18+
:: checkout appropriate cv version
19+
:: git checkout %cvVersion%
20+
:: free some space on the disk
21+
rmdir -Force -Recurse .git
2422

23+
:: ============================================::
24+
echo Compiling using cmake
2525

2626
set cwd=%cd%
2727

@@ -31,14 +31,13 @@ echo ============================================
3131

3232
mkdir build
3333
cd build
34-
::xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx::
35-
::Configure OpenCV
36-
cmake -G "Visual Studio 17 2022" -T host=x64 -DCMAKE_INSTALL_PREFIX=%cwd%/Installation -D BUILD_opencv_java=OFF -D BUILD_opencv_python=OFF ..
34+
:: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx::
35+
:: Configure OpenCV
36+
cmake -G "Visual Studio 17 2022" -T host=x64 -DCMAKE_INSTALL_PREFIX=%cwd%/Installation -D BUILD_opencv_java=OFF -D BUILD_opencv_python=OFF -D BUILD_EXAMPLES=OFF -D INSTALL_C_EXAMPLES=OFF -D INSTALL_PYTHON_EXAMPLES=OFF ..
3737
::DO_NOT_CHANGE::
3838
::============================================::
39-
::Compile OpenCV in release mode
39+
:: Compile OpenCV in release mode
4040
cmake.exe --build . --config Debug --target INSTALL
4141
cd ..
4242
cd ..
4343
cd ..
44-

.github/workflows/ArduinoBuild.yml

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
2828

2929
board:
30+
# ESP32 devices for 3D matrix
3031
- esp32
3132
- esp32s2
3233
- m5stick-c
@@ -35,18 +36,29 @@ jobs:
3536
- esp32s3box
3637

3738
platform-version:
38-
# ESP32 Core versions
39-
- 1.0.6
40-
- 2.0.0
41-
- 2.0.1
42-
- 2.0.2
39+
# ESP32 Core versions for 3D matrix
40+
#- 1.0.6
41+
#- 2.0.0
42+
#- 2.0.1
43+
#- 2.0.2
4344
- 2.0.3
45+
- 2.0.4
46+
- 2.0.5
4447

4548
include:
4649
# 3D matrix doesn't apply to these:
47-
- { board: seeed_wio_terminal, platform: Seeeduino, archi: samd, platform-url: 'https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json', platform-version: 1.8.2, ... }
48-
- { board: 'd1_mini:eesz=4M3M,xtal=80', platform: esp8266, archi: esp8266, platform-url: 'https://arduino.esp8266.com/stable/package_esp8266com_index.json', platform-version: 3.0.1, ... }
49-
- { board: 'd1_mini:eesz=4M3M,xtal=80', platform: esp8266, archi: esp8266, platform-url: 'https://arduino.esp8266.com/stable/package_esp8266com_index.json', platform-version: 3.0.2, ... }
50+
- { board: 'd1_mini:eesz=4M3M,xtal=80', platform: esp8266, archi: esp8266, platform-version: 3.0.1, platform-url: 'https://arduino.esp8266.com/stable/package_esp8266com_index.json', ... }
51+
- { board: 'd1_mini:eesz=4M3M,xtal=80', platform: esp8266, archi: esp8266, platform-version: 3.0.2, platform-url: 'https://arduino.esp8266.com/stable/package_esp8266com_index.json', ... }
52+
- { board: seeed_wio_terminal, platform: Seeeduino, archi: samd, platform-version: 1.8.2, platform-url: 'https://files.seeedstudio.com/arduino/package_seeeduino_boards_index.json', ... }
53+
- { board: adafruit_hallowing, platform: adafruit, archi: samd, platform-version: 1.7.10, platform-url: 'https://adafruit.github.io/arduino-board-index/package_adafruit_index.json', ... }
54+
- { board: adafruit_hallowing_m4, platform: adafruit, archi: samd, platform-version: 1.7.10, platform-url: 'https://adafruit.github.io/arduino-board-index/package_adafruit_index.json', ... }
55+
- { board: adafruit_pybadge_m4, platform: adafruit, archi: samd, platform-version: 1.7.10, platform-url: 'https://adafruit.github.io/arduino-board-index/package_adafruit_index.json', ... }
56+
- { board: adafruit_pygamer_m4, platform: adafruit, archi: samd, platform-version: 1.7.10, platform-url: 'https://adafruit.github.io/arduino-board-index/package_adafruit_index.json', ... }
57+
- { board: adafruit_feather_esp32s2_tft, platform: esp32, archi: esp32, platform-version: latest, platform-url: 'https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json', ... }
58+
- { board: adafruit_feather_esp32s3_tft, platform: esp32, archi: esp32, platform-version: latest, platform-url: 'https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json', ... }
59+
- { board: adafruit_funhouse_esp32s2, platform: esp32, archi: esp32, platform-version: latest, platform-url: 'https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json', ... }
60+
- { board: rpipico, platform: rp2040, archi: rp2040, platform-version: 2.3.3, cli-args: '--build-property compiler.cpp.extra_flags=-DSKIP_I2C_TEST', platform-url: 'https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json', ... }
61+
5062
# 3D matrix applies to these:
5163
- { board: esp32, platform: esp32, archi: esp32, ... }
5264
- { board: esp32s2, platform: esp32, archi: esp32, ... }
@@ -56,35 +68,33 @@ jobs:
5668
- { board: esp32s3box, platform: esp32, archi: esp32, ... }
5769

5870
exclude:
59-
- board: esp32s3box
60-
platform-version: 1.0.6
61-
- board: esp32s3box
62-
platform-version: 2.0.0
63-
- board: esp32s3box
64-
platform-version: 2.0.1
65-
- board: esp32s3box
66-
platform-version: 2.0.2
67-
- board: esp32s2
68-
platform-version: 1.0.6
69-
- board: esp32s2
70-
platform-version: 2.0.0
71+
# 3D matrix excludes these:
72+
#- { board: esp32s3box, platform-version: 1.0.6 }
73+
#- { board: esp32s3box, platform-version: 2.0.0 }
74+
#- { board: esp32s3box, platform-version: 2.0.1 }
75+
#- { board: esp32s3box, platform-version: 2.0.2 }
76+
- { board: esp32s3box, platform-version: 2.0.4 }
77+
#- { board: esp32s2, platform-version: 1.0.6 }
78+
#- { board: esp32s2, platform-version: 2.0.0 }
79+
7180

7281
fail-fast: false
7382

7483
steps:
7584
- name: Checkout
76-
uses: actions/checkout@v2
85+
uses: actions/checkout@v3
7786
with:
7887
ref: ${{ github.event.pull_request.head.sha }}
7988

8089
- name: Compile example
81-
uses: ArminJo/arduino-test-compile@v3
90+
uses: ArminJo/arduino-test-compile@master
8291
with:
8392
arduino-board-fqbn: ${{matrix.platform}}:${{matrix.archi}}:${{matrix.board}}
8493
arduino-platform: ${{matrix.platform}}:${{matrix.archi}}@${{matrix.platform-version}}
8594
platform-url: ${{ matrix.platform-url }}
8695
required-libraries: ${{ matrix.required-libraries }}
87-
build-properties: ${{ toJson(matrix.build-properties) }}
96+
extra-arduino-cli-args: ${{ matrix.cli-args }}
97+
#build-properties: ${{ toJson(matrix.build-properties) }}
8898
sketch-names: ${{ env.SKETCH_NAME }}
8999
#sketches-exclude: ${{ matrix.sketches-exclude }}
90100

.github/workflows/IDFBuild.yml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ on:
1313
- '**.h'
1414
- '**.c'
1515
- '**IDFBuild.yml'
16+
- 'CMakeLists.txt'
1617
pull_request:
1718

1819
jobs:
@@ -28,44 +29,41 @@ jobs:
2829
2930
3031
31-
- esp32s2@v4.3.1
32+
- esp32s2@v4.4.1
3233
34+
35+
36+
3337

3438
include:
35-
- esp-idf-fqbn: [email protected]
36-
idf-board: esp32
37-
idf-version: v4.1
38-
- esp-idf-fqbn: [email protected]
39-
idf-board: esp32
40-
idf-version: v4.2
41-
- esp-idf-fqbn: [email protected]
42-
idf-board: esp32
43-
idf-version: v4.3.1
44-
- esp-idf-fqbn: [email protected]
45-
idf-board: esp32s2
46-
idf-version: v4.3.1
47-
- esp-idf-fqbn: [email protected]
48-
idf-board: esp32s3
49-
idf-version: v4.4.1
39+
- { esp-idf-fqbn: [email protected], idf-board: esp32, idf-version: v4.1 }
40+
- { esp-idf-fqbn: [email protected], idf-board: esp32, idf-version: v4.2 }
41+
- { esp-idf-fqbn: [email protected], idf-board: esp32, idf-version: v4.3.1 }
42+
- { esp-idf-fqbn: [email protected], idf-board: esp32s2, idf-version: v4.4.1 }
43+
- { esp-idf-fqbn: [email protected], idf-board: esp32s3, idf-version: v4.4.1 }
44+
- { esp-idf-fqbn: [email protected], idf-board: esp32, idf-version: v5.0 }
45+
- { esp-idf-fqbn: [email protected], idf-board: esp32s2, idf-version: v5.0 }
46+
- { esp-idf-fqbn: [email protected], idf-board: esp32s3, idf-version: v5.0 }
47+
5048

5149
fail-fast: false
5250

5351
steps:
5452
- name: Checkout
55-
uses: actions/checkout@v2
53+
uses: actions/checkout@v3
5654
with:
5755
ref: ${{ github.event.pull_request.head.sha }}
5856

5957
- name: Cache pip for ${{ matrix.esp-idf-fqbn }}
60-
uses: actions/cache@v2
58+
uses: actions/cache@v3
6159
with:
6260
path: ~/.cache/pip
6361
key: ${{ runner.os }}-pip-${{ matrix.idf-version }}-${{ hashFiles('**/requirements.txt') }}
6462
restore-keys: |
6563
${{ runner.os }}-pip-
6664
6765
- name: Cache espressif tools for ${{ matrix.esp-idf-fqbn }}
68-
uses: actions/cache@v2
66+
uses: actions/cache@v3
6967
id: espressif
7068
with:
7169
path: |
@@ -74,7 +72,7 @@ jobs:
7472

7573
- name: Cache esp-idf for ${{ matrix.esp-idf-fqbn }}
7674
id: cache-idf
77-
uses: actions/cache@v2
75+
uses: actions/cache@v3
7876
with:
7977
path: ~/esp/esp-idf
8078
key: ${{ runner.os }}-idf-${{ matrix.idf-version }}-${{ hashFiles('**/lockfiles') }}

.github/workflows/OpenCVBuild.yml

Lines changed: 51 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ on:
1818
- '**installOpenCV.bat'
1919
pull_request:
2020

21-
workflow_dispatch:
21+
# workflow_dispatch:
2222

2323
jobs:
2424

@@ -37,62 +37,90 @@ jobs:
3737

3838
steps:
3939
- name: Checkout
40-
uses: actions/checkout@v2
40+
uses: actions/checkout@v3
4141

42+
- name: 🪟 📦 Use GNU tar instead BSD tar
43+
if: matrix.os == 'windows-latest'
44+
shell: cmd
45+
run: echo C:\Program Files\Git\usr\bin>>"%GITHUB_PATH%"
4246

43-
- name: Cache OpenCV for Windows
47+
- name: 🪟 📦 Cache OpenCV for Windows
4448
if: ${{ matrix.os == 'windows-latest' }}
45-
uses: actions/cache@v2
49+
uses: actions/cache@v3
4650
id: cache-opencv-windows
4751
with:
48-
path: opencv-4.5.5
49-
key: ${{ runner.os }}-${{ hashFiles('.github/scripts/installOpenCV.bat') }}
52+
path: D:\a\LovyanGFX\LovyanGFX\opencv-4.5.5\
53+
key: ${{ matrix.os }}-opencv-cache
5054

51-
- name: Build+Install OpenCV for Windows
55+
- name: 🪟 🏗️ Build+Install OpenCV for Windows
5256
if: matrix.os == 'windows-latest' && steps.cache-opencv-windows.outputs.cache-hit != 'true'
57+
shell: pwsh
5358
run: |
5459
.github/scripts/installOpenCV.bat
60+
Remove-Item -Recurse -Force ${{ matrix.OpenCV_DIR }}modules
5561
56-
- name: Build LGFXOpenCV for Windows
57-
if: ${{ matrix.os == 'windows-latest' }}
62+
- name: 🪟 🏗️ Build LGFXOpenCV example for Windows
63+
if: matrix.os == 'windows-latest'
5864
env:
5965
OpenCV_DIR: ${{ matrix.OpenCV_DIR }}
6066
CC: clang
6167
CXX: clang++
6268
run: |
69+
Get-PSDrive
6370
cp .github/scripts/OpenCV.cmake ${{ env.PROJECT_DIR }}/CMakeLists.txt
6471
cd ${{ env.PROJECT_DIR }}
6572
mkdir build
6673
cd build
6774
cmake -G "Visual Studio 17 2022" -A x64 -T ClangCL ..
6875
cmake --build . --config Debug
6976
70-
- name: Cache OpenCV for linux
71-
if: ${{ matrix.os == 'ubuntu-latest' }}
72-
uses: actions/cache@v2
73-
id: opencv-cache
77+
- name: 🐧 📦 Cache OpenCV for Linux
78+
if: matrix.os == 'ubuntu-latest'
79+
uses: actions/cache@v3
80+
id: cache-opencv-linux
7481
with:
75-
path: ./opencv-install
76-
key: ${{ runner.os }}-opencv-cache
82+
path: /home/runner/work/LovyanGFX/LovyanGFX/opencv-install
83+
key: ${{ matrix.os }}-opencv-cache
7784

78-
- name: Build+Install OpenCV for linux
79-
if: ${{ matrix.os == 'ubuntu-latest' }}
85+
- name: 🐧 🏗️ Install OpenCV for Linux
86+
if: matrix.os == 'ubuntu-latest'
8087
uses: rayandrews/with-opencv-action@v1
8188
with:
82-
dir: ./opencv-install
83-
cached: ${{ steps.opencv-cache.outputs.cache-hit }}
89+
dir: /home/runner/work/LovyanGFX/LovyanGFX/opencv-install
90+
cached: ${{ steps.cache-opencv-linux.outputs.cache-hit }}
91+
BUILD_EXAMPLES: false
92+
INSTALL_C_EXAMPLES: false
93+
INSTALL_PYTHON_EXAMPLES: false
8494
opencv-version: '4.5.5'
8595

8696

87-
- name: Install OpenCV for Mac
97+
- name: 🍏 📦 🍺 Cache brew deps for MacOS
8898
if: matrix.os == 'macos-latest'
99+
uses: actions/cache@v3
100+
id: cache-opencv-macosx
101+
with:
102+
# Paths to cache:
103+
# /usr/local/Homebrew - installation folder of Homebrew
104+
# /usr/local/Cellar - installation folder of Homebrew formulae
105+
# /usr/local/Frameworks, /usr/local/bin, /usr/local/opt - contain (links to) binaries installed by Homebrew formulae
106+
# /usr/local/lib/python3.8 - Python3 packages installation
107+
path: |
108+
/usr/local/Homebrew
109+
/usr/local/Cellar
110+
/usr/local/Frameworks
111+
/usr/local/bin
112+
/usr/local/opt
113+
/usr/local/lib/python3.8
114+
key: ${{ matrix.os }}-opencv
115+
116+
- name: 🍏 🍺 Install OpenCV+CMake brew packages for MacOS
117+
if: matrix.os == 'macos-latest' && steps.cache-opencv-macosx.outputs.cache-hit != 'true'
89118
env:
90119
HOMEBREW_NO_AUTO_UPDATE: 1
91120
run: brew install opencv cmake
92121

93-
94-
- name: Build LGFXOpenCV for Mac/Linux
95-
if: ${{ matrix.os != 'windows-latest' }}
122+
- name: 🐧/🍏 🏗️ Build LGFXOpenCV example for Linux/MacOS
123+
if: matrix.os != 'windows-latest'
96124
env:
97125
OpenCV_DIR: ${{ matrix.OpenCV_DIR }}
98126
run: |
@@ -102,4 +130,3 @@ jobs:
102130
cd build
103131
cmake ..
104132
cmake --build .
105-

0 commit comments

Comments
 (0)