-
-
Notifications
You must be signed in to change notification settings - Fork 912
81 lines (70 loc) · 2.4 KB
/
continuous_integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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