version: 2 defaults: &defaults docker: - image: ubuntu:18.04 jobs: sanity_check: <<: *defaults steps: - checkout - run: name: Setup requirements command: bash scripts/setup_common_requirements.sh - run: name: run sanity check script command: bash scripts/ci_sanity_checks.sh build_linux: <<: *defaults steps: - checkout - run: name: Id command: cat /etc/*release - run: name: Setup requirements command: | bash scripts/setup_common_requirements.sh apt-get install -y libpng-dev libfreetype6-dev libdbus-glib-1-dev libgtk2.0-dev curl - run: name: Build for Linux command: bash scripts/build_linux.sh - store_artifacts: path: linux/_CPack_Packages - run: name: Update Navit-Download-Center command: | bash scripts/update_download_center.sh run_doxygen: <<: *defaults steps: - checkout - run: name: Install doxygen and other essentials command: apt-get update && apt-get -y install doxygen ca-certificates git rsync - run: name: Run doxygen command: cd navit && doxygen - run: name: Update results to Github command: bash scripts/update_doxygen.sh - store_artifacts: path: /root/project/doc build_sailfish: machine: true steps: - checkout - run: name: install docker command: circleci-install docker - run: name: make build dir command: mkdir ../rpmbuild - run: name: run build command: ls -lah ../rpmbuild && docker run -e VERSION_ID=2.2.1.18 -v `pwd`/../rpmbuild:/home/nemo/rpmbuild:rw -v `pwd`:/home/nemo/navit hoehnp/sailfishos-platform-sdk:2.2.1.18-r1 /bin/bash -x /home/nemo/navit/contrib/sailfish/build_sailfish_ci.sh - store_artifacts: name: Store rpm path: ../rpmbuild/RPMS/ build_android: working_directory: ~/code docker: - image: circleci/android:api-28-ndk environment: JVM_OPTS: -Xmx3200m GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"' steps: - checkout - run: name: Id command: cat /etc/*release - run: name: Install cmake gettext libsaxonb-java librsvg2-bin pkg-config libprotobuf-c-dev protobuf-c-compiler command: | sudo apt-get update sudo apt-get install -y cmake gettext libsaxonb-java librsvg2-bin pkg-config libprotobuf-c-dev protobuf-c-compiler - run: name: Install Android SDK components command: sdkmanager "cmake;3.6.4111459" - run: name: Build for Android command: bash scripts/build_android.sh - run: name: Run Lint Test command: | ln -s navit/navit.dtd navit.dtd mkdir /home/circleci/code/test-results ./gradlew lint test - run: name: Run CheckStyle Test command: ./gradlew checkstyleMain - run: name: Run Javadoc command: ./gradlew generateDebugJavadoc - store_artifacts: name: Store APK path: navit/android/build/outputs/apk destination: apk - store_artifacts: name: Store translations path: po destination: translations - store_artifacts: name: Store logs path: navit/android/build/outputs/logs destination: logs - store_artifacts: name: Store Javadoc path: navit/android/build/outputs/docs/javadoc destination: doc - store_artifacts: name: Store Lint reports path: navit/android/build/reports destination: reports - store_artifacts: name: Store checkstyle report path: /home/circleci/code/navit/android/checkstyle destination: reports - store_test_results: path: test-results - run: name: Update Navit-Download-Center command: | bash scripts/update_download_center.sh build_win32: docker: - image: ubuntu:14.04 steps: - checkout - run: name: Prepare the Windows build environment command: | apt-get update && xargs -a scripts/setup_14.04_requirements.list apt-get install -y apt-get install -y software-properties-common add-apt-repository -y ppa:george-edison55/cmake-3.x apt-get remove -y cmake apt-get install -y cmake3 mingw-w64 mingw-w64-tools default-jdk nsis libsaxonb-java curl - run: name: Build for Windows command: | bash scripts/build_win32.sh - store_artifacts: path: win32/navit.exe - run: name: Update Navit-Download-Center command: | bash scripts/update_download_center.sh build_wince: docker: - image: navit/dockerfiles:wince steps: - checkout - run: name: Prepare the WinCE build environment command: | bash scripts/setup_wince.sh - run: name: Build for Windows CE command: bash scripts/build_wince.sh - store_artifacts: path: wince/output - run: name: Update Navit-Download-Center command: | bash scripts/update_download_center.sh build_tomtom_minimal: <<: *defaults docker: - image: navit/tomtom-ng steps: - checkout - run: name: Setup common requirements command: | bash scripts/setup_common_requirements.sh - run: name: Build for Tomtom (minimal) command: | bash scripts/build_tomtom_minimal.sh - store_artifacts: path: /output - run: name: Update Navit-Download-Center command: | bash scripts/update_download_center.sh build_tomtom_plugin: <<: *defaults docker: - image: navit/tomtom-ng steps: - checkout - run: name: Setup common requirements command: | bash scripts/setup_common_requirements.sh - run: name: Build for Tomtom (plugin) command: | bash scripts/build_tomtom_plugin.sh - store_artifacts: path: /output - run: name: Update Navit-Download-Center command: | bash scripts/update_download_center.sh merge_trunk_in_master: <<: *defaults steps: - checkout - run: name: Install git command: apt-get update && apt-get -y install ca-certificates git - run: name: configure ssh git command: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts - add_ssh_keys: fingerprints: - "58:42:73:90:cc:68:f7:34:7e:37:37:fa:b3:26:1f:a5" - run: name: Update results to Github command: export GIT_TERMINAL_PROMPT=0 && git push origin $CIRCLE_SHA1:refs/heads/master check_spelling: <<: *defaults steps: - checkout - run: name: Install curl command: apt-get update && apt-get -y install curl - run: name: Install misspell command: | curl -L -o ./install-misspell.sh https://git.io/misspell sh ./install-misspell.sh -b /usr/local/bin/ - run: name: Check docs folder for misspells command: | misspell docs/ > typos.txt if [[ $( wc -l < typos.txt ) -gt 0 ]]; then echo "Typos/mispells found, please fix them"; cat typos.txt exit -1 fi workflows: version: 2 build_all: jobs: - sanity_check - build_linux: requires: - sanity_check - build_android: requires: - sanity_check - build_sailfish: requires: - sanity_check - build_win32: requires: - sanity_check - build_wince: requires: - sanity_check - build_tomtom_minimal: requires: - sanity_check - build_tomtom_plugin: requires: - sanity_check - run_doxygen: requires: - build_linux - build_android - build_win32 - build_wince - build_tomtom_minimal - build_tomtom_plugin filters: branches: only: /^trunk$/ - merge_trunk_in_master: requires: - build_linux - build_android - build_win32 - build_wince - build_tomtom_minimal - build_tomtom_plugin filters: branches: only: /^trunk$/ - check_spelling: filters: branches: only: /^readthedocs$/