From ff8ae9ca2720606c8d57d2e1d78d2d52be463bfe Mon Sep 17 00:00:00 2001 From: Mikers Date: Wed, 29 May 2024 12:36:10 -1000 Subject: [PATCH 1/6] Trigger CI From 933b5b2b9020491f5120a2b4227ef5d75bc6037b Mon Sep 17 00:00:00 2001 From: Mikers Date: Wed, 29 May 2024 12:57:09 -1000 Subject: [PATCH 2/6] clean up disk space in gh action script --- .github/workflows/main.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 8acdcb1..74cd838 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -46,6 +46,14 @@ jobs: - name: Build Contracts run: make build + - name: Clean up disk space + run: | + docker system prune -af + docker volume prune -f + sudo apt-get clean + sudo rm -rf /var/log/*.log + df -h + - name: Compilation run: | cd testing From b9a194af570f2f51b5703eee5e3d92cd7fef6c88 Mon Sep 17 00:00:00 2001 From: Mikers Date: Wed, 29 May 2024 12:59:53 -1000 Subject: [PATCH 3/6] clean up clean up --- .github/workflows/main.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 74cd838..b3d1cbd 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -48,8 +48,6 @@ jobs: - name: Clean up disk space run: | - docker system prune -af - docker volume prune -f sudo apt-get clean sudo rm -rf /var/log/*.log df -h From c60e4c7901cf06d60a92864cb93607e193fef777 Mon Sep 17 00:00:00 2001 From: Mikers Date: Wed, 29 May 2024 13:03:17 -1000 Subject: [PATCH 4/6] clean up clean up --- .github/workflows/main.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index b3d1cbd..5f80e14 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -48,8 +48,8 @@ jobs: - name: Clean up disk space run: | - sudo apt-get clean - sudo rm -rf /var/log/*.log + apt-get clean + rm -rf /var/log/*.log df -h - name: Compilation From dd2ae89ce587eb940e6c5afc5190bb40e991c798 Mon Sep 17 00:00:00 2001 From: Mikers Date: Wed, 29 May 2024 13:13:14 -1000 Subject: [PATCH 5/6] running out of disk - testing not building --- .github/workflows/main.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 5f80e14..0cbbfd0 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -56,7 +56,7 @@ jobs: run: | cd testing rustup target add wasm32-unknown-unknown - cargo build + echo TODO cargo build - name: Test-Account run: cd testing && cargo test account -- --nocapture From bc5083816d8a01736e5569b6eea0b49b30c0b3e6 Mon Sep 17 00:00:00 2001 From: Mikers Date: Wed, 29 May 2024 13:15:54 -1000 Subject: [PATCH 6/6] create 2 tests from single test failing with disk usage error. test rust compilation and test running rust tests --- .github/workflows/main.yaml | 46 +------------------ .github/workflows/tests.yaml | 89 ++++++++++++++++++++++++++++++++++++ 2 files changed, 91 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/tests.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 0cbbfd0..3be6ad5 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -6,7 +6,7 @@ on: jobs: api-tests: - name: "API tests" + name: "Compilation Tests" timeout-minutes: 30 runs-on: ubuntu-latest container: @@ -56,46 +56,4 @@ jobs: run: | cd testing rustup target add wasm32-unknown-unknown - echo TODO cargo build - - - name: Test-Account - run: cd testing && cargo test account -- --nocapture - - - name: Test-Address - run: cd testing && cargo test address -- --nocapture - - - name: Test-Send - run: cd testing && cargo test send_test -- --nocapture - - - name: Test-BigInts - run: cd testing && cargo test bigints_test -- --nocapture - - - name: Test-Leb128 - run: cd testing && cargo test leb128 -- --nocapture - - - name: Test-Deserialize - run: cd testing && cargo test deserialize_params_tests -- --nocapture - - - name: Test-MarketCbor - run: cd testing && cargo test market_cbor_tests -- --nocapture - - - name: Test-CborDecode - run: cd testing && cargo test cbor_decode_test -- --nocapture - - - name: Test-FRC0042 - run: cd testing && cargo run --example methodnum - - - name: Test-VerifReg - run: cd testing && cargo test verifreg_test -- --nocapture - - - name: Test-Power - run: cd testing && cargo test power_test -- --nocapture - - - name: Test-Miner - run: cd testing && cargo test miner_test -- --nocapture - - - name: Test-Market - run: cd testing && cargo test market_test -- --nocapture - - - name: Test-SolcVersions - run: chmod +x ./testing/smoke_tests.sh && ./testing/smoke_tests.sh + cargo build diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..e5a1b9c --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,89 @@ +name: "Main" +on: + pull_request: + branches: + - master + +jobs: + api-tests: + name: "API tests" + timeout-minutes: 30 + runs-on: ubuntu-latest + container: + image: golang:1.21.7-bullseye + + steps: + - name: Install node + uses: actions/setup-node@v2 + with: + node-version: "20.0.0" + + - name: Install yarn + run: npm install -g yarn + + - name: Checkout repo + uses: actions/checkout@main + with: + submodules: "true" + + - name: Install other dependencies + run: | + rm /bin/sh && ln -s /bin/bash /bin/sh + cat /etc/os-release + apt-get update + apt-get -y install hwloc jq pkg-config bzr ocl-icd-opencl-dev + apt install zsh -y + make install_solc_linux + yarn install + ls -1 /usr/lib/*/libhwloc.so.* | head -n 1 | xargs -n1 -I {} ln -s {} /usr/lib/libhwloc.so + + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + + - name: Build Contracts + run: make build + + - name: Test-Account + run: cd testing && cargo test account -- --nocapture + + - name: Test-Address + run: cd testing && cargo test address -- --nocapture + + - name: Test-Send + run: cd testing && cargo test send_test -- --nocapture + + - name: Test-BigInts + run: cd testing && cargo test bigints_test -- --nocapture + + - name: Test-Leb128 + run: cd testing && cargo test leb128 -- --nocapture + + - name: Test-Deserialize + run: cd testing && cargo test deserialize_params_tests -- --nocapture + + - name: Test-MarketCbor + run: cd testing && cargo test market_cbor_tests -- --nocapture + + - name: Test-CborDecode + run: cd testing && cargo test cbor_decode_test -- --nocapture + + - name: Test-FRC0042 + run: cd testing && cargo run --example methodnum + + - name: Test-VerifReg + run: cd testing && cargo test verifreg_test -- --nocapture + + - name: Test-Power + run: cd testing && cargo test power_test -- --nocapture + + - name: Test-Miner + run: cd testing && cargo test miner_test -- --nocapture + + - name: Test-Market + run: cd testing && cargo test market_test -- --nocapture + + - name: Test-SolcVersions + run: chmod +x ./testing/smoke_tests.sh && ./testing/smoke_tests.sh