Skip to content

Commit

Permalink
Rename maplibre-gl-native to maplibre-native and move to vendor
Browse files Browse the repository at this point in the history
  • Loading branch information
ntadej committed Sep 30, 2023
1 parent 86e4dc6 commit d1eb4b2
Show file tree
Hide file tree
Showing 12 changed files with 180 additions and 180 deletions.
6 changes: 3 additions & 3 deletions .github/actions/qt5-build/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ qmake --version

if [[ "$1" = "library" ]]; then
mkdir build && cd build
cmake ../source/dependencies/maplibre-gl-native/ \
cmake ../source/vendor/maplibre-native/ \
-G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_INSTALL_PREFIX=../install-qmaplibregl \
-DCMAKE_INSTALL_PREFIX=../install-maplibre \
-DMBGL_WITH_QT=ON \
-DMBGL_QT_LIBRARY_ONLY=ON \
-DMBGL_QT_STATIC=ON
ninja
ninja install
elif [[ "$1" = "plugin" ]]; then
mkdir build && cd build
qmake ../source/ QMAPLIBREGL_PATH=../install-qmaplibregl
qmake ../source/ QMAPLIBRE_PATH=../install-maplibre
make -j2
INSTALL_ROOT=../install make install
else
Expand Down
92 changes: 46 additions & 46 deletions .github/workflows/Android-Qt5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches:
- main
tags:
- '**'
- "**"
paths-ignore:
- ".gitignore"
- "README.md"
Expand Down Expand Up @@ -52,7 +52,7 @@ env:

jobs:
build-core:
name: "Build maplibre-gl-native for ${{ matrix.config.abi }}"
name: "Build maplibre-native for ${{ matrix.config.abi }}"
runs-on: ubuntu-22.04
strategy:
matrix:
Expand All @@ -75,30 +75,30 @@ jobs:
with:
aqtversion: ==3.0.*
version: ${{ env.QT_VERSION }}
target: 'android'
arch: 'android'
target: "android"
arch: "android"

- name: Set up OpenJDK 11
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
distribution: "adopt"
java-version: "11"

- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@v3

- name: Set up ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: Android_maplibre-gl-native_${{ matrix.config.abi }}_legacy
key: Android_maplibre-native_${{ matrix.config.abi }}_legacy
append-timestamp: false

- name: Build maplibre-gl-native
- name: Build maplibre-native
env:
ANDROID_ABI: ${{ matrix.config.abi }}
run: |
mkdir build && cd build
cmake ../source/dependencies/maplibre-gl-native \
cmake ../source/vendor/maplibre-native \
-DCMAKE_TOOLCHAIN_FILE="${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake" \
-DANDROID_ABI="${ANDROID_ABI}" \
-DANDROID_CCACHE=ccache \
Expand All @@ -109,7 +109,7 @@ jobs:
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_FLAGS_RELEASE=-g0 \
-DCMAKE_FIND_ROOT_PATH="${Qt5_Dir}" \
-DCMAKE_INSTALL_PREFIX=../install-qmaplibregl \
-DCMAKE_INSTALL_PREFIX=../install-maplibre \
-DCMAKE_PREFIX_PATH="${Qt5_Dir}" \
-DMBGL_WITH_QT=ON \
-DMBGL_QT_LIBRARY_ONLY=ON \
Expand All @@ -120,51 +120,51 @@ jobs:
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: maplibre-gl-native_Android_${{ matrix.config.abi }}
path: install-qmaplibregl
name: maplibre-native_Android_${{ matrix.config.abi }}
path: install-maplibre

prepare-core:
name: "Prepare maplibre-gl-native"
name: "Prepare maplibre-native"
runs-on: ubuntu-22.04
needs: build-core

steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: maplibre-gl-native_Android_x86
name: maplibre-native_Android_x86
path: install-x86

- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: maplibre-gl-native_Android_x86_64
name: maplibre-native_Android_x86_64
path: install-x86_64

- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: maplibre-gl-native_Android_armeabi-v7a
name: maplibre-native_Android_armeabi-v7a
path: install-armeabi-v7a

- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: maplibre-gl-native_Android_arm64-v8a
name: maplibre-native_Android_arm64-v8a
path: install-arm64-v8a

