8000 Migrate MacOS CI pipeline from ADO to Github by ahojnnes · Pull Request #2418 · colmap/colmap · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Migrate MacOS CI pipeline from ADO to Github #2418

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .azure-pipelines/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ jobs:
# displayName: 'Ubuntu 22.04 (ClangTidy)'
# ubuntuVersion: 22.04
# cmakeBuildType: ClangTidy
- template: build-mac.yaml
parameters:
displayName: 'Mac 12'
macVersion: 12
# - template: build-mac.yaml
# parameters:
# displayName: 'Mac 12'
# macVersion: 12
- template: build-docker.yaml
parameters:
displayName: 'Docker'
89 changes: 89 additions & 0 deletions .github/workflows/build-mac.yaml
8000
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: COLMAP (Mac)

on:
push:
branches:
- main
pull_request:
types: [ assigned, opened, synchronize, reopened ]
release:
types: [ published, edited ]

jobs:
build:
name: ${{ matrix.config.arch }} ${{ matrix.config.cmakeBuildType }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config: [
{
os: macos-13,
arch: x86_64,
cmakeBuildType: Release,
},
]

env:
COMPILER_CACHE_VERSION: 1
COMPILER_CACHE_DIR: ${{ github.workspace }}/compiler-cache
CCACHE_DIR: ${{ github.workspace }}/compiler-cache/ccache
CCACHE_BASEDIR: ${{ github.workspace }}

steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache-builds
with:
key: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ matrix.config.cmakeBuildType }}-${{ github.run_id }}-${{ github.run_number }}
restore-keys: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ matrix.config.cmakeBuildType }}
path: ${{ env.COMPILER_CACHE_DIR }}

- name: Setup Mac
run: |
brew install \
cmake \
ninja \
boost \
eigen \
flann \
freeimage \
metis \
glog \
googletest \
ceres-solver \
qt5 \
glew \
cgal \
sqlite3 \
ccache

- name: Configure and build
run: |
export PATH="/usr/local/opt/qt@5/bin:$PATH"
cmake --version
mkdir build
cd build
cmake .. \
-GNinja \
-DCMAKE_BUILD_TYPE=${{ matrix.config.cmakeBuildType }} \
-DTESTS_ENABLED=ON \
-DQt5_DIR=/usr/local/opt/qt/lib/cmake/Qt5
ninja

- name: Run tests
run: |
cd build
ctest
tests_pass=$?
if [ $tests_pass -ne 0 ]; then
echo "\n\n\nTests failed, rerunning with verbose output"
ctest --rerun-failed --output-on-failure
fi
exit $tests_pass

- name: Cleanup compiler cache
run: |
set -x
ccache --show-stats --verbose
ccache --evict-older-than 1d
ccache --show-stats --verbose
116 changes: 58 additions & 58 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: COLMAP
name: COLMAP (Ubuntu)

on:
push:
Expand All @@ -11,65 +11,65 @@ on:

jobs:
build:
name: ${{ matrix.config.os }} ${{ matrix.config.arch }} ${{ matrix.config.cmakeBuildType }} ${{ matrix.config.cudaEnabled && 'CUDA' || '' }} ${{ matrix.config.asanEnabled && 'ASan' || '' }}
name: ${{ matrix.config.cmakeBuildType }} ${{ matrix.config.cudaEnabled && 'CUDA' || '' }} ${{ matrix.config.asanEnabled && 'ASan' || '' }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config: [
{
os: ubuntu-22.04,
cmakeBuildType: Release,
asanEnabled: false,
guiEnabled: true,
cudaEnabled: false,
e2eTests: true,
checkCodeFormat: true,
},
{
os: ubuntu-22.04,
cmakeBuildType: Release,
asanEnabled: false,
guiEnabled: false,
cudaEnabled: true,
e2eTests: false,
checkCodeFormat: false,
},
{
os: ubuntu-22.04,
cmakeBuildType: Release,
asanEnabled: true,
guiEnabled: false,
cudaEnabled: false,
e2eTests: false,
checkCodeFormat: false,
},
{
os: ubuntu-22.04,
cmakeBuildType: ClangTidy,
asanEnabled: false,
guiEnabled: false,
cudaEnabled: false,
e2eTests: false,
checkCodeFormat: false,
},
{
os: ubuntu-20.04,
cmakeBuildType: Release,
asanEnabled: false,
guiEnabled: true,
cudaEnabled: false,
e2eTests: false,
checkCodeFormat: false,
},
{
os: ubuntu-20.04,
cmakeBuildType: Release,
asanEnabled: false,
guiEnabled: false,
cudaEnabled: true,
e2eTests: false,
checkCodeFormat: false,
},
{
os: ubuntu-22.04,
cmakeBuildType: Release,
asanEnabled: false,
guiEnabled: true,
cudaEnabled: false,
e2eTests: true,
checkCodeFormat: true,
},
{
os: ubuntu-22.04,
cmakeBuildType: Release,
asanEnabled: false,
guiEnabled: false,
cudaEnabled: true,
e2eTests: false,
checkCodeFormat: false,
},
{
os: ubuntu-22.04,
cmakeBuildType: Release,
asanEnabled: true,
guiEnabled: false,
cudaEnabled: false,
e2eTests: false,
checkCodeFormat: false,
},
{
os: ubuntu-22.04,
cmakeBuildType: ClangTidy,
asanEnabled: false,
guiEnabled: false,
cudaEnabled: false,
e2eTests: false,
checkCodeFormat: false,
},
{
os: ubuntu-20.04,
cmakeBuildType: Release,
asanEnabled: false,
guiEnabled: true,
cudaEnabled: false,
e2eTests: false,
checkCodeFormat: false,
},
{
os: ubuntu-20.04,
cmakeBuildType: Release,
asanEnabled: false,
guiEnabled: false,
cudaEnabled: true,
e2eTests: false,
checkCodeFormat: false,
},
]

env:
Expand All @@ -84,8 +84,8 @@ jobs:
- uses: actions/cache@v4
id: cache-builds
with:
key: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ matrix.config.cmakeBuildType }}-${{ matrix.config.asanEnabled }}--${{ matrix.config.cudaEnabled }}-${{ github.run_id }}-${{ github.run_number }}
restore-keys: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.arch }}-${{ matrix.config.cmakeBuildType }}-${{ matrix.config.asanEnabled }}--${{ matrix.config.cudaEnabled }}
key: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.cmakeBuildType }}-${{ matrix.config.asanEnabled }}--${{ matrix.config.cudaEnabled }}-${{ github.run_id }}-${{ github.run_number }}
restore-keys: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.cmakeBuildType }}-${{ matrix.config.asanEnabled }}--${{ matrix.config.cudaEnabled }}
path: ${{ env.COMPILER_CACHE_DIR }}

- name: Install compiler cache
Expand Down
0