Repository navigation
refactor error #7
This file contains hidden or 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: Build and Test | |
| on: | |
| push: | |
| branches: [main, refactor] | |
| pull_request: | |
| branches: [main, refactor] | |
| env: | |
| BUILD_TYPE: Release | |
| jobs: | |
| build-and-test: | |
| name: ${{ matrix.os }} | |
| runs-on: ${{ matrix.runner }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: Windows | |
| runner: windows-latest | |
| - os: Linux | |
| runner: ubuntu-latest | |
| - os: macOS | |
| runner: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install vcpkg | |
| uses: lukka/run-vcpkg@v11 | |
| with: | |
| vcpkgJsonGlob: scripts/vcpkg-manifest/vcpkg.json | |
| - name: Cache ONNX Runtime | |
| id: cache-ort | |
| uses: actions/cache@v4 | |
| with: | |
| path: build/onnxruntime | |
| key: onnxruntime-${{ matrix.os }}-1.17.3-v1 | |
| - name: Download ONNX Runtime | |
| if: steps.cache-ort.outputs.cache-hit != 'true' | |
| shell: cmake -P {0} | |
| run: | | |
| set(ws [=[${{ github.workspace }}]=]) | |
| file(TO_CMAKE_PATH "${ws}" ws) | |
| include(${ws}/scripts/setup-onnxruntime.cmake) | |
| - name: Configure CMake | |
| run: | | |
| cmake -B build -S . \ | |
| -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} \ | |
| -DSYNTHRT_BUILD_TESTS=ON \ | |
| -DSYNTHRT_ORT_DIR=${{ github.workspace }}/build/onnxruntime \ | |
| -DCMAKE_TOOLCHAIN_FILE=${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake \ | |
| -DVCPKG_OVERLAY_PORTS=${{ github.workspace }}/scripts/vcpkg/ports | |
| - name: Build | |
| run: cmake --build build --config ${{ env.BUILD_TYPE }} --parallel | |
| - name: Test | |
| run: | | |
| ctest --test-dir build --build-config ${{ env.BUILD_TYPE }} \ | |
| --output-on-failure --parallel 4 --timeout 300 |