Create core-release.yml for MapLibre Native Core releases (#3331)
This commit is contained in:
12
.github/scripts/install-linux-deps
vendored
Executable file
12
.github/scripts/install-linux-deps
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/usr/bin/bash
|
||||
|
||||
sudo apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y \
|
||||
libcurl4-openssl-dev \
|
||||
libuv1-dev \
|
||||
libjpeg-dev \
|
||||
libpng-dev \
|
||||
libglfw3-dev \
|
||||
libwebp-dev \
|
||||
libopengl0 \
|
||||
mesa-vulkan-drivers
|
||||
83
.github/workflows/core-release.yml
vendored
Normal file
83
.github/workflows/core-release.yml
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
|
||||
name: core-release
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
create-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Create maplibre-native-headers.tar.gz
|
||||
run: tar czf maplibre-native-headers.tar.gz include
|
||||
|
||||
- name: Create Release
|
||||
run: |
|
||||
gh release create core-${{ github.sha }} \
|
||||
--draft=false \
|
||||
--prerelease=false \
|
||||
--latest=false \
|
||||
--title "core-${{ github.sha }}" \
|
||||
maplibre-native-headers.tar.gz
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
build-macos:
|
||||
needs: [create-release]
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Build mbgl-core for macOS
|
||||
run: |
|
||||
cmake --preset macos-core -DCMAKE_CXX_COMPILER_LAUNCHER=""
|
||||
cmake --build --preset macos-core
|
||||
|
||||
- name: Rename artifact
|
||||
run: cp build-macos/libmbgl-core.a libmaplibre-native-core-macos-arm64-metal.a
|
||||
|
||||
- name: Upload macOS artifact
|
||||
run: gh release upload core-${{ github.sha }} libmaplibre-native-core-macos-arm64-metal.a
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
|
||||
build-linux:
|
||||
needs: [create-release]
|
||||
runs-on: ${{ matrix.runner.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- renderer: opengl
|
||||
runner: { os: ubuntu-latest, arch: x64 }
|
||||
- renderer: vulkan
|
||||
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@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: .github/scripts/install-linux-deps
|
||||
|
||||
- name: Build mbgl-core for Linux
|
||||
run: |
|
||||
cmake --preset linux-${{ matrix.renderer }}-core -DCMAKE_CXX_COMPILER_LAUNCHER=""
|
||||
cmake --build --preset linux-${{ matrix.renderer }}-core
|
||||
|
||||
- name: Rename artifact
|
||||
run: cp build-linux-${{ matrix.renderer }}/libmbgl-core.a libmaplibre-native-core-linux-${{ matrix.runner.arch }}-${{ matrix.renderer }}.a
|
||||
|
||||
- name: Upload Linux artifact
|
||||
run: gh release upload core-${{ github.sha }} libmaplibre-native-core-linux-${{ matrix.runner.arch }}-${{ matrix.renderer }}.a
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
25
.github/workflows/linux-ci.yml
vendored
25
.github/workflows/linux-ci.yml
vendored
@@ -77,17 +77,7 @@ jobs:
|
||||
ninjaVersion: latest
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
libcurl4-openssl-dev \
|
||||
libuv1-dev \
|
||||
libjpeg-dev \
|
||||
libpng-dev \
|
||||
libglfw3-dev \
|
||||
libwebp-dev \
|
||||
libopengl0 \
|
||||
mesa-vulkan-drivers
|
||||
run: .github/scripts/install-linux-deps
|
||||
|
||||
- if: matrix.renderer == 'drawable'
|
||||
run: echo renderer_flag_cmake=-DMLN_DRAWABLE_RENDERER=ON >> "$GITHUB_ENV"
|
||||
@@ -198,18 +188,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y \
|
||||
libcurl4-openssl-dev \
|
||||
libuv1-dev \
|
||||
libjpeg-dev \
|
||||
libpng-dev \
|
||||
libwebp-dev \
|
||||
libglfw3-dev \
|
||||
libsqlite3-dev \
|
||||
xvfb \
|
||||
x11-xserver-utils
|
||||
run: .github/scripts/install-linux-deps
|
||||
|
||||
- name: Cache Bazel
|
||||
uses: actions/cache@v4
|
||||
|
||||
12
.github/workflows/pr-linux-tests.yml
vendored
12
.github/workflows/pr-linux-tests.yml
vendored
@@ -149,18 +149,8 @@ jobs:
|
||||
- name: Install scipy
|
||||
run: pip3 install scipy
|
||||
|
||||
# not sure which one of these are runtime dependencies
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
libcurl4-openssl-dev \
|
||||
libuv1-dev \
|
||||
libjpeg-dev \
|
||||
libpng-dev \
|
||||
libglfw3-dev \
|
||||
libwebp-dev \
|
||||
libopengl0
|
||||
run: .github/scripts/install-linux-deps
|
||||
|
||||
- name: Run Benchmarks
|
||||
# excluding the API tests because they hang https://github.com/maplibre/maplibre-native/issues/1808
|
||||
|
||||
@@ -5,6 +5,7 @@ option(MLN_WITH_CLANG_TIDY "Build with clang-tidy checks enabled" OFF)
|
||||
option(MLN_WITH_COVERAGE "Enable code coverage collection" OFF)
|
||||
option(MLN_WITH_QT "Build MapLibre Native Qt bindings" OFF)
|
||||
option(MLN_WITH_NODE "Build MapLibre Native Node.js bindings" OFF)
|
||||
option(MLN_WITH_GLFW "Set up targets for GLFW platform" ON)
|
||||
option(MLN_WITH_SANITIZER "Use [address|thread|undefined] here" OFF)
|
||||
option(MLN_WITH_RTTI "Compile with runtime type information" OFF)
|
||||
option(MLN_WITH_OPENGL "Build with OpenGL renderer" ON)
|
||||
@@ -18,6 +19,7 @@ option(MLN_DRAWABLE_RENDERER "Include the drawable rendering pathway" OFF)
|
||||
option(MLN_USE_UNORDERED_DENSE "Use ankerl dense containers for performance" ON)
|
||||
option(MLN_USE_TRACY "Enable Tracy instrumentation" OFF)
|
||||
option(MLN_USE_RUST "Use components in Rust" OFF)
|
||||
option(MLN_CORE_INCLUDE_DEPS "Include depdendencies in static build of core" OFF)
|
||||
|
||||
if (MLN_WITH_CLANG_TIDY)
|
||||
find_program(CLANG_TIDY_COMMAND NAMES clang-tidy)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"version": 10,
|
||||
"version": 3,
|
||||
"cmakeMinimumRequired": {
|
||||
"major": 3,
|
||||
"minor": 21,
|
||||
@@ -54,6 +54,69 @@
|
||||
"MLN_WITH_NODE": "ON",
|
||||
"MLN_WITH_WERROR": "OFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "macos-core",
|
||||
"inherits": "macos",
|
||||
"cacheVariables": {
|
||||
"MLN_CORE_INCLUDE_DEPS": "ON",
|
||||
"MLN_WITH_GLFW": "OFF"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-opengl",
|
||||
"binaryDir": "${sourceDir}/build-linux-opengl",
|
||||
"generator": "Ninja",
|
||||
"cacheVariables": {
|
||||
"CMAKE_SYSTEM_NAME": "Linux",
|
||||
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache",
|
||||
"MLN_WITH_METAL": "OFF",
|
||||
"MLN_WITH_OPENGL": "ON",
|
||||
"MLN_DRAWABLE_RENDERER": "ON",
|
||||
"CMAKE_C_COMPILER": "clang",
|
||||
"CMAKE_CXX_COMPILER": "clang++"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-opengl-core",
|
||||
"inherits": "linux-opengl",
|
||||
"cacheVariables": {
|
||||
"MLN_CORE_INCLUDE_DEPS": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-vulkan",
|
||||
"binaryDir": "${sourceDir}/build-linux-vulkan",
|
||||
"generator": "Ninja",
|
||||
"inherits": "linux-opengl",
|
||||
"cacheVariables": {
|
||||
"MLN_WITH_OPENGL": "OFF",
|
||||
"MLN_WITH_VULKAN": "ON"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "linux-vulkan-core",
|
||||
"inherits": "linux-vulkan",
|
||||
"cacheVariables": {
|
||||
"MLN_CORE_INCLUDE_DEPS": "ON"
|
||||
}
|
||||
}
|
||||
],
|
||||
"buildPresets": [
|
||||
{
|
||||
"name": "macos-core",
|
||||
"configurePreset": "macos-core",
|
||||
"targets": ["mbgl-core"]
|
||||
},
|
||||
{
|
||||
"name": "linux-opengl-core",
|
||||
"configurePreset": "linux-opengl",
|
||||
"targets": ["mbgl-core"]
|
||||
},
|
||||
{
|
||||
"name": "linux-vulkan-core",
|
||||
"configurePreset": "linux-vulkan",
|
||||
"targets": ["mbgl-core"]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
find_package(OpenGL REQUIRED)
|
||||
|
||||
if(WIN32)
|
||||
if(MLN_WITH_OSMESA)
|
||||
message(WARNING "mbgl-glfw does not work with -DMLN_WITH_OSMESA=ON. If you want to build this target, don't use this option.")
|
||||
@@ -39,6 +37,7 @@ set_property(
|
||||
)
|
||||
|
||||
if(MLN_WITH_OPENGL)
|
||||
find_package(OpenGL REQUIRED)
|
||||
target_sources(
|
||||
mbgl-glfw
|
||||
PRIVATE ${PROJECT_SOURCE_DIR}/platform/glfw/glfw_gl_backend.cpp
|
||||
|
||||
@@ -73,7 +73,9 @@ target_include_directories(
|
||||
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/bin)
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/expression-test)
|
||||
if(MLN_WITH_GLFW)
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/platform/glfw)
|
||||
endif()
|
||||
if(MLN_WITH_NODE)
|
||||
add_subdirectory(${PROJECT_SOURCE_DIR}/platform/node)
|
||||
endif()
|
||||
|
||||
2
vendor/csscolorparser.cmake
vendored
2
vendor/csscolorparser.cmake
vendored
@@ -2,7 +2,7 @@ if(TARGET mbgl-vendor-csscolorparser)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(MLN_WITH_QT)
|
||||
if(MLN_WITH_QT OR MLN_CORE_INCLUDE_DEPS)
|
||||
add_library(mbgl-vendor-csscolorparser OBJECT)
|
||||
else()
|
||||
add_library(mbgl-vendor-csscolorparser STATIC)
|
||||
|
||||
2
vendor/icu.cmake
vendored
2
vendor/icu.cmake
vendored
@@ -2,7 +2,7 @@ if(TARGET mbgl-vendor-icu)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(MLN_WITH_QT)
|
||||
if(MLN_WITH_QT OR MLN_CORE_INCLUDE_DEPS)
|
||||
add_library(mbgl-vendor-icu OBJECT)
|
||||
else()
|
||||
add_library(mbgl-vendor-icu STATIC)
|
||||
|
||||
2
vendor/parsedate.cmake
vendored
2
vendor/parsedate.cmake
vendored
@@ -2,7 +2,7 @@ if(TARGET mbgl-vendor-parsedate)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(MLN_WITH_QT)
|
||||
if(MLN_WITH_QT OR MLN_CORE_INCLUDE_DEPS)
|
||||
add_library(mbgl-vendor-parsedate OBJECT)
|
||||
else()
|
||||
add_library(mbgl-vendor-parsedate STATIC)
|
||||
|
||||
Reference in New Issue
Block a user