Skip to content

babe indexer

babe indexer #4765

Workflow file for this run

name: Build
on:
push:
branches: [ master ]
tags: [ '*' ]
pull_request:
env:
BUILD_DIR: build
CTEST_OUTPUT_ON_FAILURE: 1
GITHUB_HUNTER_USERNAME: ${{ secrets.HUNTER_USERNAME }}
GITHUB_HUNTER_TOKEN: ${{ secrets.HUNTER_TOKEN }}
# Change all container: values to this variable once this feature is available
# https://gh.neting.ccmunity/t/how-to-set-and-access-a-workflow-variable/17335/6
INDOCKER_IMAGE: soramitsu/kagome-dev@sha256:a3153bda78e15337fc38b6800f508e8c3b27758cba6319e60e7c805b06e071f6
CACHE_VERSION: v07
CACHE_PATHS: |
~/Library/Caches/pip
~/.cargo
~/.ccache
~/.hunter
~/.rustup
jobs:
MacOS:
runs-on: macos-11
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ github.job }}-${{ env.CACHE_VERSION }}
- name: install
run: ./housekeeping/macos/dependency.sh
- name: build
env:
DEVELOPER_DIR: /Applications/Xcode_11.7.app/Contents/Developer
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCOVERAGE=OFF -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/cxx17.cmake
Linux:
if: ${{ !(github.ref == 'refs/heads/master' || startsWith( github.ref, 'refs/tags/' )) }}
strategy:
fail-fast: false
matrix:
options:
- name: "Linux: gcc-10 ASAN No Toolchain"
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/gcc-10_cxx17.cmake -DASAN=ON
- name: "Linux: gcc-12 ASAN No Toolchain"
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/gcc-12_cxx17.cmake -DASAN=ON
- name: "Linux: clang-15 TSAN"
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/clang-15_cxx17.cmake -DTSAN=ON
- name: "Linux: clang-11 UBSAN"
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/clang-11_cxx17.cmake -DUBSAN=ON
- name: "Linux: clang-15 External Project"
run: ./housekeeping/make_external_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchain/clang-15_cxx17.cmake
- name: "Linux: clang-15 UBSAN"
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/clang-15_cxx17.cmake -DUBSAN=ON
name: "${{ matrix.options.name }}"
runs-on: ubuntu-latest
container: soramitsu/kagome-dev@sha256:a3153bda78e15337fc38b6800f508e8c3b27758cba6319e60e7c805b06e071f6
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ github.job }}-${{ matrix.options.name }}-${{ env.CACHE_VERSION }}
- name: df du
run: |
df -m || true
du -hd1 /__w /github || true
- name: Install mold
run: ./housekeeping/ci_install_mold.sh --make-default
- name: "${{ matrix.options.name }}"
run: "${{ matrix.options.run }}"
- name: df du
if: ${{ always() }}
run: |
df -m || true
du -hd1 /__w /github || true
Linux-self-hosted:
if: ${{ github.ref == 'refs/heads/master' || startsWith( github.ref, 'refs/tags/' ) }}
strategy:
fail-fast: false
matrix:
options:
- name: "Linux: gcc-10 ASAN No Toolchain"
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/gcc-10_cxx17.cmake -DASAN=ON
- name: "Linux: gcc-12 ASAN No Toolchain"
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/gcc-12_cxx17.cmake -DASAN=ON
- name: "Linux: clang-15 TSAN"
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/clang-15_cxx17.cmake -DTSAN=ON
- name: "Linux: clang-11 UBSAN"
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/clang-11_cxx17.cmake -DUBSAN=ON
- name: "Linux: clang-15 External Project"
run: ./housekeeping/make_external_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=../../cmake/toolchain/clang-15_cxx17.cmake
- name: "Linux: clang-15 UBSAN"
run: ./housekeeping/make_build.sh -DCLEAR_OBJS=ON -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/clang-15_cxx17.cmake -DUBSAN=ON
name: "${{ matrix.options.name }}"
runs-on: [ ubuntu-latest, kagome, self-hosted, linux ]
container: soramitsu/kagome-dev@sha256:a3153bda78e15337fc38b6800f508e8c3b27758cba6319e60e7c805b06e071f6
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ github.job }}-${{ matrix.options.name }}-${{ env.CACHE_VERSION }}
- name: df du
run: |
df -m || true
du -hd1 /__w /github || true
- name: Install mold
run: ./housekeeping/ci_install_mold.sh --make-default
- name: "${{ matrix.options.name }}"
run: "${{ matrix.options.run }}"
- name: df du
if: ${{ always() }}
run: |
df -m || true
du -hd1 /__w /github || true
clang-tidy:
name: "Linux: clang-tidy"
runs-on: ubuntu-latest
container: soramitsu/kagome-dev@sha256:a3153bda78e15337fc38b6800f508e8c3b27758cba6319e60e7c805b06e071f6
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
with:
fetch-depth: 0
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ github.job }}-${{ env.CACHE_VERSION }}
- name: clang-tidy
env:
# build only generated files, so clang-tidy will work correctly
BUILD_FINAL_TARGET: generated
run: |
./housekeeping/make_build.sh
./housekeeping/clang-tidy-diff.sh
coverage:
if: ${{ !(github.ref == 'refs/heads/master' || startsWith( github.ref, 'refs/tags/' )) }}
name: "Linux: gcc-10 coverage/sonar"
runs-on: ubuntu-latest
container: soramitsu/kagome-dev@sha256:a3153bda78e15337fc38b6800f508e8c3b27758cba6319e60e7c805b06e071f6
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ github.job }}-${{ env.CACHE_VERSION }}
- name: df du
run: |
df -m || true
du -hd1 /__w /github || true
- name: Install mold
run: ./housekeeping/ci_install_mold.sh --make-default
- name: makeBuild
env:
BUILD_FINAL_TARGET: ctest_coverage
run: ./housekeeping/make_build.sh -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/gcc-10_cxx17.cmake -DCOVERAGE=ON -DCLEAR_OBJS=ON
- name: df du
if: ${{ always() }}
run: |
df -m || true
du -hd1 /__w /github || true
- if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
name: Submit Coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: if [ "CODECOV_TOKEN" != "null" ]; then ./housekeeping/codecov.sh; else echo "Some secret undefined. Step passed..."; fi
- if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
name: Sonar
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: ${{ github.ref }}
run: if [ "$SONAR_TOKEN" != "null" -a "$GITHUB_USERNAME" != "null" -a "$GITHUB_TOKEN" != "null" ]; then ./housekeeping/sonar.sh; else echo "Some secret undefined. Step passed..."; fi
coverage-self-hosted:
if: ${{ github.ref == 'refs/heads/master' || startsWith( github.ref, 'refs/tags/' ) }}
name: "Linux: gcc-10 coverage/sonar"
runs-on: [ ubuntu-latest, kagome, self-hosted, linux ]
container: soramitsu/kagome-dev@sha256:a3153bda78e15337fc38b6800f508e8c3b27758cba6319e60e7c805b06e071f6
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ github.job }}-${{ env.CACHE_VERSION }}
- name: df du
run: |
df -m || true
du -hd1 /__w /github || true
- name: Install mold
run: ./housekeeping/ci_install_mold.sh --make-default
- name: makeBuild
env:
BUILD_FINAL_TARGET: ctest_coverage
run: ./housekeeping/make_build.sh -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/gcc-10_cxx17.cmake -DCOVERAGE=ON -DCLEAR_OBJS=ON
- name: df du
if: ${{ always() }}
run: |
df -m || true
du -hd1 /__w /github || true
- if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
name: Submit Coverage
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: if [ "CODECOV_TOKEN" != "null" ]; then ./housekeeping/codecov.sh; else echo "Some secret undefined. Step passed..."; fi
- if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
name: Sonar
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_USERNAME: ${{ secrets.GITHUB_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH_NAME: ${{ github.ref }}
run: if [ "$SONAR_TOKEN" != "null" -a "$GITHUB_USERNAME" != "null" -a "$GITHUB_TOKEN" != "null" ]; then ./housekeeping/sonar.sh; else echo "Some secret undefined. Step passed..."; fi
Minideb:
if: ${{ !(github.ref == 'refs/heads/master' || startsWith( github.ref, 'refs/tags/' )) }}
strategy:
fail-fast: false
matrix:
options:
- name: "Minideb: Build Debug"
build-type: "Debug"
- name: "Minideb: Build Release"
build-type: "Release"
name: "${{ matrix.options.name }}"
runs-on: ubuntu-latest
container: soramitsu/kagome-dev@sha256:a3153bda78e15337fc38b6800f508e8c3b27758cba6319e60e7c805b06e071f6
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ github.job }}-${{ matrix.options.name }}-${{ env.CACHE_VERSION }}
- name: "${{ matrix.options.name }}"
env:
BUILD_TYPE: "${{ matrix.options.build-type }}"
run: ./housekeeping/docker/kagome-dev/make.sh
Minideb-self-hosted:
if: ${{ github.ref == 'refs/heads/master' || startsWith( github.ref, 'refs/tags/' ) }}
strategy:
fail-fast: false
matrix:
options:
- name: "Minideb: Build Debug"
build-type: "Debug"
- name: "Minideb: Build Release"
build-type: "Release"
name: "${{ matrix.options.name }}"
runs-on: [ ubuntu-latest, kagome, self-hosted, linux ]
container: soramitsu/kagome-dev@sha256:a3153bda78e15337fc38b6800f508e8c3b27758cba6319e60e7c805b06e071f6
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ github.job }}-${{ matrix.options.name }}-${{ env.CACHE_VERSION }}
- name: "${{ matrix.options.name }}"
env:
BUILD_TYPE: "${{ matrix.options.build-type }}"
run: ./housekeeping/docker/kagome-dev/make.sh
Push-self-hosted:
if: ${{ github.ref == 'refs/heads/master' || startsWith( github.ref, 'refs/tags/' ) }}
needs: [clang-tidy, MacOS, Minideb-self-hosted]
strategy:
fail-fast: false
matrix:
options:
- name: "Push Debug Docker image"
build-type: "Debug"
- name: "Push Release Docker image"
build-type: "Release"
- name: "Push RelWithDebInfo Docker image"
build-type: "RelWithDebInfo"
runs-on: [ ubuntu-latest, kagome, self-hosted, linux ]
container: soramitsu/kagome-dev@sha256:a3153bda78e15337fc38b6800f508e8c3b27758cba6319e60e7c805b06e071f6
steps:
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- uses: actions/cache@937d24475381cd9c75ae6db12cb4e79714b926ed
with:
path: ${{ env.CACHE_PATHS }}
key: ${{ github.job }}-${{ env.CACHE_VERSION }}
- run: git fetch --prune --unshallow
- name: build
env:
BUILD_TYPE: "${{ matrix.options.build-type }}"
run: ./housekeeping/docker/kagome-dev/make.sh
- uses: azure/docker-login@83efeb77770c98b620c73055fbb59b2847e17dc0
with:
login-server: https://index.docker.io/v1/
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: docker pack and push
env:
VERSION: ${{ github.ref }}
BUILD_TYPE: "${{ matrix.options.build-type }}"
run: ./housekeeping/docker/kagome/build_and_push.sh
zombie-tests:
strategy:
fail-fast: false
matrix:
options:
- name: "Parachains smoke test"
test: "test0001"
- name: "Parachains upgrade smoke test"
test: "test0002"
- name: "Parachains smoke test cumulus"
test: "test0003"
runs-on: [ ubuntu-latest, kagome, self-hosted, linux ]
needs: [Push-self-hosted]
steps:
- name: Set owner of working dir recurively
run: sudo chown -R $(whoami) .
- uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6
- name: build zombie-tester
working-directory: ./zombienet/docker
run: make tester
- name: Run test
working-directory: ./zombienet/docker
run: make ${{ matrix.options.test }}
Trigger_CD:
if: ${{ github.ref == 'refs/heads/master' }}
needs: [Push-self-hosted]
runs-on: ubuntu-latest
steps:
- name: trigger cd job
run: |
curl -fI "${{ secrets.JENKINS_URL }}kagome-test&token=${{ secrets.JENKINS_TOKEN }}"
curl -fI "${{ secrets.JENKINS_URL }}polkadot-test&token=${{ secrets.JENKINS_TOKEN }}"