Instantly share code, notes, and snippets.
Created
May 22, 2020 15:32
-
Star
0
(0)
You must be signed in to star a gist -
Fork
0
(0)
You must be signed in to fork a gist
-
Save jkoan/00c75c37b36cb0d842997f5656f4673c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: Build Navit | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
defaults: &defaults | |
runs-on: ubuntu-latest | |
container: | |
image: debian:latest | |
jobs: | |
sanity_check: | |
runs-on: ubuntu-latest | |
container: | |
image: navit/sanity_check:latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: run sanity check script | |
run: bash scripts/ci_sanity_checks.sh | |
- name: Run CheckStyle Test | |
run: ./gradlew checkstyleMain | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: Store checkstyle report | |
path: navit/android/checkstyle | |
build_linux: | |
<<: *defaults | |
needs: sanity_check | |
steps: | |
- uses: actions/checkout@v1 | |
- run: | | |
apt-get update && apt-get install -y git | |
if scripts/check_need_build.sh; then circleci step halt; fi | |
- name: Id | |
run: cat /etc/*release | |
- name: Setup requirements | |
run: | | |
bash scripts/setup_common_requirements.sh | |
apt-get install -y libpng-dev libfreetype6-dev libdbus-glib-1-dev libgtk2.0-dev curl | |
- name: Build for Linux | |
run: bash scripts/build_linux.sh | |
- uses: actions/upload-artifact@v1 | |
with: | |
path: linux/_CPack_Packages | |
- name: Update Navit-Download-Center | |
run: | | |
bash scripts/update_download_center.sh | |
run_doxygen: | |
<<: *defaults | |
needs: [build_android, build_wince, build_sailfish, build_tomtom_minimal, build_linux, build_tomtom_plugin, build_win32] | |
steps: | |
- uses: actions/checkout@v1 | |
- run: if scripts/check_need_build.sh; then circleci step halt; fi | |
- name: Install doxygen and other essentials | |
run: apt-get update && apt-get -y install doxygen ca-certificates git rsync | |
- name: Run doxygen | |
run: cd navit && doxygen | |
- name: Update results to Github | |
run: bash scripts/update_doxygen.sh | |
- uses: actions/upload-artifact@v1 | |
with: | |
path: /root/project/doc | |
build_sailfish: | |
<<: *defaults | |
needs: sanity_check | |
machine: true | |
steps: | |
- uses: actions/checkout@v1 | |
- run: if scripts/check_need_build.sh; then circleci step halt; fi | |
- name: install docker | |
run: circleci-install docker | |
- name: make build dir | |
run: mkdir ../rpmbuild | |
- name: run build | |
run: ls -lah ../rpmbuild && docker run -e VERSION_ID=3.1.0.12 -v `pwd`/../rpmbuild:/home/nemo/rpmbuild:rw -v `pwd`:/home/nemo/navit hoehnp/sailfishos-platform-sdk:3.1.0.12 /bin/bash -x /home/nemo/navit/contrib/sailfish/build_sailfish_ci.sh | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: Store rpm | |
path: ../rpmbuild/RPMS/ | |
destination: rpmbuild | |
build_android: | |
<<: *defaults | |
needs: sanity_check | |
working_directory: ~/code | |
docker: | |
- image: circleci/android:api-29-ndk | |
environment: | |
JVM_OPTS: -Xmx3200m | |
GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"' | |
KEYSTORE: '/home/circleci/.keystore' | |
steps: | |
- uses: actions/checkout@v1 | |
- run: if scripts/check_need_build.sh; then circleci step halt; fi | |
- name: Install requirements | |
run: scripts/setup_android.sh | |
- name: Setup Keystore and Playstore Keys | |
run: scripts/setup_publish_keys.sh | |
- name: Build and upload Android | |
run: fastlane circleci | |
- name: Run Lint Test | |
run: | | |
ln -s navit/navit.dtd navit.dtd | |
mkdir /home/circleci/code/test-results | |
./gradlew lint test | |
- name: Run Javadoc | |
run: ./gradlew generateDebugJavadoc | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: Store APK | |
path: navit/android/build/outputs/apk | |
destination: apk | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: Store logs | |
path: navit/android/build/outputs/logs | |
destination: logs | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: Store Javadoc | |
path: navit/android/build/outputs/docs/javadoc | |
destination: doc | |
- uses: actions/upload-artifact@v1 | |
with: | |
name: Store Lint reports | |
path: navit/android/build/reports | |
destination: reports | |
- uses: actions/upload-artifact@v1 | |
with: | |
path: test-results | |
- name: Update Navit-Download-Center | |
run: | | |
bash scripts/update_download_center.sh | |
build_win32: | |
<<: *defaults | |
needs: sanity_check | |
docker: | |
- image: ubuntu:14.04 | |
steps: | |
- uses: actions/checkout@v1 | |
- run: | | |
apt-get update && apt-get install -y git | |
if scripts/check_need_build.sh; then circleci step halt; fi | |
- name: Prepare the Windows build environment | |
run: | | |
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 | |
- name: Build for Windows | |
run: | | |
bash scripts/build_win32.sh | |
- uses: actions/upload-artifact@v1 | |
with: | |
path: win32/navit.exe | |
- name: Update Navit-Download-Center | |
run: | | |
bash scripts/update_download_center.sh | |
build_wince: | |
<<: *defaults | |
needs: sanity_check | |
docker: | |
- image: navit/dockerfiles:wince | |
steps: | |
- uses: actions/checkout@v1 | |
- run: | | |
apt-get update && apt-get install -y git-core | |
if scripts/check_need_build.sh; then circleci step halt; fi | |
- name: Prepare the WinCE build environment | |
run: | | |
bash scripts/setup_wince.sh | |
- name: Build for Windows CE | |
run: bash scripts/build_wince.sh | |
- uses: actions/upload-artifact@v1 | |
with: | |
path: wince/output | |
- name: Update Navit-Download-Center | |
run: | | |
bash scripts/update_download_center.sh | |
build_tomtom_minimal: | |
<<: *defaults | |
needs: sanity_check | |
docker: | |
- image: navit/tomtom-ng | |
steps: | |
- uses: actions/checkout@v1 | |
- run: if scripts/check_need_build.sh; then circleci step halt; fi | |
- name: Prepare the tomtom build environment | |
run: | | |
bash scripts/setup_common_requirements.sh | |
apt-get install -y xsltproc | |
- name: Build for Tomtom (minimal) | |
run: | | |
bash scripts/build_tomtom_minimal.sh | |
- uses: actions/upload-artifact@v1 | |
with: | |
path: /output | |
- name: Update Navit-Download-Center | |
run: | | |
bash scripts/update_download_center.sh | |
build_tomtom_plugin: | |
<<: *defaults | |
needs: sanity_check | |
docker: | |
- image: navit/tomtom-ng | |
steps: | |
- uses: actions/checkout@v1 | |
- run: if scripts/check_need_build.sh; then circleci step halt; fi | |
- name: Prepare the tomtom build environment | |
run: | | |
bash scripts/setup_common_requirements.sh | |
apt-get install -y xsltproc | |
- name: Build for Tomtom (plugin) | |
run: | | |
bash scripts/build_tomtom_plugin.sh | |
- uses: actions/upload-artifact@v1 | |
with: | |
path: /output | |
- name: Update Navit-Download-Center | |
run: | | |
bash scripts/update_download_center.sh | |
merge_trunk_in_master: | |
<<: *defaults | |
needs: [build_android, build_wince, build_sailfish, build_tomtom_minimal, build_linux, build_tomtom_plugin, build_win32] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Install git | |
run: apt-get update && apt-get -y install ca-certificates git | |
- name: configure ssh git | |
run: mkdir -p ~/.ssh/ && ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts | |
- name: Update results to Github | |
run: export GIT_TERMINAL_PROMPT=0 && git push origin $CIRCLE_SHA1:refs/heads/master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment