Skip to content

Commit

Permalink
add a very small test on a couple of platform in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cenit committed Sep 26, 2023
1 parent a3e7216 commit c883632
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 12 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,12 @@ jobs:
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -ForceCPP -DisableInteractive -DoNotUpdateTOOL

- name: Test on data/dog.jpg
shell: bash
run: >
wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights -O ${{ github.workspace }}/yolov4-tiny.weights;
${{ github.workspace }}/build_release/darknet detect ${{ github.workspace }}/cfg/yolov4-tiny.cfg ${{ github.workspace }}/yolov4-tiny.weights ${{ github.workspace }}/data/dog.jpg -dont_show
ubuntu-setup-sh:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -628,16 +634,40 @@ jobs:
run: ${{ github.workspace }}/scripts/setup.ps1 -InstallCUDA


win-intlibs-cpp:
win-vcpkg-base-cpp:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

- uses: lukka/get-cmake@latest

- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source https://93.49.111.10:5555/v3/index.json
- name: Setup NuGet API key if found
shell: bash
env:
BAGET_API_KEY: ${{ secrets.BAGET_API_KEY }}
if: env.BAGET_API_KEY != null
run: >
$(./vcpkg/vcpkg fetch nuget | tail -n 1)
setapikey ${{ secrets.BAGET_API_KEY }}
-Source https://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -ForceCPP -DisableInteractive -DoNotUpdateTOOL
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -ForceLocalVCPKG -DoNotUpdateVCPKG -ForceCPP -DisableInteractive -DoNotUpdateTOOL

- name: Download yolov4-tiny.weights
run: curl.exe -L https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights -o ${{ github.workspace }}\yolov4-tiny.weights
- name: Test on data/dog.jpg
run: ${{ github.workspace }}\build_release\darknet.exe detect ${{ github.workspace }}\cfg\yolov4-tiny.cfg ${{ github.workspace }}\yolov4-tiny.weights ${{ github.workspace }}\data\dog.jpg


win-csharp:
Expand Down
31 changes: 22 additions & 9 deletions .github/workflows/on_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,12 @@ jobs:
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -ForceCPP -DisableInteractive -DoNotUpdateTOOL

- name: Test on data/dog.jpg
shell: bash
run: >
wget https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights -O ${{ github.workspace }}/yolov4-tiny.weights;
${{ github.workspace }}/build_release/darknet detect ${{ github.workspace }}/cfg/yolov4-tiny.cfg ${{ github.workspace }}/yolov4-tiny.weights ${{ github.workspace }}/data/dog.jpg -dont_show
ubuntu-setup-sh:
runs-on: ubuntu-20.04
Expand Down Expand Up @@ -380,16 +386,30 @@ jobs:
run: ${{ github.workspace }}/scripts/setup.ps1 -InstallCUDA


win-intlibs-cpp:
win-vcpkg-base-cpp:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

- uses: lukka/get-cmake@latest

- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
run: >
git clone --depth 1 https://github.com/microsoft/vcpkg ;
./vcpkg/bootstrap-vcpkg.sh ;
$(./vcpkg/vcpkg fetch nuget | tail -n 1) sources add
-Name "vcpkgbinarycache"
-Source https://93.49.111.10:5555/v3/index.json
- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -ForceCPP -DisableInteractive -DoNotUpdateTOOL
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -ForceLocalVCPKG -DoNotUpdateVCPKG -ForceCPP -DisableInteractive -DoNotUpdateTOOL

- name: Download yolov4-tiny.weights
run: curl.exe -L https://github.com/AlexeyAB/darknet/releases/download/darknet_yolo_v4_pre/yolov4-tiny.weights -o ${{ github.workspace }}\yolov4-tiny.weights
- name: Test on data/dog.jpg
run: ${{ github.workspace }}\build_release\darknet.exe detect ${{ github.workspace }}\cfg\yolov4-tiny.cfg ${{ github.workspace }}\yolov4-tiny.weights ${{ github.workspace }}\data\dog.jpg


win-csharp:
Expand Down Expand Up @@ -440,10 +460,3 @@ jobs:
- uses: actions/checkout@v3

- uses: lukka/get-cmake@latest

- name: 'Build with CMake'
run: |
mkdir build_release
cd build_release
cmake .. -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF
cmake --build . --config Release --target install
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.csv
*.out
*.png
*.jpg
*.so
*.exe
*.dll
Expand Down Expand Up @@ -65,4 +66,5 @@ include/darknet/
uselib
uselib_track
darknet
kmeansiou
vcpkg/
3 changes: 2 additions & 1 deletion src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ void log_backtrace()

void error(const char * const msg, const char * const filename, const char * const funcname, const int line)
{
fprintf(stderr, "Darknet error location: %s, %s(), line #%d\n", filename, funcname, line);
printf("Darknet error location: %s, %s(), line #%d\n", filename, funcname, line);
fflush(stdout);
perror(msg);
log_backtrace();
exit(EXIT_FAILURE);
Expand Down

0 comments on commit c883632

Please sign in to comment.