forked from AlexeyAB/darknet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
268 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,250 @@ | ||
name: Darknet Continuous Integration | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
linux-build-vcpkg: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Install system dependencies | ||
- name: Update apt | ||
run: sudo apt update | ||
- name: Install dependencies | ||
run: sudo apt install libopencv-dev yasm | ||
|
||
# Install latest CMake. | ||
- uses: lukka/get-cmake@latest | ||
|
||
# Restore from cache the previously built ports. If "cache miss", then provision vcpkg, install desired ports, finally cache everything for the next run. | ||
- name: Restore from cache and run vcpkg | ||
env: | ||
vcpkgResponseFile: ${{ github.workspace }}/cmake/vcpkg_linux.diff | ||
uses: lukka/run-vcpkg@v2 | ||
with: | ||
# Response file stored in source control, it provides the list of ports and triplet(s). | ||
vcpkgArguments: '@${{ env.vcpkgResponseFile }}' | ||
# Location of the vcpkg as submodule of the repository. | ||
vcpkgDirectory: '${{ github.workspace }}/vcpkg' | ||
vcpkgGitCommitId: '2bc6cd714f931c32d3299a137d5abe0f86f803e1' | ||
# Since the cache must be invalidated when content of the response file changes, let's | ||
# compute its hash and append this to the computed cache's key. | ||
appendedCacheKey: ${{ hashFiles(env.vcpkgResponseFile) }} | ||
|
||
- name: 'Build with CMake and Ninja' | ||
uses: lukka/run-cmake@v2 | ||
with: | ||
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | ||
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | ||
useVcpkgToolchainFile: true | ||
buildDirectory: '${{ runner.workspace }}/buildDirectory' | ||
cmakeBuildType: 'Release' | ||
cmakeAppendedArgs: "-DBUILD_SHARED_LIBS=OFF" | ||
buildWithCMakeArgs: '--target install' | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-vcpkg-${{ runner.os }} | ||
path: cfg | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-vcpkg-${{ runner.os }} | ||
path: data | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-vcpkg-${{ runner.os }} | ||
path: ${{ github.workspace }}/*dark* | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-vcpkg-${{ runner.os }} | ||
path: ${{ github.workspace }}/uselib* | ||
|
||
|
||
linux-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Install system dependencies | ||
- name: Update apt | ||
run: sudo apt update | ||
- name: Install dependencies | ||
run: sudo apt install libopencv-dev yasm | ||
|
||
# Install latest CMake. | ||
- uses: lukka/get-cmake@latest | ||
|
||
- name: 'Build with CMake and Ninja' | ||
uses: lukka/run-cmake@v2 | ||
with: | ||
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | ||
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | ||
useVcpkgToolchainFile: true | ||
buildDirectory: '${{ runner.workspace }}/buildDirectory' | ||
cmakeBuildType: 'Release' | ||
buildWithCMakeArgs: '--target install' | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-${{ runner.os }} | ||
path: cfg | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-${{ runner.os }} | ||
path: data | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-${{ runner.os }} | ||
path: ${{ github.workspace }}/*dark* | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-${{ runner.os }} | ||
path: ${{ github.workspace }}/uselib* | ||
|
||
|
||
macos-build-vcpkg: | ||
runs-on: macOS-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Install system dependencies | ||
- name: Install dependencies | ||
run: brew install opencv libomp yasm | ||
|
||
# Install latest CMake. | ||
- uses: lukka/get-cmake@latest | ||
|
||
# Restore from cache the previously built ports. If "cache miss", then provision vcpkg, install desired ports, finally cache everything for the next run. | ||
- name: Restore from cache and run vcpkg | ||
env: | ||
vcpkgResponseFile: ${{ github.workspace }}/cmake/vcpkg_osx.diff | ||
uses: lukka/run-vcpkg@v2 | ||
with: | ||
# Response file stored in source control, it provides the list of ports and triplet(s). | ||
vcpkgArguments: '@${{ env.vcpkgResponseFile }}' | ||
# Location of the vcpkg as submodule of the repository. | ||
vcpkgDirectory: '${{ github.workspace }}/vcpkg' | ||
vcpkgGitCommitId: '2bc6cd714f931c32d3299a137d5abe0f86f803e1' | ||
# Since the cache must be invalidated when content of the response file changes, let's | ||
# compute its hash and append this to the computed cache's key. | ||
appendedCacheKey: ${{ hashFiles(env.vcpkgResponseFile) }} | ||
|
||
- name: 'Build with CMake and Ninja' | ||
uses: lukka/run-cmake@v2 | ||
with: | ||
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | ||
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | ||
useVcpkgToolchainFile: true | ||
buildDirectory: '${{ runner.workspace }}/buildDirectory' | ||
cmakeBuildType: 'Release' | ||
cmakeAppendedArgs: "-DBUILD_SHARED_LIBS=OFF" | ||
buildWithCMakeArgs: '--target install' | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-vcpkg-${{ runner.os }} | ||
path: cfg | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-vcpkg-${{ runner.os }} | ||
path: data | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-vcpkg-${{ runner.os }} | ||
path: ${{ github.workspace }}/*dark* | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-vcpkg-${{ runner.os }} | ||
path: ${{ github.workspace }}/uselib* | ||
|
||
|
||
macos-build: | ||
runs-on: macOS-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Install system dependencies | ||
- name: Install dependencies | ||
run: brew install opencv libomp yasm | ||
|
||
# Install latest CMake. | ||
- uses: lukka/get-cmake@latest | ||
|
||
- name: 'Build with CMake and Ninja' | ||
uses: lukka/run-cmake@v2 | ||
with: | ||
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | ||
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | ||
useVcpkgToolchainFile: true | ||
buildDirectory: '${{ runner.workspace }}/buildDirectory' | ||
cmakeBuildType: 'Release' | ||
buildWithCMakeArgs: '--target install' | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-${{ runner.os }} | ||
path: cfg | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-${{ runner.os }} | ||
path: data | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-${{ runner.os }} | ||
path: ${{ github.workspace }}/*dark* | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-${{ runner.os }} | ||
path: ${{ github.workspace }}/uselib* | ||
|
||
|
||
windows-build-vcpkg: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Install latest CMake. | ||
- uses: lukka/get-cmake@latest | ||
|
||
# Restore from cache the previously built ports. If "cache miss", then provision vcpkg, install desired ports, finally cache everything for the next run. | ||
- name: Restore from cache and run vcpkg | ||
env: | ||
vcpkgResponseFile: ${{ github.workspace }}/cmake/vcpkg_windows.diff | ||
uses: lukka/run-vcpkg@v2 | ||
with: | ||
# Response file stored in source control, it provides the list of ports and triplet(s). | ||
vcpkgArguments: '@${{ env.vcpkgResponseFile }}' | ||
# Location of the vcpkg as submodule of the repository. | ||
vcpkgDirectory: '${{ github.workspace }}/vcpkg' | ||
vcpkgGitCommitId: '2bc6cd714f931c32d3299a137d5abe0f86f803e1' | ||
# Since the cache must be invalidated when content of the response file changes, let's | ||
# compute its hash and append this to the computed cache's key. | ||
appendedCacheKey: ${{ hashFiles(env.vcpkgResponseFile) }} | ||
|
||
- name: 'Build with CMake and Ninja' | ||
uses: lukka/run-cmake@v2 | ||
with: | ||
cmakeListsOrSettingsJson: CMakeListsTxtAdvanced | ||
cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' | ||
useVcpkgToolchainFile: true | ||
buildDirectory: '${{ runner.workspace }}/buildDirectory' | ||
cmakeBuildType: 'Release' | ||
buildWithCMakeArgs: '--target install' | ||
|
||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-vcpkg-${{ runner.os }} | ||
path: cfg | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-vcpkg-${{ runner.os }} | ||
path: data | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-vcpkg-${{ runner.os }} | ||
path: ${{ github.workspace }}/*dark* | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: darknet-vcpkg-${{ runner.os }} | ||
path: ${{ github.workspace }}/uselib* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
stb | ||
pthreads | ||
ffmpeg | ||
opencv[ffmpeg] | ||
--triplet | ||
x64-linux |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
stb | ||
pthreads | ||
ffmpeg | ||
opencv[ffmpeg] | ||
--triplet | ||
x64-osx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
stb | ||
pthreads | ||
ffmpeg | ||
opencv[ffmpeg] | ||
--triplet | ||
x64-windows |