[core] clang-format almost all first-party code #1725
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
# Subzero regression test for transaction signing | |
name: "SignTx Regression Test" | |
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: | |
name: "SignTx Test" | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -euxo pipefail {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [3.9] | |
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: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Display Python version | |
run: | | |
python -c "import sys; print(sys.version)" | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Install dependencies | |
run: scripts/ubuntu_install_protobuf.sh | |
# Build Java targets | |
- name: Build Java | |
run: | | |
cd ${{ github.workspace }}/java | |
./gradlew clean build --info | |
# Build CORE with ASAN and UBSAN | |
- name: Build Subzero Core (ASAN+UBSAN) | |
run: scripts/build_core.sh -DENABLE_ASAN=ON -DENABLE_UBSAN=ON | |
- name: Run Subzero CORE (ASAN+UBSAN) | |
run: | | |
cd ${{ github.workspace }} | |
./core/build/subzero-testnet & | |
- name: Run SignTx Test (ASAN+UBSAN) | |
run: | | |
cd ${{ github.workspace }} | |
sleep 10 | |
rm -f /tmp/signtx-test-asan-ubsan.out | |
java -jar ./java/gui/build/libs/gui-1.0.0-SNAPSHOT-shaded.jar --signtx-test |\ | |
tee /tmp/signtx-test-asan-ubsan.out | |
grep -qv "ALL TESTS PASSED" /tmp/signtx-test-asan-ubsan.out || exit 1 | |
- name: Kill Subzero CORE (ASAN+UBSAN) | |
run: killall -9 subzero-testnet | |
- name: Setup Clang (for MSAN) | |
uses: egor-tensin/[email protected] | |
with: | |
version: latest | |
platform: x64 | |
# Build CORE with MSAN. Note that MSAN only works with Clang compiler. | |
- name: Build Subzero Core (MSAN) | |
run: | | |
export CC=`which clang` | |
export CXX=`which clang++` | |
cd ${{ github.workspace }} | |
rm -rf core/build | |
scripts/build_core.sh -DENABLE_MSAN=ON | |
- name: Run Subzero CORE (MSAN) | |
run: | | |
cd ${{ github.workspace }} | |
./core/build/subzero-testnet & | |
- name: Run SignTx Test (MSAN) | |
run: | | |
sleep 10 | |
cd ${{ github.workspace }} | |
rm -f /tmp/signtx-test-msan.out | |
java -jar ./java/gui/build/libs/gui-1.0.0-SNAPSHOT-shaded.jar --signtx-test |\ | |
tee /tmp/signtx-test-msan.out | |
grep -qv "ALL TESTS PASSED" /tmp/signtx-test-msan.out || exit 1 |