diff --git a/.github/workflows/android-beta.yaml b/.github/workflows/android-beta.yaml deleted file mode 100644 index 55880bd400d..00000000000 --- a/.github/workflows/android-beta.yaml +++ /dev/null @@ -1,79 +0,0 @@ -name: Android Beta -on: - workflow_dispatch: # Manual trigger - push: - branches: - - master - paths-ignore: - - .gitignore - - .github/** - - '!.github/workflows/android-beta.yaml' # Run check on self change - - '**/*_tests/**' - - '**/CMakeLists.txt' - - CONTRIBUTORS - - LICENSE - - NOTICE - - README.md - - iphone/** - - data/strings/** - - docs/** - - generator/** - - packaging/** - - pyhelpers/** - - qt*/** - - skin_generator/** - - tools/** - - track_generator/** - - xcode/** - -env: - JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin - -jobs: - android-google-beta: - name: Android Google Beta - runs-on: ubuntu-latest - environment: beta - steps: - - name: Install build tools and dependencies - shell: bash - run: | - sudo apt-get update -y - sudo apt-get install -y ninja-build - - - name: Checkout sources - uses: actions/checkout@v3 - with: - fetch-depth: 100 # enough to get all commits for the current day - - - name: Parallel submodules checkout - shell: bash - run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20)) - - - name: Checkout private keys - uses: actions/checkout@v3 - with: - repository: ${{ secrets.PRIVATE_REPO }} - ssh-key: ${{ secrets.PRIVATE_SSH_KEY }} - ref: master - path: private.git - - - name: Configure repo with private keys - shell: bash - run: | - ./configure.sh ./private.git - rm -rf ./private.git - - - name: Compile - shell: bash - working-directory: android - run: | - cmake --version - ninja --version - gradle -x lint -x lintVitalGoogleBeta assembleGoogleBeta uploadCrashlyticsSymbolFileGoogleBeta uploadCrashlyticsMappingFileGoogleBeta - - - name: Upload beta apk to App Distribution - shell: bash - working-directory: android - run: | - ./gradlew appDistributionUploadGoogleBeta diff --git a/.github/workflows/android-check-metadata.yaml b/.github/workflows/android-check-metadata.yaml deleted file mode 100644 index 10ae5651b67..00000000000 --- a/.github/workflows/android-check-metadata.yaml +++ /dev/null @@ -1,20 +0,0 @@ -name: Android Check Metadata -on: - workflow_dispatch: # Manual trigger - pull_request: - paths: - - .github/workflows/android-check-metadata.yaml # Run check on self change - - android/src/fdroid/** - - android/src/google/** - - tools/python/check_store_metadata.py - -jobs: - android-check-metadata: - name: Check app metadata - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Check metadata - run: ./tools/python/check_store_metadata.py android diff --git a/.github/workflows/android-check.yaml b/.github/workflows/android-check.yaml deleted file mode 100644 index f2628b77184..00000000000 --- a/.github/workflows/android-check.yaml +++ /dev/null @@ -1,110 +0,0 @@ -name: Android Check -on: - workflow_dispatch: # Manual trigger - push: - branches: - - master - pull_request: - paths-ignore: - - .gitignore - - .github/** - - '!.github/workflows/android-check.yaml' # Run check on self change - - '**/*_tests/**' - - CONTRIBUTORS - - LICENSE - - NOTICE - - README.md - - android/src/fdroid/** - - android/src/google/** - - iphone/** - - data/strings/** - - docs/** - - generator/** - - packaging/** - - pyhelpers/** - - qt*/** - - skin_generator/** - - tools/** - - track_generator/** - - xcode/** - -env: - JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin - -jobs: - lint: - name: Android Lint - runs-on: ubuntu-latest - steps: - - name: Checkout sources - uses: actions/checkout@v3 - with: - fetch-depth: 1 - - - name: Parallel submodules checkout - shell: bash - run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20)) - - - name: Configure in Open Source mode - shell: bash - run: ./configure.sh - - - name: Lint - shell: bash - working-directory: android - run: gradle lint - - android-check: - name: Build Android Debug - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - flavor: [WebDebug, FdroidBeta] - # Cancels previous jobs if the same branch or PR was updated again. - concurrency: - group: ${{ github.workflow }}-${{ matrix.flavor }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - - steps: - - name: Install build tools and dependencies - shell: bash - run: | - sudo apt-get update -y - sudo apt-get install -y ninja-build - - - name: Checkout sources - uses: actions/checkout@v3 - with: - fetch-depth: 200 # enough to get all commits for the current day - - - name: Parallel submodules checkout - shell: bash - run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20)) - - - name: Configure in Open Source mode - shell: bash - run: ./configure.sh - - - name: Configure ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ github.workflow }}-${{ matrix.flavor }} - - - name: Compile ${{ matrix.flavor }} - shell: bash - working-directory: android - env: - CMAKE_C_COMPILER_LAUNCHER: ccache - CMAKE_CXX_COMPILER_LAUNCHER: ccache - run: | - cmake --version - ninja --version - gradle -Parm64 assemble${{ matrix.flavor }} - - - name: Upload arm64-v8a ${{ matrix.flavor }} apk - uses: actions/upload-artifact@v3 - with: - name: android-arm64-v8a-${{ matrix.flavor }} - path: android/build/outputs/apk/**/OrganicMaps-*.apk - if-no-files-found: error diff --git a/.github/workflows/android-monkey.yaml b/.github/workflows/android-monkey.yaml deleted file mode 100644 index 10dae7eaeeb..00000000000 --- a/.github/workflows/android-monkey.yaml +++ /dev/null @@ -1,99 +0,0 @@ -name: Android Monkey -on: - workflow_dispatch: # Manual trigger - schedule: - - cron: '0 5 * * *' # Once per day at 05:00 UTC - -env: - JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin - -jobs: - precondition: - runs-on: ubuntu-latest - name: Check preconditions - steps: - - name: Checkout sources - uses: actions/checkout@v3 - with: - fetch-depth: 1000 # fetch month or so - - - name: Check that Android was updated - id: check - shell: bash - run: | - DIRS="android base drape drape_frontend editor ge0 map platform routing search shaders storage traffic transit" - if [ '${{ github.event_name }}' != 'schedule' ] || - [ $(git rev-list --count --since="24 hours" HEAD $DIRS) -gt 0 ]; then - echo "updated=true" >> $GITHUB_OUTPUT - else - echo "updated=" >> $GITHUB_OUTPUT - fi - outputs: - updated: ${{ steps.check.outputs.updated }} - - android-google-debug: - name: Android Google Debug - runs-on: ubuntu-latest - needs: precondition - if: ${{ needs.precondition.outputs.updated != '' }} - environment: beta - steps: - - name: Install build tools and dependencies - shell: bash - run: | - sudo apt-get update -y - sudo apt-get install -y ninja-build - - - name: Install Google SDK - uses: google-github-actions/setup-gcloud@v0 - - - name: Checkout sources - uses: actions/checkout@v3 - with: - fetch-depth: 100 # enough to get all commits for the current day - - - name: Parallel submodules checkout - shell: bash - run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20)) - - - name: Checkout private keys - uses: actions/checkout@v3 - with: - repository: ${{ secrets.PRIVATE_REPO }} - ssh-key: ${{ secrets.PRIVATE_SSH_KEY }} - ref: master - path: private.git - - - name: Configure repo with private keys - shell: bash - run: | - ./configure.sh ./private.git - rm -rf ./private.git - - - name: Compile - shell: bash - working-directory: android - run: | - cmake --version - ninja --version - gradle -Pfirebase -Parm64-v8a -Parmeabi-v7a -Px86_64 assembleGoogleDebug uploadCrashlyticsSymbolFileGoogleDebug - - - name: Run monkey - run: | - gcloud auth activate-service-account --key-file android/firebase-test-lab.json - gcloud config set project omapsapp - gcloud firebase test android run --app ./android/build/outputs/apk/google/debug/OrganicMaps-*-google-debug.apk \ - --device model=panther,version=33 \ - --device model=bluejay,version=32 \ - --device model=b2q,version=31 \ - --device model=f2q,version=30 \ - --device model=a10,version=29 \ - --device model=Pixel2.arm,version=30 \ - --device model=MediumPhone.arm,version=29 \ - --device model=MediumPhone.arm,version=28 \ - --device model=MediumPhone.arm,version=27 \ - --device model=Pixel2.arm,version=26,orientation=landscape \ - --device model=Nexus6,version=25 \ - --device model=NexusLowRes,version=24 \ - --device model=NexusLowRes,version=23,orientation=landscape \ - --timeout 15m diff --git a/.github/workflows/android-release-metadata.yaml b/.github/workflows/android-release-metadata.yaml deleted file mode 100644 index 0cb6e93e6a9..00000000000 --- a/.github/workflows/android-release-metadata.yaml +++ /dev/null @@ -1,47 +0,0 @@ -name: Android Release Metadata -on: - workflow_dispatch: # Manual trigger - -env: - JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin - -jobs: - android-release-metadata: - name: Upload Google Play metadata - runs-on: ubuntu-latest - environment: production - steps: - - name: Checkout sources - uses: actions/checkout@v3 - - - name: Parallel submodules checkout - shell: bash - run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20)) - - - name: Checkout screenshots - uses: actions/checkout@v3 - with: - repository: ${{ secrets.SCREENSHOTS_REPO }} - ssh-key: ${{ secrets.SCREENSHOTS_SSH_KEY }} - ref: master - path: screenshots - - - name: Checkout private keys - uses: actions/checkout@v3 - with: - repository: ${{ secrets.PRIVATE_REPO }} - ssh-key: ${{ secrets.PRIVATE_SSH_KEY }} - ref: master - path: private.git - - - name: Configure repo with private keys - shell: bash - run: | - ./configure.sh ./private.git - rm -rf ./private.git - - - name: Upload - shell: bash - run: ./gradlew prepareGoogleReleaseListing publishGoogleReleaseListing - working-directory: android - timeout-minutes: 5 diff --git a/.github/workflows/android-release.yaml b/.github/workflows/android-release.yaml deleted file mode 100644 index 8a2a9ecb570..00000000000 --- a/.github/workflows/android-release.yaml +++ /dev/null @@ -1,168 +0,0 @@ -name: Android Release -on: - workflow_dispatch: # Manual trigger - -env: - RELEASE_NOTES: android/src/google/play/release-notes/en-US/default.txt - FDROID_VERSION: android/src/fdroid/play/version.yaml - JAVA_HOME: /usr/lib/jvm/temurin-17-jdk-amd64 # Java 17 is required for Android Gradle 8 plugin - -jobs: - tag: - name: Tag - runs-on: ubuntu-latest - environment: production - steps: - - name: Checkout sources - uses: actions/checkout@v3 - with: - fetch-depth: 100 # Enough to get all commits for the last day. - ssh-key: ${{ secrets.RELEASE_SSH_KEY }} - - - name: Tag - id: tag - shell: bash - run: | - set -x - git config user.name '${{ github.actor }}' - git config user.email '${{ github.actor }}@users.noreply.github.com' - version=$(tools/unix/version.sh ios_version) - # +1 because below a "Bump versions" commit is created. - # TODO: Find a way to refactor FDroid versioning without that additional commit. - build=$(($(tools/unix/version.sh ios_build) + 1)) - code=$(($(tools/unix/version.sh android_code) + 1)) - tag=$version-$build-android - echo "::set-output name=version::$version" - echo "::set-output name=build::$build" - echo "::set-output name=tag::$tag" - echo "::set-output name=code::$code" - echo "version: ${version}-${build}-FDroid+${code}" > ${{ env.FDROID_VERSION }} - git add ${{ env.FDROID_VERSION }} - { - echo $tag - echo - cat ${{ env.RELEASE_NOTES }} - } > ${{ runner.temp }}/tag.txt - branch="${GITHUB_REF#refs/heads/}" - test -n "$branch" - git commit -m "Bump versions" -s - git tag -a $tag -F ${{ runner.temp }}/tag.txt - git show $tag - git push origin $branch:$branch - git push origin $tag:$tag - outputs: - version: ${{ steps.tag.outputs.version }} - build: ${{ steps.tag.outputs.build }} - code: ${{ steps.tag.outputs.code }} - tag: ${{ steps.tag.outputs.tag }} - - android-release: - name: Android Release - runs-on: ubuntu-latest - environment: production - needs: tag - strategy: - fail-fast: false - matrix: - include: - - flavor: google - - flavor: huawei - - flavor: web - steps: - - name: Install build tools and dependencies - shell: bash - run: | - sudo apt-get update -y - sudo apt-get install -y ninja-build - - - name: Checkout sources - uses: actions/checkout@v3 - with: - fetch-depth: 100 # enough to get all commits for the current day - ref: 'refs/tags/${{ needs.tag.outputs.tag }}' - - - name: Check tag - shell: bash - run: | - git show HEAD - test -n "${{ needs.tag.outputs.tag }}" - test "$(git tag --points-at HEAD)" = "${{ needs.tag.outputs.tag }}" - - - name: Parallel submodules checkout - shell: bash - run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20)) - - - name: Checkout screenshots - uses: actions/checkout@v3 - with: - repository: ${{ secrets.SCREENSHOTS_REPO }} - ssh-key: ${{ secrets.SCREENSHOTS_SSH_KEY }} - ref: master - path: screenshots - - - name: Checkout private keys - uses: actions/checkout@v3 - with: - repository: ${{ secrets.PRIVATE_REPO }} - ssh-key: ${{ secrets.PRIVATE_SSH_KEY }} - ref: master - path: private.git - - - name: Configure repo with private keys - shell: bash - run: | - ./configure.sh ./private.git - rm -rf ./private.git - - - name: Set up SDK - shell: bash - run: (cd tools/android; ./set_up_android.py --sdk $ANDROID_SDK_ROOT) - - - name: Compile and upload to Google Play - shell: bash - working-directory: android - run: | - gradle bundleGoogleRelease publishGoogleReleaseBundle - if: ${{ matrix.flavor == 'google' }} - - - name: Compile and upload to Huawei AppGallery - shell: bash - working-directory: android - run: | - gradle bundleHuaweiRelease - gradle publishHuaweiAppGalleryHuaweiRelease - if: ${{ matrix.flavor == 'huawei' }} - - - name: Compile universal APK - shell: bash - working-directory: android - run: | - gradle assembleWebRelease - if: ${{ matrix.flavor == 'web' }} - - - name: Prepare release notes - if: ${{ matrix.flavor == 'web' }} - shell: bash - run: | - { - cat ${{ env.RELEASE_NOTES }} - echo "" - echo "See [more details](https://organicmaps.app/news/) on our website when apps are published." - echo "" - echo "sha256sum:" - echo -e '\n```' - (cd ./android/build/outputs/apk/web/release/ && sha256sum OrganicMaps-${{ needs.tag.outputs.code }}-web-release.apk) | tr -d '\n' - echo -e '\n```' - } > ${{ runner.temp }}/release-notes.txt - - - name: Upload universal APK to GitHub - uses: softprops/action-gh-release@v1 - if: ${{ matrix.flavor == 'web' }} - with: - body_path: ${{ runner.temp }}/release-notes.txt - token: ${{ secrets.GITHUB_TOKEN }} - name: ${{ needs.tag.outputs.tag }} - tag_name: ${{ needs.tag.outputs.tag }} - discussion_category_name: 'Announcements' - files: ./android/build/outputs/apk/web/release/OrganicMaps-${{ needs.tag.outputs.code }}-web-release.apk - fail_on_unmatched_files: true diff --git a/.github/workflows/appstream-check.yaml b/.github/workflows/appstream-check.yaml deleted file mode 100644 index 8e80ebbbc62..00000000000 --- a/.github/workflows/appstream-check.yaml +++ /dev/null @@ -1,29 +0,0 @@ -name: Validate appstream metadata xml -on: - workflow_dispatch: # Manual trigger - pull_request: - paths: - - packaging/app.organicmaps.desktop.metainfo.xml - - .github/workflows/appstream-check.yaml # Run check on self change - -jobs: - validate-appstream: - name: Validate appstream metadata xml - runs-on: ubuntu-22.04 - steps: - - name: Checkout sources - uses: actions/checkout@v3 - - - name: Install appstream validator - shell: bash - run: | - sudo apt update -y - sudo apt install -y \ - flatpak - sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo - # We get it from flathub to ensure we have a recent version - sudo flatpak install -y org.freedesktop.appstream-glib - - - name: Validate appstream data - shell: bash - run: flatpak run org.freedesktop.appstream-glib validate --nonet packaging/app.organicmaps.desktop.metainfo.xml diff --git a/.github/workflows/cleanup_caches.yml b/.github/workflows/cleanup_caches.yml deleted file mode 100644 index 708cb2dba02..00000000000 --- a/.github/workflows/cleanup_caches.yml +++ /dev/null @@ -1,34 +0,0 @@ -# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows#force-deleting-cache-entries -name: Cleanup caches by a branch -on: - pull_request: - types: - - closed - -jobs: - cleanup: - runs-on: ubuntu-latest - steps: - - name: Check out code - uses: actions/checkout@v3 - - - name: Cleanup - env: - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - 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. - set +e - echo "Deleting caches..." - for cacheKey in $cacheKeysForPR - do - gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm - done - echo "Done" diff --git a/.github/workflows/ios-beta.yaml b/.github/workflows/ios-beta.yaml deleted file mode 100644 index 66647bc71d6..00000000000 --- a/.github/workflows/ios-beta.yaml +++ /dev/null @@ -1,73 +0,0 @@ -name: iOS Beta -on: - workflow_dispatch: # Manual trigger - push: - branches: - - master - paths-ignore: - - .gitignore - - .github/** - - '!.github/workflows/ios-beta.yaml' # Run check on self change - - '**/*_tests/**' - - '**/CMakeLists.txt' - - CONTRIBUTORS - - LICENSE - - NOTICE - - README.md - - android/** - - data/strings/** - - docs/** - - generator/** - - packaging/** - - pyhelpers/** - - qt*/** - - skin_generator/** - - tools/** - - track_generator/** - -jobs: - ios-beta: - name: Apple TestFlight - runs-on: macos-12 - env: - LANG: en_US.UTF-8 # Fastlane complains that the terminal is using ASCII. - LANGUAGE: en_US.UTF-8 - LC_ALL: en_US.UTF-8 - environment: beta - defaults: - run: - shell: bash - steps: - - name: Checkout sources - uses: actions/checkout@v3 - with: - fetch-depth: 100 # enough to get all commits for the current day - - - name: Parallel submodules checkout - run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20)) - - - name: Checkout private keys - uses: actions/checkout@v3 - with: - repository: ${{ secrets.PRIVATE_REPO }} - ssh-key: ${{ secrets.PRIVATE_SSH_KEY }} - ref: master - path: private.git - - - name: Configure repo with private keys - run: | - ./configure.sh ./private.git - rm -rf ./private.git - - - name: Compile and upload to TestFlight - run: ./fastlane.sh upload_testflight - env: - APPSTORE_CERTIFICATE_PASSWORD: '${{ secrets.APPSTORE_CERTIFICATE_PASSWORD }}' - working-directory: xcode - - - name: Upload ipa and DSYMs artifacts - uses: actions/upload-artifact@v3 - with: - name: ipa and DSYM archive - path: xcode/build/* - if-no-files-found: error diff --git a/.github/workflows/ios-check-metadata.yaml b/.github/workflows/ios-check-metadata.yaml deleted file mode 100644 index e5922c070af..00000000000 --- a/.github/workflows/ios-check-metadata.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: iOS Check metadata -on: - workflow_dispatch: # Manual trigger - pull_request: - paths: - - .github/workflows/ios-check-metadata.yaml # Run check on self change - - iphone/metadata/** - - tools/python/check_store_metadata.py - -jobs: - ios-check-metadata: - name: Check app metadata - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Check metadata - run: ./tools/python/check_store_metadata.py ios diff --git a/.github/workflows/ios-check.yaml b/.github/workflows/ios-check.yaml deleted file mode 100644 index 8624d546b95..00000000000 --- a/.github/workflows/ios-check.yaml +++ /dev/null @@ -1,75 +0,0 @@ -name: iOS Check -on: - workflow_dispatch: # Manual trigger - push: - branches: - - master - pull_request: - paths-ignore: - - .gitignore - - .github/** - - '!.github/workflows/ios-check.yaml' # Run check on self change - - '**/*_tests/**' - - '**/CMakeLists.txt' - - CONTRIBUTORS - - LICENSE - - NOTICE - - README.md - - android/** - - data/strings/** - - docs/** - - generator/** - - iphone/metadata/** - - packaging/** - - pyhelpers/** - - qt*/** - - skin_generator/** - - tools/** - - track_generator/** - -jobs: - ios-check: - name: Build iOS - runs-on: macos-12 - env: - LANG: en_US.UTF-8 # Fastlane complains that the terminal is using ASCII. - LANGUAGE: en_US.UTF-8 - LC_ALL: en_US.UTF-8 - strategy: - fail-fast: false - matrix: - buildType: [Debug, Release] - # Cancels previous jobs if the same branch or PR was updated again. - concurrency: - group: ${{ github.workflow }}-${{ matrix.buildType }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - - steps: - - name: Checkout sources - uses: actions/checkout@v3 - - - name: Parallel submodules checkout - shell: bash - run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20)) - - - name: Configure - shell: bash - run: ./configure.sh - - - name: Configure ccache - uses: mikehardy/buildcache-action@v2.1.0 - with: - cache_key: ${{ github.workflow }}-${{ matrix.buildType }} - - - name: Compile - shell: bash - # Check for compilation errors. - run: | - xcodebuild \ - CC=clang CPLUSPLUS=clang++ LD=clang LDPLUSPLUS=clang++ \ - -workspace xcode/omim.xcworkspace \ - -scheme OMaps \ - -configuration ${{ matrix.buildType }} build \ - 'generic/platform=iOS' \ - CODE_SIGNING_REQUIRED=NO \ - CODE_SIGNING_ALLOWED=NO diff --git a/.github/workflows/ios-release.yaml b/.github/workflows/ios-release.yaml deleted file mode 100644 index 55c8af2e989..00000000000 --- a/.github/workflows/ios-release.yaml +++ /dev/null @@ -1,64 +0,0 @@ -name: iOS Release -on: - workflow_dispatch: # Manual trigger - -jobs: - ios-release: - name: iOS Release - runs-on: macos-12 - env: - LANG: en_US.UTF-8 # Fastlane complains that the terminal is using ASCII. - LANGUAGE: en_US.UTF-8 - LC_ALL: en_US.UTF-8 - environment: production - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Checkout private keys - uses: actions/checkout@v3 - with: - repository: ${{ secrets.PRIVATE_REPO }} - ssh-key: ${{ secrets.PRIVATE_SSH_KEY }} - ref: master - path: ./private.git - - - name: Configure repo with private keys - shell: bash - run: | - mkdir -p xcode/keys/ - cp -p ./private.git/xcode/keys/appstore.json xcode/keys/ - rm -rf ./private.git - - - name: Checkout screenshots - uses: actions/checkout@v3 - with: - repository: ${{ secrets.SCREENSHOTS_REPO }} - ssh-key: ${{ secrets.SCREENSHOTS_SSH_KEY }} - ref: master - path: screenshots - - - name: Checkout keywords - uses: actions/checkout@v3 - with: - repository: ${{ secrets.KEYWORDS_REPO }} - ssh-key: ${{ secrets.KEYWORDS_SSH_KEY }} - ref: master - path: keywords - - - name: Update metadata - shell: bash - run: ./tools/python/check_store_metadata.py ios - - # NOTE: a new iOS draft must be created before this step - - name: Upload metadata - shell: bash - run: ./fastlane.sh upload_metadata - working-directory: xcode - timeout-minutes: 5 - - - name: Upload screenshots - shell: bash - run: ./fastlane.sh upload_screenshots - working-directory: xcode - timeout-minutes: 10 diff --git a/.github/workflows/linux-check.yaml b/.github/workflows/linux-check.yaml deleted file mode 100644 index 8e41fd6a25a..00000000000 --- a/.github/workflows/linux-check.yaml +++ /dev/null @@ -1,167 +0,0 @@ -name: Linux Check -on: - workflow_dispatch: # Manual trigger - push: - branches: - - master - pull_request: - paths-ignore: - - .gitignore - - .github/** - - '!.github/workflows/linux-check.yaml' # Run check on self change - - CONTRIBUTORS - - LICENSE - - NOTICE - - README.md - - android/** - - iphone/** - - data/strings/** - - docs/** - - packaging/** - - pyhelpers/** - - tools/** - - '!tools/python/test_server/**' - - xcode/** - -jobs: - linux-no-unity: - name: Linux no unity build - runs-on: ubuntu-22.04 - # Cancels previous jobs if the same branch or PR was updated again. - concurrency: - group: ${{ github.workflow }}-no-unity-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - - steps: - - name: Free disk space by removing .NET, Android and Haskell - shell: bash - run: | - sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc - - - name: Checkout sources - uses: actions/checkout@v3 - with: - fetch-depth: 100 # enough to get all commits for the current day - - - name: Parallel submodules checkout - shell: bash - run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20)) - - - name: Install build tools and dependencies - shell: bash - run: | - sudo apt update -y - sudo apt install -y \ - ninja-build \ - libgl1-mesa-dev \ - libglvnd-dev \ - qt6-base-dev \ - libqt6svg6-dev - - - name: Configure - shell: bash - run: ./configure.sh - - - name: Configure ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ github.workflow }}-no-unity - - - name: CMake - shell: bash - env: - CC: clang-14 - CXX: clang++-14 - CMAKE_C_COMPILER_LAUNCHER: ccache - CMAKE_CXX_COMPILER_LAUNCHER: ccache - # -g1 should slightly reduce build time. - run: | - cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_CXX_FLAGS=-g1 -DUNITY_DISABLE=ON - - - name: Compile - shell: bash - working-directory: build - run: ninja - - linux-matrix: - name: Linux builds and tests - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - compiler: [{ CXX: g++-12, CC: gcc-12 }, { CXX: clang++-14, CC: clang-14 }] - CMAKE_BUILD_TYPE: [Debug, RelWithDebInfo] - # Cancels previous jobs if the same branch or PR was updated again. - concurrency: - group: ${{ github.workflow }}-unity-${{ matrix.compiler.CC }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - - steps: - - name: Free disk space by removing .NET, Android and Haskell - shell: bash - run: | - sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc - - - name: Checkout sources - uses: actions/checkout@v3 - - - name: Parallel submodules checkout - shell: bash - run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20)) - - - name: Install build tools and dependencies - shell: bash - run: | - sudo apt update -y - sudo apt install -y \ - g++-12 \ - gcc-12 \ - ninja-build \ - libgl1-mesa-dev \ - libglvnd-dev \ - qt6-base-dev \ - libqt6svg6-dev - - - name: Configure - shell: bash - run: ./configure.sh - - - name: Configure ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ github.workflow }}-unity-${{ matrix.compiler.CC }}-${{ matrix.CMAKE_BUILD_TYPE }} - - - name: CMake - shell: bash - env: - CC: ${{ matrix.compiler.CC }} - CXX: ${{ matrix.compiler.CXX }} - CMAKE_C_COMPILER_LAUNCHER: ccache - CMAKE_CXX_COMPILER_LAUNCHER: ccache - # -g1 should slightly reduce build time. - run: | - echo "Building ${{ matrix.CMAKE_BUILD_TYPE }}" - cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \ - -DCMAKE_C_FLAGS=-g1 -DCMAKE_CXX_FLAGS=-g1 - - - name: Compile - shell: bash - working-directory: build - run: ninja - - - name: Tests - shell: bash - working-directory: build - env: - # drape_tests - requires X Window - # generator_integration_tests - https://github.com/organicmaps/organicmaps/issues/225 - # opening_hours_integration_tests - https://github.com/organicmaps/organicmaps/issues/219 - # opening_hours_supported_features_tests - https://github.com/organicmaps/organicmaps/issues/219 - # routing_integration_tests - https://github.com/organicmaps/organicmaps/issues/221 - # shaders_tests - https://github.com/organicmaps/organicmaps/issues/223 - # world_feed_integration_tests - https://github.com/organicmaps/organicmaps/issues/215 - CTEST_EXCLUDE_REGEX: "drape_tests|generator_integration_tests|opening_hours_integration_tests|opening_hours_supported_features_tests|routing_benchmarks|routing_integration_tests|routing_quality_tests|search_quality_tests|storage_integration_tests|shaders_tests|world_feed_integration_tests" - run: | - ln -s ../data data - ctest -LE "fixture" -E "$CTEST_EXCLUDE_REGEX" --output-on-failure diff --git a/.github/workflows/macos-check.yaml b/.github/workflows/macos-check.yaml deleted file mode 100644 index 3f5c672cb95..00000000000 --- a/.github/workflows/macos-check.yaml +++ /dev/null @@ -1,93 +0,0 @@ -name: macOS Check -on: - workflow_dispatch: # Manual trigger - push: - branches: - - master - pull_request: - paths-ignore: - - .gitignore - - .github/** - - '!.github/workflows/macos-check.yaml' # Run check on self change - - CONTRIBUTORS - - LICENSE - - NOTICE - - README.md - - android/** - - iphone/** - - data/strings/** - - docs/** - - packaging/** - - pyhelpers/** - - tools/** - - '!tools/python/test_server/**' - - xcode/** - -jobs: - macos-matrix: - name: macOS builds and tests - runs-on: macos-12 - env: - HOMEBREW_NO_ANALYTICS: 1 - HOMEBREW_NO_INSTALL_CLEANUP: 1 - strategy: - fail-fast: false - matrix: - CMAKE_BUILD_TYPE: [Debug, RelWithDebInfo] - # Cancels previous jobs if the same branch or PR was updated again. - concurrency: - group: ${{ github.workflow }}-${{ matrix.CMAKE_BUILD_TYPE }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - - steps: - - name: Checkout sources - uses: actions/checkout@v3 - - - name: Parallel submodules checkout - shell: bash - run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20)) - - - name: Install build tools and dependencies - shell: bash - run: | - brew install ninja qt@6 - - - name: Configure - shell: bash - run: ./configure.sh - - - name: Configure ccache - uses: hendrikmuhs/ccache-action@v1.2 - with: - key: ${{ github.workflow }}-${{ matrix.CMAKE_BUILD_TYPE }} - - - name: CMake - shell: bash - env: - CMAKE_C_COMPILER_LAUNCHER: ccache - CMAKE_CXX_COMPILER_LAUNCHER: ccache - run: | - echo "Building ${{ matrix.CMAKE_BUILD_TYPE }}" - cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.CMAKE_BUILD_TYPE }} \ - -DCMAKE_C_FLAGS=-g1 -DCMAKE_CXX_FLAGS=-g1 - - - name: Compile - shell: bash - working-directory: build - run: ninja - - - name: Tests - shell: bash - working-directory: build - env: - # drape_tests - requires X Window - # generator_integration_tests - https://github.com/organicmaps/organicmaps/issues/225 - # opening_hours_integration_tests - https://github.com/organicmaps/organicmaps/issues/219 - # opening_hours_supported_features_tests - https://github.com/organicmaps/organicmaps/issues/219 - # routing_integration_tests - https://github.com/organicmaps/organicmaps/issues/221 - # shaders_tests - https://github.com/organicmaps/organicmaps/issues/223 - # world_feed_integration_tests - https://github.com/organicmaps/organicmaps/issues/215 - CTEST_EXCLUDE_REGEX: "drape_tests|generator_integration_tests|opening_hours_integration_tests|opening_hours_supported_features_tests|routing_benchmarks|routing_integration_tests|routing_quality_tests|search_quality_tests|storage_integration_tests|shaders_tests|world_feed_integration_tests" - run: | - ln -s ../data data - ctest -LE "fixture" -E "$CTEST_EXCLUDE_REGEX" --output-on-failure diff --git a/.github/workflows/sonar_cloud.yaml b/.github/workflows/sonar_cloud.yaml new file mode 100644 index 00000000000..e0bc6fb1bba --- /dev/null +++ b/.github/workflows/sonar_cloud.yaml @@ -0,0 +1,71 @@ +name: SonarCloud +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] +jobs: + build: + runs-on: ubuntu-22.04 + env: + BUILD_WRAPPER_OUT_DIR: build_wrapper_output_directory # Directory where build-wrapper output will be placed + steps: + - name: Free disk space by removing .NET, Android and Haskell + shell: bash + run: | + sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc + + - name: Checkout sources + uses: actions/checkout@v3 + with: + fetch-depth: 100 # enough to get all commits for the current day + + - name: Parallel submodules checkout + shell: bash + run: git submodule update --depth 1 --init --recursive --jobs=$(($(nproc) * 20)) + + - name: Install sonar-scanner and build-wrapper + uses: SonarSource/sonarcloud-github-c-cpp@v2 + + - name: Install build tools and dependencies + shell: bash + run: | + sudo apt update -y + sudo apt install -y \ + ninja-build \ + libgl1-mesa-dev \ + libglvnd-dev \ + qt6-base-dev \ + libqt6svg6-dev + + - name: Configure + shell: bash + run: ./configure.sh + + - name: Configure ccache + uses: hendrikmuhs/ccache-action@v1.2 + with: + key: ${{ github.workflow }} + + - name: CMake + shell: bash + env: + CC: clang-14 + CXX: clang++-14 + CMAKE_C_COMPILER_LAUNCHER: ccache + CMAKE_CXX_COMPILER_LAUNCHER: ccache + # -g1 should slightly reduce build time. + run: | + cmake . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_FLAGS=-g1 -DCMAKE_CXX_FLAGS=-g1 + + - name: Run build-wrapper + run: | + build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} ninja -C build/ + + - name: Run sonar-scanner + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + run: | + sonar-scanner --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" diff --git a/.github/workflows/strings-check.yaml b/.github/workflows/strings-check.yaml deleted file mode 100644 index 84637a4835b..00000000000 --- a/.github/workflows/strings-check.yaml +++ /dev/null @@ -1,26 +0,0 @@ -name: Validate translation strings -on: - workflow_dispatch: # Manual trigger - pull_request: - paths: - - .github/workflows/strings-check.yaml # Run check on self change - - data/countries_names.txt - - data/strings/* - - tools/python/strings_utils.py - -jobs: - validate-translation-strings: - name: Validate translation strings - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3' - - - name: Validate strings.txt and types_strings.txt files - shell: bash - run: | - ./tools/python/strings_utils.py --validate - ./tools/python/strings_utils.py --types-strings --validate diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000000..a405ed9e8cb --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,13 @@ +sonar.projectKey=AndrewShkrob_organicmaps +sonar.organization=andrei-shkrob + +# This is the name and version displayed in the SonarCloud UI. +sonar.projectName=organicmaps +sonar.projectVersion=1.0 + + +sonar.sources=base/,coding/,cppjansson/,descriptions/,drape/,drape_frontend/,editor/,feature_list/,ge0/,generator/,geometry/,indexer/,kml/,map/,mapshot/,openlr/,platform/,poly_borders/,qt/,qt_tstfrm/,routing/,routing_common/,search/,shaders/,skin_generator/,software_renderer/,std/,storage/,topography_generator/,track_analyzing/,track_generator/,tracking/,traffic/,transit/ +sonar.exclusions=3party/**,android/**,cmake/**,data/**,docs/**,iphone/**,packaging/**,pyhelpers/**,testing/**,xcode/** + +# Encoding of the source code. Default is default system encoding +#sonar.sourceEncoding=UTF-8 \ No newline at end of file