2
0
mirror of https://github.com/koreader/koreader synced 2024-11-04 12:00:25 +00:00
koreader/.circleci/config.yml

91 lines
2.7 KiB
YAML
Raw Normal View History

2017-09-07 04:26:20 +00:00
version: 2
workflows:
version: 2
build:
jobs:
- build
- docs:
context: koreader-vars
filters:
branches:
only: master
requires:
- build
2017-09-07 04:26:20 +00:00
jobs:
build:
docker:
2024-04-30 18:11:02 +00:00
- image: koreader/kobase:0.3.2-20.04
auth:
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
2017-09-07 04:26:20 +00:00
environment:
EMULATE_READER: 1
environment:
BASH_ENV: "~/.bashrc"
parallelism: 2
2017-09-07 04:26:20 +00:00
steps:
- checkout
# need to init some stuff first or git will complain when sticking in base cache
2024-04-14 15:32:33 +00:00
- run: git submodule update --init base && git -C base submodule update --depth 1 --init --jobs 3 --recursive
# we can't use command output directly for cache check so we write it to git-rev-base
- run: pushd base && git_rev_base=$(git describe HEAD) && popd && echo $git_rev_base && echo $git_rev_base >git-rev-base
- restore_cache:
keys:
- build-{{ arch }}-{{ checksum "git-rev-base" }}
# installs everything and caches base
2017-09-07 04:26:20 +00:00
- run:
name: fetch
command: .ci/fetch.sh
- run:
name: check
command: .ci/check.sh
- run:
name: build
command: .ci/build.sh
# we want to save cache prior to testing so we don't have to clean it up
2017-09-07 04:26:20 +00:00
- save_cache:
key: build-{{ arch }}-{{ checksum "git-rev-base" }}
2017-09-07 04:26:20 +00:00
paths:
- "/home/ko/.ccache"
- "base"
# our lovely unit tests
- run:
name: test
command: .ci/test.sh
# docs, coverage, and test timing (can we use two outputs at once?); master branch only
- run:
name: coverage
command: .ci/after_success.sh
# by storing the test results CircleCI automatically distributes tests based on execution time
- store_test_results:
path: koreader-emulator-x86_64-linux-gnu/koreader
# CircleCI doesn't make the test results available as artifacts (October 2017)
- store_artifacts:
path: koreader-emulator-x86_64-linux-gnu/koreader/junit-test-results.xml
docs:
docker:
2024-04-30 18:11:02 +00:00
- image: koreader/kobase:0.3.2-20.04
auth:
username: $DOCKER_USERNAME
password: $DOCKER_PASSWORD
environment:
EMULATE_READER: 1
environment:
BASH_ENV: "~/.bashrc"
parallelism: 1
steps:
- checkout
- run:
2024-04-14 15:32:33 +00:00
name: fetch
command: .ci/fetch.sh
# docs, coverage, and test timing (can we use two outputs at once?); master branch only
- run:
name: docs-and-translation
command: .ci/after_success_docs_translation.sh