mirror of
https://codeberg.org/comaps/comaps
synced 2026-01-12 23:34:21 +00:00
Compare commits
14 Commits
pastk-mapg
...
zy-docker-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b2eae1aa24 | ||
|
|
3f89c75b87 | ||
|
|
3e224c666b | ||
|
|
b9e7b9b994 | ||
|
|
e7ad0f20b6 | ||
|
|
401c4324d3 | ||
|
|
e72400760c | ||
|
|
a1e6cf9c60 | ||
|
|
37846bc6b1 | ||
|
|
e086920086 | ||
|
|
838fa4a288 | ||
|
|
c305c2e580 | ||
|
|
fccda2d8b9 | ||
|
|
75439b5d89 |
@@ -34,16 +34,93 @@ on:
|
||||
- track_generator/**
|
||||
- xcode/**
|
||||
|
||||
env:
|
||||
APT_PACKAGES: cmake ninja-build qt6-base-dev qt6-declarative-dev qt6-positioning-dev libqt6svg6-dev optipng libfreetype-dev libharfbuzz-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev python3-pip zlib1g-dev git ccache openjdk-21-jdk
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Android Lint
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: codeberg.org/comaps/docker-android-sdk:latest
|
||||
options: --user root
|
||||
env:
|
||||
JAVA_HOME: /usr/lib/jvm/java-21-openjdk-amd64
|
||||
steps:
|
||||
- name: Get date for cache key
|
||||
id: date
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create sudo wrapper
|
||||
shell: bash
|
||||
run: |
|
||||
echo '#!/bin/bash' > /usr/local/bin/sudo
|
||||
echo 'exec "$@"' >> /usr/local/bin/sudo
|
||||
chmod +x /usr/local/bin/sudo
|
||||
|
||||
- name: Apt update
|
||||
shell: bash
|
||||
run: |
|
||||
apt update -y
|
||||
|
||||
- name: Install and cache apt packages
|
||||
uses: https://github.com/awalsh128/cache-apt-pkgs-action@v1.6.0
|
||||
with:
|
||||
packages: ${{ env.APT_PACKAGES }}
|
||||
version: "${{ steps.date.outputs.date }}"
|
||||
|
||||
- name: Fallback manual apt install
|
||||
shell: bash
|
||||
run: |
|
||||
if ! command -v pip &> /dev/null; then
|
||||
echo "pip not found, cache action failed, installing packages manually"
|
||||
apt install -y $APT_PACKAGES
|
||||
fi
|
||||
|
||||
- name: Install build dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
pip install "protobuf<3.21" --break-system-packages
|
||||
update-alternatives --set java /usr/lib/jvm/java-21-openjdk-amd64/bin/java
|
||||
|
||||
- name: Install Android SDK components
|
||||
shell: bash
|
||||
run: |
|
||||
yes | sdkmanager --licenses || true
|
||||
sdkmanager "platforms;android-36" "build-tools;36.0.0" "ndk;28.2.13676358"
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
3party/CMake-MetalShaderSupport
|
||||
3party/Vulkan-Headers
|
||||
3party/boost
|
||||
3party/expat
|
||||
3party/fast_double_parser
|
||||
3party/fast_obj
|
||||
3party/freetype/freetype
|
||||
3party/gflags
|
||||
3party/glaze
|
||||
3party/glfw
|
||||
3party/glm
|
||||
3party/googletest
|
||||
3party/harfbuzz/harfbuzz
|
||||
3party/icu/icu
|
||||
3party/imgui/imgui
|
||||
3party/jansson/jansson
|
||||
3party/just_gtfs
|
||||
3party/protobuf/protobuf
|
||||
3party/pugixml/pugixml
|
||||
3party/utfcpp
|
||||
tools/kothic
|
||||
tools/osmctools
|
||||
key: submodules-cache-${{ steps.date.outputs.date }}
|
||||
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
@@ -51,11 +128,20 @@ jobs:
|
||||
- name: Lint
|
||||
shell: bash
|
||||
working-directory: android
|
||||
run: ./gradlew -Pandroidauto=true lint
|
||||
run: |
|
||||
cd ..
|
||||
./configure.sh
|
||||
cd android
|
||||
./gradlew -Pandroidauto=true lint
|
||||
|
||||
android-check:
|
||||
name: Build Android Debug
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: codeberg.org/comaps/docker-android-sdk:latest
|
||||
options: --user root
|
||||
env:
|
||||
JAVA_HOME: /usr/lib/jvm/java-21-openjdk-amd64
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -71,23 +157,86 @@ jobs:
|
||||
cancel-in-progress: true
|
||||
|
||||
steps:
|
||||
- name: Get date for cache key
|
||||
id: date
|
||||
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Create sudo wrapper
|
||||
shell: bash
|
||||
run: |
|
||||
echo '#!/bin/bash' > /usr/local/bin/sudo
|
||||
echo 'exec "$@"' >> /usr/local/bin/sudo
|
||||
chmod +x /usr/local/bin/sudo
|
||||
|
||||
- name: Apt update
|
||||
shell: bash
|
||||
run: |
|
||||
apt update -y
|
||||
|
||||
- name: Install and cache apt packages
|
||||
uses: https://github.com/awalsh128/cache-apt-pkgs-action@v1.6.0
|
||||
with:
|
||||
packages: ${{ env.APT_PACKAGES }}
|
||||
version: "${{ steps.date.outputs.date }}"
|
||||
|
||||
- name: Fallback manual apt install
|
||||
shell: bash
|
||||
run: |
|
||||
if ! command -v pip &> /dev/null; then
|
||||
echo "pip not found, cache action failed, installing packages manually"
|
||||
apt install -y $APT_PACKAGES
|
||||
fi
|
||||
|
||||
- name: Install build tools and dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y ninja-build
|
||||
pip install "protobuf<3.21" --break-system-packages
|
||||
update-alternatives --set java /usr/lib/jvm/java-21-openjdk-amd64/bin/java
|
||||
|
||||
- name: Install Android SDK components
|
||||
shell: bash
|
||||
run: |
|
||||
yes | sdkmanager --licenses || true
|
||||
sdkmanager "platforms;android-36" "build-tools;36.0.0" "ndk;28.2.13676358"
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 200 # enough to get all commits for the current day
|
||||
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
3party/CMake-MetalShaderSupport
|
||||
3party/Vulkan-Headers
|
||||
3party/boost
|
||||
3party/expat
|
||||
3party/fast_double_parser
|
||||
3party/fast_obj
|
||||
3party/freetype/freetype
|
||||
3party/gflags
|
||||
3party/glaze
|
||||
3party/glfw
|
||||
3party/glm
|
||||
3party/googletest
|
||||
3party/harfbuzz/harfbuzz
|
||||
3party/icu/icu
|
||||
3party/imgui/imgui
|
||||
3party/jansson/jansson
|
||||
3party/just_gtfs
|
||||
3party/protobuf/protobuf
|
||||
3party/pugixml/pugixml
|
||||
3party/utfcpp
|
||||
tools/kothic
|
||||
tools/osmctools
|
||||
key: submodules-cache-${{ steps.date.outputs.date }}
|
||||
|
||||
- name: Parallel submodules checkout
|
||||
shell: bash
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20))
|
||||
|
||||
- name: Configure ccache
|
||||
uses: hendrikmuhs/ccache-action@v1.2
|
||||
uses: https://github.com/hendrikmuhs/ccache-action@v1.2
|
||||
with:
|
||||
key: ${{ github.workflow }}-${{ matrix.flavor }}
|
||||
|
||||
@@ -98,13 +247,14 @@ jobs:
|
||||
CMAKE_C_COMPILER_LAUNCHER: ccache
|
||||
CMAKE_CXX_COMPILER_LAUNCHER: ccache
|
||||
run: |
|
||||
cmake --version
|
||||
ninja --version
|
||||
cd ..
|
||||
./configure.sh
|
||||
cd android
|
||||
./gradlew -P${{ matrix.arch }} assemble${{ matrix.flavor }}
|
||||
|
||||
- name: Upload ${{ matrix.flavor }} apk
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: android-${{ matrix.flavor }}
|
||||
path: android/app/build/outputs/apk/**/OrganicMaps-*.apk
|
||||
path: android/app/build/outputs/apk/**/*.apk
|
||||
if-no-files-found: error
|
||||
|
||||
@@ -254,7 +254,6 @@ android {
|
||||
androidResources {
|
||||
ignoreAssetsPattern = '!.svn:!.git:!.DS_Store:!*.scc:.*:<dir>_*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
||||
noCompress = ['txt', 'bin', 'html', 'png', 'json', 'mwm', 'ttf', 'sdf', 'ui', 'config', 'csv', 'spv', 'obj']
|
||||
// Some languages not supported by Android require to be specified here to be applied
|
||||
localeFilters += [
|
||||
"af",
|
||||
"ar",
|
||||
@@ -282,7 +281,6 @@ android {
|
||||
"in",
|
||||
"it",
|
||||
"ja",
|
||||
"kw",
|
||||
"ko",
|
||||
"lt",
|
||||
"lv",
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<locale-config xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- Some languages not supported by Android require to be specified here to be applied -->
|
||||
<locale android:name="en" />
|
||||
<locale android:name="af" />
|
||||
<locale android:name="ar" />
|
||||
@@ -27,7 +26,6 @@
|
||||
<locale android:name="in" />
|
||||
<locale android:name="it" />
|
||||
<locale android:name="ja" />
|
||||
<locale android:name="kw" />
|
||||
<locale android:name="ko" />
|
||||
<locale android:name="lt" />
|
||||
<locale android:name="lv" />
|
||||
|
||||
@@ -352,7 +352,6 @@ area|z13-[landuse=garages],
|
||||
|
||||
area|z15-[amenity=charging_station][motorcar?],
|
||||
area|z15-[amenity=fuel],
|
||||
area|z15-[amenity=recycling][recycling_type=centre],
|
||||
area|z17-[amenity=vehicle_inspection],
|
||||
area|z17-[amenity=car_wash],
|
||||
area|z17-[amenity=motorcycle_parking],
|
||||
|
||||
@@ -373,7 +373,6 @@ node|z15-[amenity=university],
|
||||
node|z15-[amenity=hospital],
|
||||
node|z14-[barrier=toll_booth],
|
||||
node|z14-[barrier=border_control],
|
||||
node|z16-[amenity=recycling][recycling_type=centre],
|
||||
node|z16-[barrier=lift_gate],
|
||||
node|z16-[man_made=communications_tower],
|
||||
node|z17-[amenity=bank],
|
||||
@@ -515,9 +514,6 @@ node|z18-[amenity=post_office],
|
||||
node|z18-[post_office=post_partner],
|
||||
{font-size: 11;}
|
||||
|
||||
node|z16-[amenity=recycling][recycling_type=centre],
|
||||
{icon-image: recycling-centre-m.svg;}
|
||||
|
||||
/* 6. SHOP */
|
||||
|
||||
node|z14-[shop=mall],
|
||||
|
||||
@@ -36,7 +36,6 @@ amenity-car_wash # area z17- (also has icon z
|
||||
amenity-charging_station-motorcar # area z15- (also has icon z14-, caption(optional) z14-)
|
||||
amenity-charging_station-motorcar-small # area z15- (also has icon z16-, caption(optional) z16-)
|
||||
amenity-fuel # area z15- (also has icon z12-, caption(optional) z12-)
|
||||
amenity-recycling-centre # area z15- (also has icon z16-, caption(optional) z16-)
|
||||
amenity-vehicle_inspection # area z17- (also has icon z17-)
|
||||
highway-rest_area # area z13- (also has icon z14-, caption(optional) z14-)
|
||||
highway-services # area z13- (also has icon z12-, caption(optional) z13-)
|
||||
|
||||
@@ -220,7 +220,6 @@ railway-level_crossing # icon z17-
|
||||
=== 2700
|
||||
|
||||
amenity-car_wash # icon z17- (also has caption(optional) z17-, area z17-)
|
||||
amenity-recycling-centre # icon z16- (also has caption(optional) z16-, area z15-)
|
||||
amenity-vehicle_inspection # icon z17- (also has area z17-)
|
||||
amenity-vending_machine-parking_tickets # icon z17- (also has caption(optional) z17-)
|
||||
shop-car_parts # icon z17-
|
||||
@@ -821,7 +820,6 @@ entrance-emergency # icon z19- (also has captio
|
||||
# === -7250
|
||||
|
||||
# amenity-car_wash # caption(optional) z17- (also has icon z17-, area z17-)
|
||||
# amenity-recycling-centre # caption(optional) z16- (also has icon z16-, area z15-)
|
||||
# amenity-vending_machine-parking_tickets # caption(optional) z17- (also has icon z17-)
|
||||
# shop-car_repair-tyres # caption(optional) z15- (also has icon z15-)
|
||||
# tourism-camp_site # caption(optional) z18- (also has icon z18-)
|
||||
|
||||
@@ -31,8 +31,8 @@ namespace df
|
||||
{
|
||||
namespace
|
||||
{
|
||||
uint64_t constexpr kDoubleTapPauseMs = 220;
|
||||
uint64_t constexpr kLongTouchMs = 700;
|
||||
uint64_t constexpr kDoubleTapPauseMs = 250;
|
||||
uint64_t constexpr kLongTouchMs = 500;
|
||||
uint64_t constexpr kKineticDelayMs = 500;
|
||||
|
||||
float constexpr kForceTapThreshold = 0.75;
|
||||
|
||||
@@ -48,7 +48,7 @@ OLD_VERSIONS_RU1=$(rclone lsd ru1:comaps-maps/maps --max-depth 1 | awk '{print $
|
||||
for version in $OLD_VERSIONS_RU1; do
|
||||
if [ $version -gt 250101 ]; then
|
||||
echo " Deleting ru1:comaps-maps/maps/$version/"
|
||||
rclone purge ru1:comaps-maps/maps/$version/
|
||||
rclone purge -v ru1:comaps-maps/maps/$version/
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -58,7 +58,7 @@ OLD_VERSIONS_FI1=$(rclone lsd fi1:/var/www/html/maps --max-depth 1 | awk '{print
|
||||
for version in $OLD_VERSIONS_FI1; do
|
||||
if [ $version -gt 250101 ]; then
|
||||
echo " Deleting fi1:/var/www/html/maps/$version/"
|
||||
rclone purge fi1:/var/www/html/maps/$version/
|
||||
rclone purge -v fi1:/var/www/html/maps/$version/
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -68,7 +68,7 @@ OLD_VERSIONS_DE1=$(rclone lsd de1:/var/www/html/comaps-cdn/maps --max-depth 1 |
|
||||
for version in $OLD_VERSIONS_DE1; do
|
||||
if [ $version -gt 250101 ]; then
|
||||
echo " Deleting de1:/var/www/html/comaps-cdn/maps/$version/"
|
||||
rclone purge de1:/var/www/html/comaps-cdn/maps/$version/
|
||||
rclone purge -v de1:/var/www/html/comaps-cdn/maps/$version/
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -78,7 +78,7 @@ OLD_VERSIONS_FR1=$(rclone lsd fr1:/data/maps --max-depth 1 | awk '{print $5}' |
|
||||
for version in $OLD_VERSIONS_FR1; do
|
||||
if [ $version -gt 250101 ]; then
|
||||
echo " Deleting fr1:/data/maps/$version/"
|
||||
rclone purge fr1:/data/maps/$version/
|
||||
rclone purge -v fr1:/data/maps/$version/
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -89,19 +89,19 @@ echo "Old version cleanup complete"
|
||||
|
||||
echo "Uploading to us2"
|
||||
# An explicit mwm/txt filter is used to skip temp files when run for an unfinished generation
|
||||
rclone copy --include "*.{mwm,txt}" $DIR us2:comaps-map-files/maps/$MAPS &
|
||||
rclone copy -v --include "*.{mwm,txt}" $DIR us2:comaps-map-files/maps/$MAPS &
|
||||
|
||||
echo "Uploading to ru1"
|
||||
rclone copy --include "*.{mwm,txt}" $DIR ru1:comaps-maps/maps/$MAPS &
|
||||
rclone copy -v --include "*.{mwm,txt}" $DIR ru1:comaps-maps/maps/$MAPS &
|
||||
|
||||
echo "Uploading to fi1"
|
||||
rclone copy --include "*.{mwm,txt}" $DIR fi1:/var/www/html/maps/$MAPS &
|
||||
rclone copy -v --include "*.{mwm,txt}" $DIR fi1:/var/www/html/maps/$MAPS &
|
||||
|
||||
echo "Uploading to de1"
|
||||
rclone copy --include "*.{mwm,txt}" $DIR de1:/var/www/html/comaps-cdn/maps/$MAPS &
|
||||
rclone copy -v --include "*.{mwm,txt}" $DIR de1:/var/www/html/comaps-cdn/maps/$MAPS &
|
||||
|
||||
echo "Uploading to fr1"
|
||||
rclone copy --include "*.{mwm,txt}" $DIR fr1:/data/maps/$MAPS &
|
||||
rclone copy -v --include "*.{mwm,txt}" $DIR fr1:/data/maps/$MAPS &
|
||||
|
||||
# us1 is not used for maps atm
|
||||
# rclone lsd us1:/home/dh_zzxxrk/cdn-us-1.comaps.app/maps
|
||||
|
||||
Reference in New Issue
Block a user