Skip to content

SignTx Regression Test with UBSAN #534

SignTx Regression Test with UBSAN

SignTx Regression Test with UBSAN #534

# Subzero regression test for transaction signing
name: "SignTx Regression Test with UBSAN"
on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
# Daily at 1am
- cron: '0 1 * * *'
jobs:
signtx-test-ubsan:
name: "SignTx Test with UBSAN"
runs-on: ubuntu-latest
defaults:
run:
shell: bash -euxo pipefail {0}
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
submodules: 'recursive'
- name: Init Hermit
uses: cashapp/activate-hermit@v1
# Build Java targets
- name: Build Java
run: |
cd ${{ github.workspace }}/java
gradle build --info
- name: Install Clang
run: |
sudo apt-get update
sudo apt install clang -y
- name: Install python packages
run: |
cd ${{ github.workspace }}
pip install --upgrade pip
pip install -r ./core/requirements.txt
# Build CORE with UBSAN
- name: Build Subzero Core with UBSAN
run: |
cd ${{ github.workspace }}
export CC=`which clang`
export CXX=`which clang++`
scripts/build_core.sh -DENABLE_UBSAN=ON
- name: Run Subzero CORE with UBSAN
run: |
cd ${{ github.workspace }}
./core/build/subzero-testnet &
- name: Run SignTx Test with UBSAN
run: |
cd ${{ github.workspace }}
sleep 10
rm -f /tmp/signtx-test-ubsan.out
java -jar ./java/gui/build/libs/gui-1.0.0-SNAPSHOT-shaded.jar --signtx-test | tee /tmp/signtx-test-ubsan.out
grep -qv "ALL TESTS PASSED" /tmp/signtx-test-ubsan.out || exit 1