-
-
Notifications
You must be signed in to change notification settings - Fork 561
185 lines (157 loc) · 6.82 KB
/
Copy pathcore-release.yml
File metadata and controls
185 lines (157 loc) · 6.82 KB
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
name: core-release
permissions:
contents: write
on:
workflow_dispatch:
pull_request:
paths:
- .github/workflows/core-release.yml
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: recursive
- name: Create maplibre-native-headers.tar.gz
run: |
tar czf maplibre-native-headers.tar.gz \
include \
platform/default/include \
vendor/maplibre-native-base/include \
vendor/maplibre-native-base/deps/variant/include \
vendor/maplibre-native-base/deps/geometry.hpp/include \
vendor/maplibre-native-base/deps/geojson.hpp/include \
vendor/metal-cpp \
vendor/expected-lite/include
- name: Create Release
if: github.event_name == 'workflow_dispatch'
run: |
gh release create core-${{ github.sha }} \
--draft=true \
--prerelease=false \
--latest=false \
--title "core-${{ github.sha }}" \
maplibre-native-headers.tar.gz LICENSES.core.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build-macos:
needs: [create-release]
runs-on: macos-latest
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: recursive
- run: brew install webp libuv
- uses: taiki-e/install-action@07b4745e0c39a41822af610387492e3e53aa222b # v2.83.4
with:
tool: armerge@2
- name: Build mbgl-core for macOS
run: |
cmake --preset macos-metal -DCMAKE_CXX_COMPILER_LAUNCHER="" -DMLN_WITH_GLFW=OFF -DMLN_CREATE_AMALGAMATION=ON
cmake --build build-macos-metal --target mbgl-core
- name: Rename artifact
run: |
cp build-macos-metal/libmbgl-core.a libmaplibre-native-core-macos-arm64-metal.a
cp build-macos-metal/libmbgl-core-amalgam.a libmaplibre-native-core-amalgam-macos-arm64-metal.a
- name: Upload macOS artifacts
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: macos-metal-build
path: |
libmaplibre-native-core-macos-arm64-metal.a
libmaplibre-native-core-amalgam-macos-arm64-metal.a
- name: Upload macOS artifacts (release)
if: github.event_name == 'workflow_dispatch'
run: |
gh release upload core-${{ github.sha }} libmaplibre-native-core-macos-arm64-metal.a
gh release upload core-${{ github.sha }} libmaplibre-native-core-amalgam-macos-arm64-metal.a
env:
GH_TOKEN: ${{ github.token }}
build-linux:
needs: [create-release]
runs-on: ${{ matrix.runner.os }}
env:
PRESET_RENDERER: ${{ matrix.preset_renderer || matrix.renderer }}
strategy:
matrix:
include:
- renderer: opengl
runner: { os: ubuntu-latest, arch: x64 }
- renderer: vulkan
runner: { os: ubuntu-latest, arch: x64 }
- renderer: wgpu
preset_renderer: webgpu-wgpu
runner: { os: ubuntu-latest, arch: x64 }
- renderer: opengl
runner: { os: ubuntu-24.04-arm, arch: arm64 }
- renderer: vulkan
runner: { os: ubuntu-24.04-arm, arch: arm64 }
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: recursive
- name: Install dependencies
run: .github/scripts/install-linux-deps
- uses: taiki-e/install-action@07b4745e0c39a41822af610387492e3e53aa222b # v2.83.4
with:
tool: armerge@2
- name: Build mbgl-core for Linux
run: |
cmake --preset "linux-${PRESET_RENDERER}" -DCMAKE_CXX_COMPILER_LAUNCHER="" -DMLN_CREATE_AMALGAMATION=ON
cmake --build "build-linux-${PRESET_RENDERER}" --target mbgl-core
- name: Verify Linux WebGPU amalgamation
if: matrix.renderer == 'wgpu'
run: |
.github/scripts/check-linux-webgpu-amalgam "build-linux-${PRESET_RENDERER}/libmbgl-core-amalgam.a"
- name: Rename artifact
run: |
cp "build-linux-${PRESET_RENDERER}/libmbgl-core.a" "libmaplibre-native-core-linux-${{ matrix.runner.arch }}-${{ matrix.renderer }}.a"
cp "build-linux-${PRESET_RENDERER}/libmbgl-core-amalgam.a" "libmaplibre-native-core-amalgam-linux-${{ matrix.runner.arch }}-${{ matrix.renderer }}.a"
- name: Upload Linux artifacts
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: linux-${{ matrix.runner.arch }}-${{ matrix.renderer }}-build
path: |
libmaplibre-native-core-linux-${{ matrix.runner.arch }}-${{ matrix.renderer }}.a
libmaplibre-native-core-amalgam-linux-${{ matrix.runner.arch }}-${{ matrix.renderer }}.a
- name: Upload Linux artifacts (release)
if: github.event_name == 'workflow_dispatch'
run: |
gh release upload core-${{ github.sha }} libmaplibre-native-core-linux-${{ matrix.runner.arch }}-${{ matrix.renderer }}.a
gh release upload core-${{ github.sha }} libmaplibre-native-core-amalgam-linux-${{ matrix.runner.arch }}-${{ matrix.renderer }}.a
env:
GH_TOKEN: ${{ github.token }}
build-windows:
needs: [create-release]
runs-on: windows-2022
strategy:
matrix:
renderer: [opengl, egl, vulkan]
steps:
- run: |
git config --system core.longpaths true
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: recursive
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: Build mbgl-core for Windows
run: |
cmake --preset windows-${{ matrix.renderer }} -DCMAKE_CXX_COMPILER_LAUNCHER=""
cmake --build --preset windows-${{ matrix.renderer }}-core
- name: Rename artifact
run: Copy-Item build-windows-${{ matrix.renderer }}/mbgl-core.lib maplibre-native-core-windows-x64-${{ matrix.renderer }}.lib
- name: Upload Windows artifact
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: windows-${{ matrix.renderer }}-build
path: |
maplibre-native-core-windows-x64-${{ matrix.renderer }}.lib
- name: Upload Windows artifact (release)
if: github.event_name == 'workflow_dispatch'
run: gh release upload core-${{ github.sha }} maplibre-native-core-windows-x64-${{ matrix.renderer }}.lib
env:
GH_TOKEN: ${{ github.token }}