Image edgedetect #5162
Workflow file for this run
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
name: Integrated Test | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Check if is release commit | |
id: is-release-step | |
uses: mstachniuk/[email protected] | |
with: | |
commit-filter: '[release]' | |
outputs: | |
deploy: ${{ steps.is-release-step.outputs.ci-skip }} | |
vcpkg: true | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- label: x86_64-linux-cpu | |
os: ubuntu-20.04 | |
triplet: x64-linux | |
cxx: g++-9 | |
gpu: cpu | |
pkgext: tar.gz | |
- label: x86_64-windows-cpu | |
os: windows-2019 | |
triplet: x64-windows | |
gpu: cpu | |
pkgext: zip | |
- label: x86_64-linux-cuda | |
os: ubuntu-20.04 | |
triplet: x64-linux | |
cxx: g++-10 | |
gpu: cuda | |
pkgext: tar.gz | |
- label: x86_64-windows-cuda | |
os: windows-2019 | |
triplet: x64-windows | |
gpu: cuda | |
pkgext: zip | |
runs-on: ${{ matrix.os }} | |
needs: [check] | |
env: | |
CXX: ${{ matrix.cxx }} | |
VCPKG_DEFAULT_TRIPLET: ${{ needs.check.outputs.vcpkg == 'true' && matrix.triplet || '' }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Cache Qt | |
id: cache-qt | |
uses: actions/cache@v1 | |
with: | |
path: ../Qt | |
key: ${{ runner.os }}-QtCache | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v2 | |
with: | |
version: 5.15.2 | |
cached: ${{ steps.cache-qt.outputs.cache-hit }} | |
setup-python: true | |
- name: Install CUDA toolkit (Windows) | |
if: ${{ matrix.gpu == 'cuda' && runner.os == 'Windows' }} | |
env: | |
cuda: 11.7.1 | |
visual_studio: "Visual Studio 16 2019" | |
shell: powershell | |
run: .\misc\ci\win\install_cuda_windows.ps1 | |
- name: Install CUDA toolkit (Ubuntu) | |
if: ${{ matrix.gpu == 'cuda' && runner.os == 'Linux' }} | |
env: | |
cuda: 11.7.1 | |
shell: bash | |
run: ./misc/ci/nix/install_cuda_ubuntu.sh | |
- name: Check CUDA toolkit (Windows) | |
if: ${{ matrix.gpu == 'cuda' && runner.os == 'Windows' }} | |
shell: powershell | |
run: | | |
ls $env:CUDA_PATH | |
ls $env:CUDA_PATH\bin | |
ls $env:CUDA_PATH\lib | |
ls $env:CUDA_PATH\lib\cmake | |
ls $env:CUDA_PATH\lib\x64 | |
echo "PATH is $($env:PATH)" | |
nvcc -V | |
python misc/ci/fuckwenpath.py | |
- name: Check CUDA toolkit (Ubuntu) | |
if: ${{ matrix.gpu == 'cuda' && runner.os == 'Linux' }} | |
shell: bash | |
run: | | |
nvcc -V | |
which nvcc | |
- name: Setup Dependencies | |
if: ${{ needs.check.outputs.vcpkg == 'true' }} | |
run: python misc/ci/setup.py | |
- name: Setup Vcpkg | |
uses: lukka/run-vcpkg@v10 | |
if: ${{ needs.check.outputs.vcpkg == 'true' }} | |
with: | |
vcpkgGitCommitId: 7e7c62d863b1bf599c1d104b76cd8b74475844d4 | |
vcpkgDirectory: ${{ github.workspace }}/vcpkg | |
vcpkgJsonGlob: '**/vcpkg.json' | |
runVcpkgInstall: true | |
- name: Run CMake | |
id: run_cmake | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: ${{ (needs.check.outputs.vcpkg == 'true' && (matrix.gpu == 'cuda' && 'cuda' || 'default') || 'basic') }} | |
buildPreset: default | |
- name: Process CMake Error | |
if: ${{ (failure() && steps.run_cmake.outcome == 'failure') }} | |
#if: ${{ (failure() && steps.run_cmake.outcome == 'failure') || success() }} | |
working-directory: ${{ github.workspace }} | |
shell: bash | |
run: | | |
if [[ -f "build/CMakeFiles/CMakeOutput.log" ]]; then | |
echo "---- build/CMakeFiles/CMakeOutput.log" | |
cat build/CMakeFiles/CMakeOutput.log | |
echo "----" | |
fi | |
if [[ -f "build/CMakeFiles/CMakeError.log" ]]; then | |
echo "---- build/CMakeFiles/CMakeError.log" | |
cat build/CMakeFiles/CMakeError.log | |
echo "----" | |
fi | |
if [[ -f "build/CMakeCache.txt" ]]; then | |
echo "---- build/CMakeCache.txt" | |
cat build/CMakeCache.txt | |
echo "----" | |
fi | |
- name: Packaging | |
if: ${{ needs.check.outputs.deploy == 'true' }} | |
run: python misc/ci/package.py | |
- name: Upload Release Artifact | |
if: ${{ needs.check.outputs.deploy == 'true' }} | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.label }}-Package | |
path: ${{github.workspace}}/build/out.${{ matrix.pkgext }} | |
release: | |
if: ${{ needs.check.outputs.deploy == 'true' }} | |
needs: [check, build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Versioning | |
id: versioning | |
shell: python | |
run: | | |
import datetime | |
d = datetime.datetime.now() | |
print('::set-output name=version::{}.{}.{}'.format(d.year, d.month, d.day)) | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
draft: false | |
prerelease: false | |
tag_name: ${{ steps.versioning.outputs.version }} | |
release_name: ${{ steps.versioning.outputs.version }} | |
body: "(Automated Release by Github Actions / 由 GitHub CI/CD 自动发布)\n\n- branch `${{ github.ref }}`\n- commit `${{ github.sha }}`\n- message `${{ github.event.head_commit.message }}`\n- version `${{ steps.versioning.outputs.version }}`\n\n- Windows: After download, extract the zip file to a directory, then double-click the file `000_start.bat` in that directory to start our application. Alternatively you may manually run `zenoedit.exe`. If you encounter bugs, please let us know by submitting a [Github Issue](https://github.com/zenustech/zeno/issues), thank for your support!\n- Linux: Our released binary support Ubuntu 20.04 and above, otherwise please build from source. Extract the downloaded tar.gz to a directory, then run `bash 000_start.sh` in that directory to start our application. Alternatively you may manually run `usr/bin/zenoedit` in there. Try `chmod +x usr/bin/*` if they don't have execute permission.\n- Windows: 下载后,把 zip 文件解压到一个目录,然后双击其中的 `000_start.bat` 这个文件,即可启动我们的程序。此外您也可以找到 `zenoedit.exe` 直接双击运行。如果您遇到了 BUG,请通过提交 [Github Issue](https://github.com/zenustech/zeno/issues) 的方式来反馈给我们, 感谢您的支持!\n- Linux: 我们发布的二进制版支持 Ubuntu 20.04 以上的系统,否则请从源码构建。把下载的 tar.gz 文件解压到一个目录,然后在那个目录中运行命令 `bash 000_start.sh` 即可启动我们的程序。此外您也可以直接运行其中的 `usr/bin/zenoedit`。如果遇到没有执行权限的问题可以试试看 `chmod +x usr/bin/*`。" | |
outputs: | |
version: ${{ steps.versioning.outputs.version }} | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
deploy: | |
strategy: | |
matrix: | |
include: | |
- label: x86_64-linux-cpu | |
pkgext: tar.gz | |
- label: x86_64-windows-cpu | |
pkgext: zip | |
- label: x86_64-linux-cuda | |
pkgext: tar.gz | |
- label: x86_64-windows-cuda | |
pkgext: zip | |
if: ${{ needs.check.outputs.deploy == 'true' }} | |
needs: [check, build, release] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Download Release Artifact | |
uses: actions/download-artifact@v2 | |
with: | |
name: ${{ matrix.label }}-Package | |
path: ${{ github.workspace }}/release-artifact | |
- name: Upload Release Asset | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ needs.release.outputs.upload_url }} | |
asset_path: ${{github.workspace}}/release-artifact/out.${{ matrix.pkgext }} | |
asset_name: zeno-${{ needs.release.outputs.version }}-${{ matrix.label }}.${{ matrix.pkgext }} | |
asset_content_type: ${{ matrix.pkgext == 'tar.gz' && 'application/x-gzip' || 'application/zip' }} | |
- name: Upload To Server | |
uses: easingthemes/[email protected] | |
env: | |
SSH_PRIVATE_KEY: ${{ secrets.REMOTE_SSH_KEY }} | |
ARGS: '-rltgoDzvO --delete' | |
SOURCE: release-artifact/out.${{ matrix.pkgext }} | |
REMOTE_HOST: ${{ secrets.REMOTE_HOST }} | |
REMOTE_USER: ${{ secrets.REMOTE_USER }} | |
TARGET: ${{ secrets.REMOTE_TARGET }}/zeno-${{ needs.release.outputs.version }}-${{ matrix.label }}.${{ matrix.pkgext }} |