feat: add access functions for application image #409
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2023-2024, [Ribose Inc](https://www.ribose.com). | |
# All rights reserved. | |
# This file is a part of tamatebako | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions | |
# are met: | |
# 1. Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# 2. Redistributions in binary form must reproduce the above copyright | |
# notice, this list of conditions and the following disclaimer in the | |
# documentation and/or other materials provided with the distribution. | |
# | |
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS | |
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
# POSSIBILITY OF SUCH DAMAGE. | |
# | |
# The purpose of this workflow is to check that build procedures work correctly | |
# in specific environment. Due to this reason there is no caching. It is done by | |
# intention. All caching is in upstream projects. | |
name: coverity | |
on: | |
push: | |
branches: [ main ] | |
paths-ignore: | |
- 'docs/**' | |
- '**.adoc' | |
- '**.md' | |
- 'macos-arm64.env' | |
- 'macos-x86_64.env' | |
- '.cirrus.yml' | |
- '.github/workflows/*.yml' | |
- '!.github/workflows/coverity.yml' | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- '**.adoc' | |
- '**.md' | |
- 'macos-arm64.env' | |
- 'macos-x86_64.env' | |
- '.cirrus.yml' | |
- '.github/workflows/*.yml' | |
- '!.github/workflows/coverity.yml' | |
branches: [ main ] | |
concurrency: | |
group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}' | |
cancel-in-progress: true | |
env: | |
CACHE_VER: 5 | |
COVERITY_TOKEN: "MmhAl7FrANiA8oF25A9hEg" | |
jobs: | |
analyze: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Setup environment | |
run: | | |
cat common.env ubuntu.env >> $GITHUB_ENV | |
echo "CORES=$(nproc --all)" >> $GITHUB_ENV | |
echo "MAKEFLAGS=j$(nproc --all)" >> $GITHUB_ENV | |
- name: Create deps folder | |
run: mkdir ${{github.workspace}}/${{env.DEPS}} | |
- name: Process cache | |
uses: actions/cache@v4 | |
with: | |
path: ${{github.workspace}}/${{env.DEPS}} | |
key: coverity-${{ hashFiles('**/common.env') }}-v${{ env.CACHE_VER }} | |
- name: Install packages | |
run: | | |
sudo apt-get -y update | |
sudo apt-get -y install \ | |
binutils-dev libevent-dev acl-dev libfmt-dev libjemalloc-dev \ | |
libdouble-conversion-dev libiberty-dev liblz4-dev libssl-dev liblzma-dev \ | |
libunwind-dev libdwarf-dev libelf-dev libgoogle-glog-dev libutfcpp-dev \ | |
libboost-filesystem-dev libboost-program-options-dev libboost-system-dev \ | |
libboost-iostreams-dev libboost-date-time-dev libboost-context-dev \ | |
libboost-regex-dev libboost-thread-dev libbrotli-dev libbz2-dev | |
- name: Configure | |
run: cmake -B build -DWITH_TESTS=OFF -DWITH_ASAN=OFF -DWITH_COVERAGE=OFF -DTESTS_LOG_LEVEL=warn | |
- name: Download Coverity | |
run: | | |
wget -q https://scan.coverity.com/download/cxx/linux64 --post-data "token=$COVERITY_TOKEN&project=$GITHUB_REPOSITORY" -O cov-analysis-linux64.tar.gz | |
mkdir cov-analysis-linux64 | |
tar xzf cov-analysis-linux64.tar.gz --strip 1 -C cov-analysis-linux64 | |
- name: Build | |
run: | | |
set -x | |
export PATH="$PWD/cov-analysis-linux64/bin:$PATH" | |
cov-build --dir cov-int cmake --build build --parallel "$CORES" | |
- name: Submit | |
run: | | |
tar czvf results.tgz cov-int | |
curl \ | |
--form project=$GITHUB_REPOSITORY \ | |
--form token=$COVERITY_TOKEN \ | |
--form email=m.samsonov@computer.org \ | |
--form file=@results.tgz \ | |
--form version=$GITHUB_REF \ | |
--form description=$GITHUB_SHA \ | |
https://scan.coverity.com/builds?project=$GITHUB_REPOSITORY |