123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- version: 2
- shared:
- restore_cache: &restore_cache
- restore_cache:
- keys:
- - ccache-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}
- - ccache-{{ arch }}-{{ .Environment.CIRCLE_JOB }}
- - ccache-{{ arch }}
- save_cache: &save_cache
- save_cache:
- key: ccache-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ .Branch }}-{{ .BuildNum }}
- paths:
- - ~/.ccache
- ccache_stats: &ccache_stats
- run:
- name: Print ccache statistics
- command: |
- echo "[ccache config]"
- ccache -p
- echo "[ccache stats]"
- ccache -s
- # Commmon initializing commands
- init: &init
- run:
- name: Initialize
- command: |
- mkdir -p /tmp/artifacts
- # Commmon environment variables
- common_environment: &common_environment
- QT5: True
- CMAKE_OPTS: -DUSE_WERROR=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo -DUSE_CCACHE=ON
- CCACHE_MAXSIZE: 500M
- CCACHE_LOGFILE: /tmp/artifacts/ccache.log
- MAKEFLAGS: -j6
- jobs:
- mingw32:
- environment:
- <<: *common_environment
- docker:
- - image: lmmsci/linux.mingw32:18.04
- steps:
- - checkout
- - *init
- - *restore_cache
- - run:
- name: Building
- command: |
- mkdir build && cd build
- ../cmake/build_win32.sh
- make lmms
- make
- - *ccache_stats
- - *save_cache
- mingw64:
- environment:
- <<: *common_environment
- docker:
- - image: lmmsci/linux.mingw64:18.04
- steps:
- - checkout
- - *init
- - *restore_cache
- - run:
- name: Building
- command: |
- mkdir build && cd build
- ../cmake/build_win64.sh
- make
- - *ccache_stats
- - *save_cache
- linux.gcc:
- docker:
- - image: lmmsci/linux.gcc:18.04
- environment:
- <<: *common_environment
- steps:
- - checkout
- - *init
- - *restore_cache
- - run:
- name: Configure
- command: mkdir build && cd build && cmake .. $CMAKE_OPTS -DCMAKE_INSTALL_PREFIX=./install
- - run:
- name: Build
- command: cd build && make
- - run:
- name: Build tests
- command: cd build && make tests
- - run:
- name: Run tests
- command: build/tests/tests
- - *ccache_stats
- - run:
- name: Build AppImage
- command: |
- cd build
- make install
- make appimage || (cat appimage.log && false)
- cp ./lmms-*.AppImage /tmp/artifacts/
- - store_artifacts:
- path: /tmp/artifacts/
- destination: /
- - store_artifacts:
- path: build/appimage.log
- destination: /
- - *save_cache
- shellcheck:
- docker:
- - image: koalaman/shellcheck-alpine:v0.4.6
- steps:
- - checkout
- - run:
- name: Shellcheck
- command: shellcheck $(find "./cmake/" -type f -name '*.sh' -o -name "*.sh.in")
- workflows:
- version: 2
- build-and-test:
- jobs:
- - mingw32
- - mingw64
- - linux.gcc
- - shellcheck
|