Wextra fixes #1388
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_bulk_recovery_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 | |
- name: Install golang 1.18.3 | |
run: sudo rm -rf /usr/bin/go && | |
sudo wget https://golang.org/dl/go1.18.3.linux-amd64.tar.gz && | |
sudo mkdir /home/runner/work/go && | |
sudo tar -C /home/runner/work/go -xzf go1.18.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 | |
- 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-asan --enable-devel && | |
make clean && make && make install | |
env: | |
LD_LIBRARY_PATH: /home/runner/work/niovad/niovad/build_dir/lib | |
- name: Copy script to run recipes | |
run: cp ./code/scripts/run-recipes.sh /home/runner/work/niovad/niovad/build_dir/ && | |
cp ./code/scripts/bulk_recovery_recipes.txt /home/runner/work/niovad/niovad/build_dir/ | |
- 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 ssh key | |
run: > | |
ssh-keygen -t rsa -b 4096 -N '' -f ~/.ssh/id_rsa | |
- name: Add key to auth file | |
run: > | |
cat ~/.ssh/id_rsa.pub | tee -a ~/.ssh/authorized_keys | |
- name: Allow localhost authentication | |
run: > | |
echo "NoHostAuthenticationForLocalhost yes" > ~/.ssh/config | |
- name: Ensure the owner of the key is correct | |
run: | | |
chmod 600 ~/.ssh/authorized_keys | |
chmod 700 ~/.ssh | |
sudo chmod -c 0755 ~/ | |
ls -la ~/.ssh | |
- name: Test SSH connection to localhost | |
run: > | |
ssh -vvv -i ~/.ssh/id_rsa -o BatchMode=yes -o StrictHostKeyChecking=no $(whoami)@localhost | |
- name: run recipes | |
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/bulk_recovery_recipes.txt' | |
'pumicedb' | |
'/home/runner/work/go/go/bin' | |
- 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() |