Skip to content

Commit

Permalink
d
Browse files Browse the repository at this point in the history
  • Loading branch information
ahojnnes committed Sep 19, 2024
1 parent 4c1828d commit d9ccd29
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 1 deletion.
83 changes: 83 additions & 0 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: COLMAP (Mac)

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

jobs:
build:
name: ${{ matrix.config.os }} ${{ matrix.config.arch }} ${{ matrix.config.cmakeBuildType }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config: [
{
os: macos-14,
arch: arm64,
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: |
cmake --version
mkdir build
cd build
cmake .. \
-GNinja \
-DCMAKE_BUILD_TYPE=${{ matrix.config.cmakeBuildType }} \
-DTESTS_ENABLED=ON \
-DCMAKE_PREFIX_PATH="$(brew --prefix qt@5)"
ninja
- name: Run tests
run: |
cd build
set +e
ctest --output-on-failure
- name: Cleanup compiler cache
run: |
set -x
ccache --show-stats --verbose
ccache --evict-older-than 1d
ccache --show-stats --verbose
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,4 @@ jobs:
# Delete cache older than 10 days.
find "$CTCACHE_DIR"/*/ -mtime +10 -print0 | xargs -0 rm -rf
echo "Size of ctcache after: $(du -sh $CTCACHE_DIR)"
echo "Number of ctcache files after: $(find $CTCACHE_DIR | wc -l)"
echo "Number of ctcache files after: $(find $CTCACHE_DIR | wc -l)"''

0 comments on commit d9ccd29

Please sign in to comment.