Skip to content

Commit

Permalink
update github actions (#8829)
Browse files Browse the repository at this point in the history
* update github actions
* consolidate versions
* bump minimum cmake version
  • Loading branch information
cenit authored Aug 24, 2023
1 parent d2c3788 commit a87fe0b
Show file tree
Hide file tree
Showing 6 changed files with 132 additions and 103 deletions.
114 changes: 55 additions & 59 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
ubuntu-makefile:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Update apt
run: sudo apt update
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
ubuntu-vcpkg-opencv4-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
Expand Down Expand Up @@ -125,19 +125,19 @@ jobs:
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -EnableCUDA -EnableCUDNN -DisableInteractive -DoNotUpdateTOOL

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-cuda-${{ runner.os }}
path: cfg
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-cuda-${{ runner.os }}
path: data
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-cuda-${{ runner.os }}
path: ${{ github.workspace }}/*dark*
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-cuda-${{ runner.os }}
path: ${{ github.workspace }}/uselib*
Expand All @@ -146,7 +146,7 @@ jobs:
ubuntu-vcpkg-opencv3-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: lukka/get-cmake@latest

Expand Down Expand Up @@ -197,7 +197,7 @@ jobs:
ubuntu-vcpkg-opencv2-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: lukka/get-cmake@latest

Expand Down Expand Up @@ -248,7 +248,7 @@ jobs:
ubuntu:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Update apt
run: sudo apt update
Expand All @@ -266,19 +266,19 @@ jobs:
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ${{ github.workspace }}/build.ps1 -EnableOPENCV -DisableInteractive -DoNotUpdateTOOL

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: cfg
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: data
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: ${{ github.workspace }}/*dark*
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: ${{ github.workspace }}/uselib*
Expand All @@ -287,7 +287,7 @@ jobs:
ubuntu-cuda:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Update apt
run: sudo apt update
Expand Down Expand Up @@ -315,19 +315,19 @@ jobs:
LD_LIBRARY_PATH: "/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs:$LD_LIBRARY_PATH"
run: ${{ github.workspace }}/build.ps1 -EnableOPENCV -EnableCUDA -EnableCUDNN -DisableInteractive -DoNotUpdateTOOL

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-cuda-${{ runner.os }}
path: cfg
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-cuda-${{ runner.os }}
path: data
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-cuda-${{ runner.os }}
path: ${{ github.workspace }}/*dark*
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-cuda-${{ runner.os }}
path: ${{ github.workspace }}/uselib*
Expand All @@ -336,7 +336,7 @@ jobs:
ubuntu-no-ocv-cpp:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: lukka/get-cmake@latest

Expand All @@ -348,7 +348,7 @@ jobs:
ubuntu-setup-sh:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
Expand Down Expand Up @@ -377,7 +377,7 @@ jobs:
osx-vcpkg:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
Expand Down Expand Up @@ -411,19 +411,19 @@ jobs:
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -DoNotUpdateVCPKG -EnableOPENCV -DisableInteractive -DoNotUpdateTOOL

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: cfg
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: data
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: ${{ github.workspace }}/*dark*
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: ${{ github.workspace }}/uselib*
Expand All @@ -432,7 +432,7 @@ jobs:
osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Install dependencies
run: brew install opencv libomp
Expand All @@ -443,19 +443,19 @@ jobs:
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -EnableOPENCV -DisableInteractive -DoNotUpdateTOOL

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: cfg
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: data
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: ${{ github.workspace }}/*dark*
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: ${{ github.workspace }}/uselib*
Expand All @@ -464,7 +464,7 @@ jobs:
osx-no-ocv-no-omp-cpp:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: lukka/get-cmake@latest

Expand All @@ -476,7 +476,7 @@ jobs:
win-vcpkg:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
Expand Down Expand Up @@ -507,23 +507,23 @@ jobs:
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -UseVCPKG -ForceLocalVCPKG -DoNotUpdateVCPKG -EnableOPENCV -DisableInteractive -DoNotUpdateTOOL

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: cfg
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: data
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: ${{ github.workspace }}/*dark*
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: ${{ github.workspace }}/build_release/*.dll
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-vcpkg-${{ runner.os }}
path: ${{ github.workspace }}/uselib*
Expand All @@ -532,7 +532,7 @@ jobs:
win-vcpkg-port:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
Expand Down Expand Up @@ -561,31 +561,31 @@ jobs:
win-intlibs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: lukka/get-cmake@latest

- name: 'Build'
shell: pwsh
run: ${{ github.workspace }}/build.ps1 -DisableInteractive -DoNotUpdateTOOL

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: cfg
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: data
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: ${{ github.workspace }}/*dark*
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: ${{ github.workspace }}/3rdparty/pthreads/bin/*.dll
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
with:
name: darknet-${{ runner.os }}
path: ${{ github.workspace }}/uselib*
Expand All @@ -594,7 +594,7 @@ jobs:
win-setup-ps1:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: 'Setup vcpkg and NuGet artifacts backend'
shell: bash
Expand Down Expand Up @@ -623,7 +623,7 @@ jobs:
win-intlibs-cpp:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: lukka/get-cmake@latest

Expand All @@ -635,7 +635,7 @@ jobs:
win-csharp:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: lukka/get-cmake@latest

Expand All @@ -647,7 +647,7 @@ jobs:
win-intlibs-cuda:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: 'Install CUDA'
run: ${{ github.workspace }}/scripts/deploy-cuda.ps1

Expand All @@ -665,7 +665,7 @@ jobs:
win-powershell51:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: lukka/get-cmake@latest

Expand All @@ -677,17 +677,13 @@ jobs:
mingw:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: lukka/get-cmake@latest

- name: 'Build with CMake'
uses: lukka/run-cmake@v3
with:
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt'
useVcpkgToolchainFile: true
buildDirectory: '${{ runner.workspace }}/buildDirectory'
cmakeAppendedArgs: "-G\"MinGW Makefiles\" -DCMAKE_BUILD_TYPE=Release -DENABLE_CUDA=OFF -DENABLE_CUDNN=OFF -DENABLE_OPENCV=OFF"
cmakeBuildType: 'Release'
buildWithCMakeArgs: '--config Release --target install'
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
Loading

0 comments on commit a87fe0b

Please sign in to comment.