Cleanup #10
Workflow file for this run
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
name: Ubuntu Release | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main, master ] | |
tags: [ v* ] | |
paths-ignore: | |
- '**.md' | |
pull_request: | |
paths-ignore: | |
- '**.md' | |
env: | |
CCACHE_COMPRESS: exists means true | |
CCACHE_SLOPPINESS: include_file_ctime,include_file_mtime,time_macros | |
concurrency: | |
group: '${{ github.workflow }}-${{ github.job }}-${{ github.head_ref || github.ref_name }}' | |
cancel-in-progress: true | |
jobs: | |
test-release: | |
timeout-minutes: 480 | |
name: Build and test in Release mode | |
strategy: | |
matrix: | |
os: [ ubuntu-20.04 ] | |
runs-on: ${{ matrix.os }} | |
services: | |
elasticsearch: | |
image: docker://elasticsearch:7.17.7 | |
options: --env discovery.type=single-node --publish 9200:9200 --publish 9300:9300 | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
openssl_ver=`sudo apt-cache madison openssl | grep xenial-updates | awk '{print $3}'` | |
libssl_ver=`sudo apt-cache madison libssl-dev | grep xenial-updates | awk '{print $3}'` | |
[ -n "${openssl_ver}" ] && [ -n "${libssl_ver}" ] && \ | |
sudo apt-get install -y --allow-downgrades openssl=${openssl_ver} libssl-dev=${libssl_ver} | |
sudo apt-get install -y \ | |
ccache \ | |
parallel \ | |
libboost-thread-dev \ | |
libboost-iostreams-dev \ | |
libboost-date-time-dev \ | |
libboost-system-dev \ | |
libboost-filesystem-dev \ | |
libboost-program-options-dev \ | |
libboost-chrono-dev \ | |
libboost-test-dev \ | |
libboost-context-dev \ | |
libboost-regex-dev \ | |
libboost-coroutine-dev \ | |
libcurl4-openssl-dev | |
sudo apt-get autoremove -y | |
sudo apt-get clean -y | |
df -h | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Configure | |
run: | | |
sudo dd if=/dev/zero of=/swapfile bs=1M count=4096 | |
sudo chmod 600 /swapfile | |
sudo mkswap /swapfile | |
sudo swapon /swapfile | |
export -n BOOST_ROOT BOOST_INCLUDEDIR BOOST_LIBRARYDIR | |
cmake -D CMAKE_BUILD_TYPE=Release \ | |
-D CMAKE_CXX_OUTPUT_EXTENSION_REPLACE=ON \ | |
-D CMAKE_C_COMPILER=gcc \ | |
-D CMAKE_C_COMPILER_LAUNCHER=ccache \ | |
-D CMAKE_CXX_COMPILER=g++ \ | |
-D CMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
-D CMAKE_INSTALL_PREFIX=/opt/kreel \ | |
-Bbuild . | |
- name: Load Cache | |
uses: actions/cache@v3 | |
with: | |
path: ccache | |
key: ccache-release-${{ matrix.os }}-${{ github.ref }}-${{ github.sha }} | |
restore-keys: | | |
ccache-release-${{ matrix.os }}-${{ github.ref }}- | |
ccache-release-${{ matrix.os }}- | |
- name: Build | |
run: | | |
export CCACHE_DIR="$GITHUB_WORKSPACE/ccache" | |
mkdir -p "$CCACHE_DIR" | |
make -j 1 -C build | |
- name: Unit-Tests | |
run: | | |
build/tests/app_test -l test_suite | |
curl -XPUT -H "Content-Type: application/json" http://localhost:9200/_cluster/settings \ | |
-d '{ "transient": { "cluster.routing.allocation.disk.threshold_enabled": false } }' | |
build/tests/es_test -l test_suite | |
libraries/fc/tests/run-parallel-tests.sh build/tests/chain_test -l test_suite | |
build/tests/cli_test -l test_suite | |
- name: Quick test for program arguments | |
run: | | |
build/programs/witness_node/witness_node --version | |
build/programs/witness_node/witness_node --help | |
if build/programs/witness_node/witness_node --bad-arg ; then \ | |
echo "Fail: did not get expected error."; false; \ | |
else \ | |
echo "Pass: got expected error."; \ | |
fi | |
if build/programs/witness_node/witness_node --plugins "account_history elasticsearch" ; then \ | |
echo "Fail: did not get expected error."; false; \ | |
else \ | |
echo "Pass: got expected error."; \ | |
fi | |
if build/programs/witness_node/witness_node --rpc-endpoint --plugins "witness"; then \ | |
echo "Fail: did not get expected error."; false; \ | |
else \ | |
echo "Pass: got expected error."; \ | |
fi | |
build/programs/cli_wallet/cli_wallet --version | |
build/programs/cli_wallet/cli_wallet --help | |
build/programs/cli_wallet/cli_wallet --suggest-brain-key | |
if build/programs/cli_wallet/cli_wallet --bad-arg ; then \ | |
echo "Fail: did not get expected error."; false; \ | |
else \ | |
echo "Pass: got expected error."; \ | |
fi | |
# - name: Node-Test | |
# run: | | |
# df -h | |
# pushd build | |
# ../programs/build_helpers/run-node-test | |
# df -h |