Wextra fixes #420
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: holon_lease_recipes_workflow | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
timeout-minutes: 30 | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
path: ./code | |
- name: apt update | |
run: sudo apt update | |
# Install golang | |
- name: Install golang 1.20.3 | |
run: sudo rm -rf /usr/bin/go && | |
sudo wget https://golang.org/dl/go1.20.3.linux-amd64.tar.gz && | |
sudo mkdir /home/runner/work/go && | |
sudo tar -C /home/runner/work/go -xzf go1.20.3.linux-amd64.tar.gz && | |
export PATH=$PATH:/home/runner/work/go/go/bin && | |
go version | |
- name: dpkg / rpm prep | |
run: sudo apt-get install -y uuid-dev | |
uuid libuuid1 | |
libaio-dev libaio1 | |
libgcrypt20 openssl | |
libssl-dev python3-pip | |
python3-setuptools `apt-cache search librocksdb | awk '{print $1}'` uncrustify libasan5 libtsan0 | |
# Install python libraies | |
- name: Install python libraries | |
run: pip3 install setuptools wheel func_timeout sockets psutil dpath jmespath | |
# Install Ansible | |
- name: Install Ansible | |
run: pip3 install ansible | |
- name: make | |
run: cd ./code && | |
./prepare.sh && | |
./configure --prefix=/home/runner/work/niovad/niovad/build_dir/ --enable-devel && | |
make clean && make && make install | |
env: | |
LD_LIBRARY_PATH: /home/runner/work/niovad/niovad/build_dir/lib | |
- name: Build go applications using makefile | |
run: export PATH=$PATH:/home/runner/work/go/go/bin && | |
cd code/go/pumiceDB/examples/leaseApp | |
&& cd client && go mod tidy && cd .. | |
&& cd pmdbServer && go mod tidy && cd .. | |
&& make install_all -e DIR=/home/runner/work/niovad/niovad/build_dir | |
- name: Copy script to run recipes | |
run: cp ./code/scripts/run-recipes.sh /home/runner/work/niovad/niovad/build_dir/ && | |
cp ./code/scripts/lease_recipes.txt /home/runner/work/niovad/niovad/build_dir/ | |
# Checkout holon repo | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
with: | |
repository: 00pauln00/holon | |
#ref: | |
token: ${{ secrets.HOLON_NIOVA_CI_21_12_2020 }} # 'GitHub_PAT' is a secret that contains your PAT | |
path: ./holon | |
- name: Copy holon repo | |
run: cp -r ./holon /home/runner/work/niovad/niovad/build_dir/ | |
- name: Create log directory for storing holon logs | |
run: mkdir /home/runner/work/niovad/niovad/holon_log | |
- name: Create dir for cover data counters, metadata to be placed | |
run: mkdir /home/runner/work/niovad/niovad/code_cov && | |
export GOCOVERDIR=/work/niovad/niovad/code_cov | |
- name: run recipes for lease application | |
run: cd /home/runner/work/niovad/niovad/build_dir/holon/ && | |
../run-recipes.sh '/home/runner/work/niovad/niovad/build_dir/holon' | |
'/home/runner/work/niovad/niovad/build_dir' | |
'/home/runner/work/niovad/niovad/holon_log' 5 | |
'/home/runner/work/niovad/niovad/build_dir/lease_recipes.txt' | |
'lease' | |
'/home/runner/work/go/go/bin' | |
- name: Run go covdata tool to generate code cover report | |
run: cd /home/runner/work/niovad/niovad/code_cov && | |
export PATH=$PATH:/home/runner/work/go/go/bin && | |
echo "***** Code Coverage Report *****" && | |
go tool covdata percent -i=./ && | |
echo "***** End *****" | |
- name: Prepare artifact filename | |
id: prepare_artifact_filename | |
run: | | |
echo ::set-output name=ARTIFACT_NAME::test-recipe-report_${{ github.event.pull_request.head.sha }}_${{ github.run_attempt }} | |
if: failure() | |
- name: Archive the test results | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ steps.prepare_artifact_filename.outputs.ARTIFACT_NAME }} | |
path: /home/runner/work/niovad/niovad/holon_log | |
if: failure() |