Skip to content

Commit

Permalink
Build and upload contract unit test(s)
Browse files Browse the repository at this point in the history
  • Loading branch information
kj4ezj committed Jan 25, 2023
1 parent 6eb8c8a commit ff9774d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build-contract-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
set -eo pipefail

# print and run a command
function ee()
{
echo "$ $*"
eval "$@"
}

# debug code
ee nodeos --full-version
ee cmake --version

# build
ee mkdir -p contract/tests/build
ee pushd contract/tests
ee pushd build
ee cmake ..
ee make -j "$(nproc)" unit_test

# pack
ee popd
ee 'tar -czf ../../contract-unit-test.tar.gz build/*'
ee popd

echo "Done! - ${0##*/}"
9 changes: 9 additions & 0 deletions .github/workflows/contract.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,12 @@ jobs:

- name: Install Leap
run: sudo apt-get install -y ./leap*.deb

- name: Build TrustEVM Contract Tests
run: .github/workflows/build-contract-test.sh

- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: contract-test.tar.gz
path: contract-test.tar.gz

0 comments on commit ff9774d

Please sign in to comment.