version: 2 jobs: build: docker: - image: houqp/kobase:0.0.5 environment: EMULATE_READER: 1 # this is for shellcheck 0.4.5 and lower; can be removed for 0.4.6 LC_ALL: en_US.UTF8 steps: - checkout - restore_cache: keys: # binary dependencies require {{ arch }} because there are different CPUs in use on the servers - deps-{{ arch }}-{{ checksum ".ci/install.sh" }} # need to init some stuff first or git will complain when sticking in base cache - run: git submodule init base && git submodule update base && pushd base && git submodule init && git submodule update && popd # 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" }} - run: echo 'export PATH=${HOME}/bin:${PATH}' >> $BASH_ENV - run: name: setup command: .ci/before_install.sh - run: name: install command: .ci/install.sh - run: name: fetch command: .ci/fetch.sh - run: name: check command: .ci/check.sh - run: name: build command: .ci/build.sh - run: name: test command: .ci/test.sh - run: name: cleanup command: .ci/after_success.sh - run: name: clean up cache command: rm -frv ./base/build/*/{spec,cache/*} - save_cache: key: build-{{ arch }}-{{ checksum "git-rev-base" }} paths: - "/home/ko/.ccache" - "base" - save_cache: key: deps-{{ arch }}-{{ checksum ".ci/install.sh" }} paths: - "/home/ko/bin" - "/home/ko/.luarocks" # compiled luarocks binaries - "install"