@@ -17,28 +17,37 @@ jobs:
1717 build_type : [Debug, Release]
1818
1919 steps :
20- - uses : actions/checkout@v4
20+ - name : Checkout Repository
21+ uses : actions/checkout@v4
2122
22- - name : Set build directory
23- id : vars
24- run : echo "BUILD_DIR=${{ github.workspace }}/build" >> $GITHUB_ENV
23+ - name : Set up CMake
24+ uses : jwlawson/actions-setup-cmake@v2
25+ with :
26+ cmake-version : ' 4.1.1'
2527
26- - name : Configure CMake
27- shell : bash
28+ # Linux Dependencies
29+ - name : Install Dependencies (Linux)
30+ if : runner.os == 'Linux'
2831 run : |
29- cmake -B "$BUILD_DIR" -S "$GITHUB_WORKSPACE" \
30- -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
32+ sudo apt-get update
33+ sudo apt-get install -y pkg-config libopencv-dev libeigen3-dev libopenexr-dev
3134
32- - name : Build
33- shell : bash
35+ # Windows Dependencies
36+ - name : Install Dependencies (Windows)
37+ if : runner.os == 'Windows'
38+ shell : pwsh
3439 run : |
35- if [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
36- cmake --build "$BUILD_DIR" --config ${{ matrix.build_type }} -- -j$(nproc)
37- else
38- cmake --build "$BUILD_DIR" --config ${{ matrix.build_type }} -- /m
39- fi
40-
41- - name : Run tests
42- working-directory : ${{ env.BUILD_DIR }}
43- shell : bash
44- run : ctest --build-config ${{ matrix.build_type }} --output-on-failure
40+ choco install opencv
41+ choco install eigen
42+
43+ # Configure
44+ - name : Configure with CMake
45+ run : cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
46+
47+ # Build
48+ - name : Build
49+ run : cmake --build build --config ${{ matrix.build_type }} --parallel
50+
51+ # Install
52+ - name : Install
53+ run : cmake --install build --prefix instdir
0 commit comments