2020-12-04 22:11:00 +00:00
|
|
|
# DESCRIPTION: Github actions config
|
|
|
|
# This name is key to badges in README.adoc, so we use the name build
|
2020-12-04 22:39:53 +00:00
|
|
|
|
2020-12-04 22:11:00 +00:00
|
|
|
name: build
|
2020-12-04 15:30:46 +00:00
|
|
|
|
2020-12-04 22:11:00 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
schedule:
|
2020-12-04 22:39:53 +00:00
|
|
|
- cron: '0 0 * * 0' # weekly
|
2020-12-04 15:30:46 +00:00
|
|
|
|
|
|
|
jobs:
|
2020-12-04 22:39:53 +00:00
|
|
|
vlt:
|
2020-12-05 03:36:04 +00:00
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
os: [ubuntu-20.04]
|
|
|
|
compiler: [clang, gcc]
|
|
|
|
include:
|
|
|
|
- compiler: clang
|
|
|
|
cc: clang
|
|
|
|
cxx: clang++
|
|
|
|
- compiler: gcc
|
|
|
|
cc: gcc
|
|
|
|
cxx: g++
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
name: ${{ matrix.os }}-${{ matrix.compiler }}-build-test
|
2020-12-04 22:39:53 +00:00
|
|
|
env:
|
|
|
|
CI_OS_NAME: linux
|
2020-12-05 03:36:04 +00:00
|
|
|
CI_COMMIT: ${{ github.sha }}
|
2020-12-04 22:39:53 +00:00
|
|
|
CCACHE_COMPRESS: 1
|
|
|
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
2020-12-05 03:36:04 +00:00
|
|
|
CCACHE_MAXSIZE: 2Gi # 2GiB for clang and gcc, 4GiB in total
|
|
|
|
CC: ${{ matrix.cc }}
|
|
|
|
CXX: ${{ matrix.cxx }}
|
2020-12-04 22:39:53 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Cache
|
|
|
|
uses: actions/cache@v2
|
2020-12-04 15:30:46 +00:00
|
|
|
env:
|
2020-12-04 22:39:53 +00:00
|
|
|
cache-name: ccache
|
|
|
|
with:
|
|
|
|
path: ${{ github.workspace }}/.ccache
|
2020-12-05 03:36:04 +00:00
|
|
|
key: ${{ matrix.os }}-${{ matrix.compiler }}-${{ env.cache-name }}-${{ github.sha }}
|
2020-12-04 22:39:53 +00:00
|
|
|
restore-keys: |
|
2020-12-05 03:36:04 +00:00
|
|
|
${{ matrix.os }}-${{ matrix.compiler }}-${{ env.cache-name }}
|
2020-12-04 22:39:53 +00:00
|
|
|
- name: Install packages for build
|
|
|
|
env:
|
|
|
|
CI_BUILD_STAGE_NAME: build
|
|
|
|
run: bash ci/ci-install.bash
|
|
|
|
- name: CCACHE maintenance
|
|
|
|
run: mkdir -p $CCACHE_DIR && bash ci/ci-ccache-maint.bash
|
|
|
|
- name: Build
|
|
|
|
env:
|
|
|
|
CI_BUILD_STAGE_NAME: build
|
|
|
|
run: bash ci/ci-script.bash
|
|
|
|
- name: Install packages for tests
|
|
|
|
env:
|
|
|
|
CI_BUILD_STAGE_NAME: test
|
|
|
|
run: bash ci/ci-install.bash
|
|
|
|
- name: Test dist-vlt-0
|
|
|
|
env:
|
|
|
|
CI_BUILD_STAGE_NAME: test
|
|
|
|
TESTS: dist-vlt-0
|
|
|
|
run: bash ci/ci-script.bash
|
|
|
|
- name: Test dist-vlt-1
|
|
|
|
env:
|
|
|
|
CI_BUILD_STAGE_NAME: test
|
|
|
|
TESTS: dist-vlt-1
|
|
|
|
run: bash ci/ci-script.bash
|
|
|
|
- name: Test vltmt-0
|
|
|
|
env:
|
|
|
|
CI_BUILD_STAGE_NAME: test
|
|
|
|
TESTS: vltmt-0
|
|
|
|
run: bash ci/ci-script.bash
|
|
|
|
- name: Test vltmt-1
|
|
|
|
env:
|
|
|
|
CI_BUILD_STAGE_NAME: test
|
|
|
|
TESTS: vltmt-1
|
|
|
|
run: bash ci/ci-script.bash
|