From 6061b2bc6cb876f73affc64ec78d478c09e8319a Mon Sep 17 00:00:00 2001 From: hesuicong Date: Mon, 21 Jul 2025 10:18:32 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=89=A9=E4=B8=8B=E7=9A=84?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .devcontainer/devcontainer.json | 42 ---------- .github/FUNDING.yml | 1 + .github/ISSUE_TEMPLATE/bug_report.md | 32 ++++++++ .github/ISSUE_TEMPLATE/config.yml | 1 + .github/ISSUE_TEMPLATE/feature_request.md | 20 +++++ .github/workflows/continuous_integration.yml | 81 ++++++++++++++++++++ docs/CMakeLists.txt | 1 + 7 files changed, 136 insertions(+), 42 deletions(-) delete mode 100644 .devcontainer/devcontainer.json create mode 100644 .github/FUNDING.yml create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/workflows/continuous_integration.yml create mode 100644 docs/CMakeLists.txt diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json deleted file mode 100644 index f9b2452..0000000 --- a/.devcontainer/devcontainer.json +++ /dev/null @@ -1,42 +0,0 @@ -// For format details, see https://aka.ms/devcontainer.json. For config options, see the -// README at: https://github.com/devcontainers/templates/tree/main/src/cpp -{ - "name": "OpenMVS", - "build": { - "dockerfile": "Dockerfile", - "context": ".." - }, - // Features to add to the dev container. More info: https://containers.dev/features. - // "features": {}, - // Use 'forwardPorts' to make a list of ports inside the container available locally. - // "forwardPorts": [], - // Use 'postCreateCommand' to run commands after the container is created. - "postCreateCommand": "./.devcontainer/postCreateCommand.sh", - // Configure tool-specific properties. - "customizations": { - "vscode": { - "extensions": [ - "ms-vscode.cpptools", - "ms-vscode.cmake-tools", - "twxs.cmake", - "josetr.cmake-language-support-vscode" - ] - } - }, - "containerEnv": { - "DISPLAY": "unix:0" - }, - "remoteEnv": { - "PATH": "/usr/local/bin/OpenMVS:${containerEnv:PATH}" - }, - "mounts": [ - "source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached" - ], - "features": { - "ghcr.io/devcontainers/features/sshd:1": { - "version": "latest" - } - }, - // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. - "remoteUser": "openmvs" -} \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..c626e4b --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +github: [cdcseacave] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..7f9c8d2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,32 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: '' +assignees: '' + +--- + +**Describe the bug** +A clear and concise description of what the bug is. Use `Viewer` to verify/display the input/output. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..3ba13e0 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1 @@ +blank_issues_enabled: false diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..bbcbbe7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml new file mode 100644 index 0000000..94e1b98 --- /dev/null +++ b/.github/workflows/continuous_integration.yml @@ -0,0 +1,81 @@ +name: Continuous Integration +run-name: ${{ github.actor }} is building OpenMVS + +on: + push: + branches: [master, develop] + pull_request: + branches: [master, develop] + # Allows to run this workflow manually from the Actions tab + workflow_dispatch: + +env: + CTEST_OUTPUT_ON_FAILURE: 1 + +defaults: + run: + shell: bash + +jobs: + build-tests: + name: Build on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macOS-latest, windows-latest] + include: + - os: windows-latest + triplet: x64-windows-release + build-type: Release + - os: ubuntu-latest + triplet: x64-linux-release + build-type: Release + - os: macos-latest + triplet: x64-osx + build-type: Release + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Restore artifacts, or setup vcpkg for building artifacts + uses: lukka/run-vcpkg@v11 + with: + vcpkgDirectory: '${{ github.workspace }}/vcpkg' + vcpkgGitCommitId: '4a3c366f2d0d0eaf034bfa649124768df7cfe813' + + - name: Install Ubuntu dependencies + if: matrix.os == 'ubuntu-latest' + run: | + sudo apt-get update -y + sudo apt-get install -y autoconf-archive libxmu-dev libdbus-1-dev libxtst-dev libxi-dev libxinerama-dev libxcursor-dev xorg-dev libgl-dev libglu1-mesa-dev pkg-config + + - name: Install macOS dependencies + if: matrix.os == 'macOS-latest' + run: | + brew install automake autoconf-archive + + - name: Configure CMake + run: | + cmake -S . -B make -DCMAKE_BUILD_TYPE=${{ matrix.build-type }} -DVCPKG_TARGET_TRIPLET=${{ matrix.triplet }} -DOpenMVS_USE_CUDA=OFF + + - name: Build + working-directory: ./make + run: | + rm -rf ../vcpkg/buildtrees + rm -rf ../vcpkg/downloads + cmake --build . --config ${{ matrix.build-type }} --parallel $(nproc) + + - name: Unit Tests + working-directory: ./make + run: | + ctest -j$(nproc) --build-config ${{ matrix.build-type }} + + - name: Deploy Windows release + if: matrix.os == 'windows-latest' + uses: actions/upload-artifact@v3 + with: + name: OpenMVS_Windows_Release_x64 + path: | + ${{ github.workspace }}/make/bin/**/x64 + !${{ github.workspace }}/make/bin/**/*.exp diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt new file mode 100644 index 0000000..ffacaae --- /dev/null +++ b/docs/CMakeLists.txt @@ -0,0 +1 @@ +# Add documentation