forked from valhalla/valhalla
-
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (74 loc) · 2.61 KB
/
osx.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
82
83
84
85
name: OSX CI
on:
push:
paths-ignore:
- "*.md"
- .circleci/
- docs/
- run_route_scripts/
- test_requests/
branches:
- master
pull_request:
paths-ignore:
- "*.md"
- .circleci/
- docs/
- run_route_scripts/
- test_requests/
branches:
- master
workflow_dispatch:
inputs:
debug_enabled:
type: boolean
description: "Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)"
required: false
default: false
jobs:
build_osx:
runs-on: macos-14
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: |
HOMEBREW_NO_AUTO_UPDATE=1 brew install python autoconf automake protobuf cmake ccache libtool sqlite3 libspatialite luajit curl wget czmq lz4 spatialite-tools unzip boost gdal
export PATH="$(brew --prefix python)/libexec/bin:$PATH"
sudo python -m pip install --break-system-packages requests shapely
git clone https://github.com/kevinkreiser/prime_server --recurse-submodules && cd prime_server && ./autogen.sh && ./configure && make -j$(sysctl -n hw.logicalcpu) && sudo make install
- name: Get branch name
run: echo "VALHALLA_BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_ENV
- name: Restore ccache
id: cache-ccache-restore
uses: actions/cache/restore@v4
with:
path: ~/Library/Caches/ccache
key: ccache-osx-${{ env.VALHALLA_BRANCH }}
restore-keys: |
ccache-osx-master
ccache-osx-
- name: Configure CMake
run: cmake -B build -DENABLE_SINGLE_FILES_WERROR=OFF -DENABLE_GDAL=ON
- name: Build Valhalla
run: make -C build -j$(sysctl -n hw.logicalcpu)
- name: Build Tests
run: make -C build -j$(sysctl -n hw.logicalcpu) tests
- name: Save ccache
uses: actions/cache/save@v4
with:
path: ~/Library/Caches/ccache
key: ${{ steps.cache-ccache-restore.outputs.cache-primary-key }}
- name: Run Tests
run: make -C build -j$(sysctl -n hw.logicalcpu) check
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
# only run this if manually invoked or a previous job failed
if: ${{ (github.event_name == 'workflow_dispatch' && inputs.debug_enabled) || failure() }}
with:
detached: true
timeout-minutes: 15