- name: Prepare artifacts
run: |
cp -r install-arm64-v8a install-qmaplibregl
cp -r install-armeabi-v7a/lib/* install-qmaplibregl/lib/
cp -r install-x86/lib/* install-qmaplibregl/lib/
cp -r install-x86_64/lib/* install-qmaplibregl/lib/
cp -r install-arm64-v8a install-maplibre
cp -r install-armeabi-v7a/lib/* install-maplibre/lib/
cp -r install-x86/lib/* install-maplibre/lib/
cp -r install-x86_64/lib/* install-maplibre/lib/
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: maplibre-gl-native_Android
path: install-qmaplibregl
name: maplibre-native_Android
path: install-maplibre

build-plugin:
name: "Build qt-geoservices-maplibre-gl"
Expand All @@ -184,13 +184,13 @@ jobs:
aqtversion: ==3.0.*
version: ${{ env.QT_VERSION }}
target: android
arch: 'android'
arch: "android"

- name: Set up OpenJDK 11
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
distribution: "adopt"
java-version: "11"

- name: Setup ninja
uses: seanmiddleditch/gha-setup-ninja@v3
Expand All @@ -204,14 +204,14 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: maplibre-gl-native_Android
path: install-qmaplibregl
name: maplibre-native_Android
path: install-maplibre

- name: Build qt-geoservices-maplibre-gl
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
mkdir build && cd build
qmake ../source/ QMAPLIBREGL_PATH=../install-qmaplibregl
qmake ../source/ QMAPLIBRE_PATH=../install-maplibre
make -j2
INSTALL_ROOT=../install make install
Expand All @@ -236,20 +236,20 @@ jobs:
contents: write

steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: qt-geoservices-maplibre-gl_Android

- name: Name tarball
env:
TAG_NAME: ${{ github.ref_name }}
run: |
mv qt-geoservices-maplibre-gl_Android.tar.bz2 qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_Android.tar.bz2
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_Android.tar.bz2
allowUpdates: true
draft: true
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: qt-geoservices-maplibre-gl_Android

- name: Name tarball
env:
TAG_NAME: ${{ github.ref_name }}
run: |
mv qt-geoservices-maplibre-gl_Android.tar.bz2 qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_Android.tar.bz2
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_Android.tar.bz2
allowUpdates: true
draft: true
4 changes: 2 additions & 2 deletions .github/workflows/CI-cache-cleanup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ jobs:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
REPO=${{ github.repository }}
BRANCH=refs/pull/${{ github.event.pull_request.number }}/merge
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1 )
## Setting this to not fail the workflow while deleting cache keys.
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
Expand Down
50 changes: 25 additions & 25 deletions .github/workflows/Linux-Qt5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
branches:
- main
tags:
- '**'
- "**"
paths-ignore:
- ".gitignore"
- "README.md"
Expand Down Expand Up @@ -50,7 +50,7 @@ env:

jobs:
build-core:
name: "Build maplibre-gl-native"
name: "Build maplibre-native"
runs-on: ubuntu-22.04

steps:
Expand All @@ -72,19 +72,19 @@ jobs:
- name: Set up ccache
uses: hendrikmuhs/ccache-action@v1
with:
key: Linux_maplibre-gl-native_legacy
key: Linux_maplibre-native_legacy
append-timestamp: false

- name: Build maplibre-gl-native
- name: Build maplibre-native
uses: ./source/.github/actions/qt5-build
with:
build-type: library

- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: maplibre-gl-native_Linux
path: install-qmaplibregl
name: maplibre-native_Linux
path: install-maplibre

build-plugin:
name: "Build qt-geoservices-maplibre-gl"
Expand Down Expand Up @@ -115,8 +115,8 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: maplibre-gl-native_Linux
path: install-qmaplibregl
name: maplibre-native_Linux
path: install-maplibre

- name: Build qt-geoservices-maplibre-gl
uses: ./source/.github/actions/qt5-build
Expand Down Expand Up @@ -144,20 +144,20 @@ jobs:
contents: write

steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: qt-geoservices-maplibre-gl_Linux

- name: Name tarball
env:
TAG_NAME: ${{ github.ref_name }}
run: |
mv qt-geoservices-maplibre-gl_Linux.tar.bz2 qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_Linux.tar.bz2
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_Linux.tar.bz2
allowUpdates: true
draft: true
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: qt-geoservices-maplibre-gl_Linux

- name: Name tarball
env:
TAG_NAME: ${{ github.ref_name }}
run: |
mv qt-geoservices-maplibre-gl_Linux.tar.bz2 qt-geoservices-maplibre-gl_${TAG_NAME}_Qt${QT_VERSION}_Linux.tar.bz2
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: qt-geoservices-maplibre-gl_${{ github.ref_name }}_Qt${{ env.QT_VERSION }}_Linux.tar.bz2
allowUpdates: true
draft: true
Loading

0 comments on commit d1eb4b2

Please sign in to comment.