This repository has been archived by the owner on Jan 18, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* build: copy opencv.BUILD from MediaPipeUnityPlugin * chore: current end_of_line is LF * build: remove opencv_deps option * ci: enable Windows * build: pass environment variables to build OpenCV * ci: disable LAPACK * ci: ignore SignalAbortTest on Windows * test: fix tests on Windows * doc: remove an incorrect line * Do not upload contents of build/ We already have Bazel Caching so I doubt we even needed this. Co-authored-by: Capuccino <ayane@vignetteapp.org>
- Loading branch information
Showing
9 changed files
with
288 additions
and
202 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
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 |
---|---|---|
@@ -1,96 +1,96 @@ | ||
on: [push, pull_request] | ||
name: Continuous Integration | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ${{matrix.os.fullname}} | ||
env: | ||
PROJECT_NAME: Akihabara | ||
NET_ENV: net5.0 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
# - { prettyname: Windows, fullname: windows-latest } | ||
- { prettyname: Linux, fullname: ubuntu-latest } | ||
steps: | ||
- name: Cache Bazel directory | ||
uses: actions/cache@v2 | ||
if: ${{ always() }} | ||
env: | ||
cache-name: bazel-cache | ||
with: | ||
path: ~/.cache/bazel | ||
key: ${{runner.os}}-${{env.cache-name}}-dev | ||
|
||
- name: Cache build directory | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: build-cache | ||
with: | ||
path: build | ||
key: ${{runner.os}}-${{env.cache-name}}-dev | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install .NET 5.0.x | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: "5.0.x" | ||
|
||
# FIXME: Setup will fail if you use a Python version lower than 3.9 | ||
- name: Force Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9" | ||
architecture: "x64" | ||
|
||
- name: Set up MinGW | ||
if: ${{ matrix.os.prettyname == 'Windows' }} | ||
uses: egor-tensin/setup-mingw@v2 | ||
with: | ||
platform: x64 | ||
|
||
- name: Build (Native, Windows) | ||
if: ${{ matrix.os.prettyname == 'Windows' }} | ||
run: | | ||
echo "Setting PYTHON_BIN_PATH to python in PATH" | ||
$env:PYTHON_BIN_PATH=(Get-Command python).Path | ||
echo $env:PYTHON_BIN_PATH | ||
pip install numpy | ||
python build.py build --desktop cpu --opencv=local -vv | ||
- name: Build (Native, *nix) | ||
if: ${{ matrix.os.prettyname != 'Windows' }} | ||
run: | | ||
pip install numpy | ||
python build.py build --desktop cpu --opencv=cmake -vv | ||
- name: Build (.NET) | ||
run: dotnet build -c Debug src/${{env.PROJECT_NAME}}.sln | ||
|
||
- name: Copy libmediapipe_c.* into Akihabara.tests | ||
run: cp $pwd/src/${{env.PROJECT_NAME}}/bin/Debug/${{env.NET_ENV}}/libmediapipe_c.* $pwd/src/${{env.PROJECT_NAME}}.Tests/bin/Debug/${{env.NET_ENV}}/ | ||
shell: pwsh | ||
|
||
- name: Test (CPU) | ||
run: dotnet test --filter TestCategory!=GpuOnlyTest "$pwd/src/${{env.PROJECT_NAME}}.Tests" --logger "trx;LogFileName=TestResults-${{matrix.os.prettyname}}.trx" | ||
shell: pwsh | ||
|
||
# Attempt to upload results even if test fails. | ||
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#always | ||
- name: Upload Test Results (${{matrix.os.prettyname}}) | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
with: | ||
name: TestResults-${{matrix.os.prettyname}} | ||
path: ${{github.workspace}}/src/Akihabara.Tests/TestResults/TestResults-${{matrix.os.prettyname}}.trx | ||
|
||
# The contents of the build folder | ||
- name: Upload Build Artifacts (${{matrix.os.prettyname}}) | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build-artifacts-${{matrix.os.prettyname}} | ||
path: build/ | ||
on: [push, pull_request] | ||
name: Continuous Integration | ||
|
||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ${{matrix.os.fullname}} | ||
env: | ||
PROJECT_NAME: Akihabara | ||
NET_ENV: net5.0 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: | ||
- { prettyname: Windows, fullname: windows-latest } | ||
- { prettyname: Linux, fullname: ubuntu-latest } | ||
steps: | ||
- name: Cache Bazel directory | ||
uses: actions/cache@v2 | ||
if: ${{ always() }} | ||
env: | ||
cache-name: bazel-cache | ||
with: | ||
path: ~/.cache/bazel | ||
key: ${{runner.os}}-${{env.cache-name}}-dev | ||
|
||
- name: Cache build directory | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: build-cache | ||
with: | ||
path: build | ||
key: ${{runner.os}}-${{env.cache-name}}-dev | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install .NET 5.0.x | ||
uses: actions/setup-dotnet@v1 | ||
with: | ||
dotnet-version: "5.0.x" | ||
|
||
# FIXME: Setup will fail if you use a Python version lower than 3.9 | ||
- name: Force Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.9" | ||
architecture: "x64" | ||
|
||
- name: Set up MinGW | ||
if: ${{ matrix.os.prettyname == 'Windows' }} | ||
uses: egor-tensin/setup-mingw@v2 | ||
with: | ||
platform: x64 | ||
|
||
- name: Build (Native, Windows) | ||
if: ${{ matrix.os.prettyname == 'Windows' }} | ||
run: | | ||
echo "Setting PYTHON_BIN_PATH to python in PATH" | ||
$env:PYTHON_BIN_PATH=(Get-Command python).Path | ||
echo $env:PYTHON_BIN_PATH | ||
pip install numpy | ||
python build.py build --desktop cpu --opencv=cmake -vv | ||
- name: Build (Native, *nix) | ||
if: ${{ matrix.os.prettyname != 'Windows' }} | ||
run: | | ||
pip install numpy | ||
python build.py build --desktop cpu --opencv=cmake -vv | ||
- name: Build (.NET) | ||
run: dotnet build -c Debug src/${{env.PROJECT_NAME}}.sln | ||
|
||
- name: Copy libmediapipe_c.* into Akihabara.tests | ||
run: cp $pwd/src/${{env.PROJECT_NAME}}/bin/Debug/${{env.NET_ENV}}/libmediapipe_c.* $pwd/src/${{env.PROJECT_NAME}}.Tests/bin/Debug/${{env.NET_ENV}}/ | ||
shell: pwsh | ||
|
||
# On Windows, ignore tests that can signal SIGABRT because it will abort the process. | ||
- name: Test (CPU, Windows) | ||
if: ${{ matrix.os.prettyname == 'Windows' }} | ||
run: dotnet test --filter "TestCategory!=GpuOnlyTest&TestCategory!=SignalAbortTest" "$pwd/src/${{env.PROJECT_NAME}}.Tests" --logger "trx;LogFileName=TestResults-${{matrix.os.prettyname}}.trx" | ||
shell: pwsh | ||
|
||
- name: Test (CPU, *nix) | ||
if: ${{ matrix.os.prettyname != 'Windows' }} | ||
run: dotnet test --filter TestCategory!=GpuOnlyTest "$pwd/src/${{env.PROJECT_NAME}}.Tests" --logger "trx;LogFileName=TestResults-${{matrix.os.prettyname}}.trx" | ||
shell: pwsh | ||
|
||
# Attempt to upload results even if test fails. | ||
# https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#always | ||
- name: Upload Test Results (${{matrix.os.prettyname}}) | ||
uses: actions/upload-artifact@v2 | ||
if: ${{ always() }} | ||
with: | ||
name: TestResults-${{matrix.os.prettyname}} | ||
path: ${{github.workspace}}/src/Akihabara.Tests/TestResults/TestResults-${{matrix.os.prettyname}}.trx |
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
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
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
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
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
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
Oops, something went wrong.