This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
Update index.md #854
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
name: "Build contracts" | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build-mock: | |
name: "Build Mock API" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install dependencies | |
run: | | |
yarn install | |
make install_solc_linux | |
- name: Compile contract files | |
run: make build_mock_api | |
simplecoin-checks: | |
name: "SimpleCoin: end-to-end tests" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install dependencies | |
run: cd hardhat && yarn install | |
- name: Deploy contract | |
run: | | |
make deploy_simple_coin > deploy.log | |
cat deploy.log | |
env: | |
PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }} | |
- name: Test contract | |
run: | | |
WALLET_ADDRESS=$(awk '/Wallet Ethereum Address:/{print $NF}' deploy.log) | |
CONTRACT_ADDRESS=$(sed -nr 's/.*deployed at ([^ ]+).*/\1/p' deploy.log) | |
echo $WALLET_ADDRESS | |
echo $CONTRACT_ADDRESS | |
cd hardhat && yarn hardhat get-balance --contract $CONTRACT_ADDRESS --account $WALLET_ADDRESS | |
env: | |
PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }} | |
api-deploy: | |
name: "Filecoin APIs: deploy" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install dependencies | |
run: | | |
yarn install | |
cd hardhat && yarn install | |
- name: Deploy contracts | |
run: | | |
make deploy_miner_api > deploy_miner.log | |
make deploy_market_api > deploy_market.log | |
make deploy_verifreg_api > deploy_verifreg.log | |
make deploy_power_api > deploy_power.log | |
cat deploy_miner.log | |
cat deploy_market.log | |
cat deploy_verifreg.log | |
cat deploy_power.log | |
env: | |
PRIVATE_KEY: ${{ secrets.WALLET_PRIVATE_KEY }} | |
miner-integration: | |
name: "Miner API: integration tests" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Instal deps | |
run: make install-opencl | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install dependencies | |
run: | | |
yarn install | |
make install_solc_linux | |
- name: Restore crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore previous compilation | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/target | |
key: ${{ runner.os }}-testing-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore builtin-actors | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/builtin-actors/target | |
key: ${{ runner.os }}-actors-${{ hashFiles('./testing/builtin-actors/Cargo.lock') }} | |
- name: Build builtin-actors | |
run: make build_builtin_actors | |
- name: Build contracts | |
run: make | |
- name: Run tests on miner | |
run: | | |
cd testing | |
rustup target add wasm32-unknown-unknown | |
cargo test miner_test | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: gas_results_miner.csv | |
path: testing/gas_results_miner.csv | |
market-integration: | |
name: "Market API: integration tests" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Instal deps | |
run: make install-opencl | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install dependencies | |
run: | | |
yarn install | |
make install_solc_linux | |
- name: Restore crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore previous compilation | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/target | |
key: ${{ runner.os }}-testing-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore builtin-actors | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/builtin-actors/target | |
key: ${{ runner.os }}-actors-${{ hashFiles('./testing/builtin-actors/Cargo.lock') }} | |
- name: Build builtin-actors | |
run: make build_builtin_actors | |
- name: Build contracts | |
run: make | |
- name: Run tests on market | |
run: | | |
cd testing | |
rustup target add wasm32-unknown-unknown | |
cargo test market_test | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: gas_results_market.csv | |
path: testing/gas_results_market.csv | |
power-integration: | |
name: "Power API: integration tests" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Instal deps | |
run: make install-opencl | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install dependencies | |
run: | | |
yarn install | |
make install_solc_linux | |
- name: Restore crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore previous compilation | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/target | |
key: ${{ runner.os }}-testing-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore builtin-actors | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/builtin-actors/target | |
key: ${{ runner.os }}-actors-${{ hashFiles('./testing/builtin-actors/Cargo.lock') }} | |
- name: Build builtin-actors | |
run: make build_builtin_actors | |
- name: Build contracts | |
run: make | |
- name: Run tests on power | |
run: | | |
cd testing | |
rustup target add wasm32-unknown-unknown | |
cargo test power_test | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: gas_results_power.csv | |
path: testing/gas_results_power.csv | |
verifreg-integration: | |
name: "VerifReg API: integration tests" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Instal deps | |
run: make install-opencl | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install dependencies | |
run: | | |
yarn install | |
make install_solc_linux | |
- name: Restore crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore previous compilation | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/target | |
key: ${{ runner.os }}-testing-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore builtin-actors | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/builtin-actors/target | |
key: ${{ runner.os }}-actors-${{ hashFiles('./testing/builtin-actors/Cargo.lock') }} | |
- name: Build builtin-actors | |
run: make build_builtin_actors | |
- name: Build contracts | |
run: make | |
- name: Run tests on verifreg | |
run: | | |
cd testing | |
rustup target add wasm32-unknown-unknown | |
cargo test verifreg_test | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: gas_results_verifreg.csv | |
path: testing/gas_results_verifreg.csv | |
datacap-integration: | |
name: "DataCap API: integration tests" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Instal deps | |
run: make install-opencl | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install dependencies | |
run: | | |
yarn install | |
make install_solc_linux | |
- name: Restore crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore previous compilation | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/target | |
key: ${{ runner.os }}-testing-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore builtin-actors | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/builtin-actors/target | |
key: ${{ runner.os }}-actors-${{ hashFiles('./testing/builtin-actors/Cargo.lock') }} | |
- name: Build builtin-actors | |
run: make build_builtin_actors | |
- name: Build contracts | |
run: make | |
- name: Run tests on datacap | |
run: | | |
cd testing | |
rustup target add wasm32-unknown-unknown | |
cargo test datacap_test | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: gas_results_datacap.csv | |
path: testing/gas_results_datacap.csv | |
account-integration: | |
name: "Account API: integration tests" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Instal deps | |
run: make install-opencl | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install dependencies | |
run: | | |
yarn install | |
make install_solc_linux | |
- name: Restore crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore previous compilation | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/target | |
key: ${{ runner.os }}-testing-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore builtin-actors | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/builtin-actors/target | |
key: ${{ runner.os }}-actors-${{ hashFiles('./testing/builtin-actors/Cargo.lock') }} | |
- name: Build builtin-actors | |
run: make build_builtin_actors | |
- name: Build contracts | |
run: make | |
- name: Run tests on account | |
run: | | |
cd testing | |
rustup target add wasm32-unknown-unknown | |
cargo test account_test | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: gas_results_account.csv | |
path: testing/gas_results_account.csv | |
precompiles-integration: | |
name: "Precompiles API: integration tests" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Instal deps | |
run: make install-opencl | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install dependencies | |
run: | | |
yarn install | |
make install_solc_linux | |
- name: Restore crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore previous compilation | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/target | |
key: ${{ runner.os }}-testing-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore builtin-actors | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/builtin-actors/target | |
key: ${{ runner.os }}-actors-${{ hashFiles('./testing/builtin-actors/Cargo.lock') }} | |
- name: Build builtin-actors | |
run: make build_builtin_actors | |
- name: Build contracts | |
run: make | |
- name: Run tests on precompiles | |
run: | | |
cd testing | |
rustup target add wasm32-unknown-unknown | |
cargo test precompiles_test | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: gas_results_precompiles.csv | |
path: testing/gas_results_precompiles.csv | |
send-integration: | |
name: "Send API: integration tests" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Instal deps | |
run: make install-opencl | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install dependencies | |
run: | | |
yarn install | |
make install_solc_linux | |
- name: Restore crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore previous compilation | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/target | |
key: ${{ runner.os }}-testing-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore builtin-actors | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/builtin-actors/target | |
key: ${{ runner.os }}-actors-${{ hashFiles('./testing/builtin-actors/Cargo.lock') }} | |
- name: Build builtin-actors | |
run: make build_builtin_actors | |
- name: Build contracts | |
run: make | |
- name: Run tests on send | |
run: | | |
cd testing | |
rustup target add wasm32-unknown-unknown | |
cargo test send_test | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: gas_results_send.csv | |
path: testing/gas_results_send.csv | |
frc0042-check: | |
name: "Check FRC0042 method number" | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'false' | |
- name: Instal deps | |
run: make install-opencl | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Check FRC0042 using rust script | |
run: make test_frc0042 | |
cbor-decode-integration: | |
name: "CBOR Decode Tests" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Instal deps | |
run: make install-opencl | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install dependencies | |
run: | | |
yarn install | |
make install_solc_linux | |
- name: Restore crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore previous compilation | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/target | |
key: ${{ runner.os }}-testing-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore builtin-actors | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/builtin-actors/target | |
key: ${{ runner.os }}-actors-${{ hashFiles('./testing/builtin-actors/Cargo.lock') }} | |
- name: Build builtin-actors | |
run: make build_builtin_actors | |
- name: Build contracts | |
run: make | |
- name: Run tests on cbor decode lib | |
run: | | |
cd testing | |
rustup target add wasm32-unknown-unknown | |
cargo test cbor_decode_test | |
bigints-integration: | |
name: "BigInt Tests" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Instal deps | |
run: make install-opencl | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install dependencies | |
run: | | |
yarn install | |
make install_solc_linux | |
- name: Restore crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore previous compilation | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/target | |
key: ${{ runner.os }}-testing-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore builtin-actors | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/builtin-actors/target | |
key: ${{ runner.os }}-actors-${{ hashFiles('./testing/builtin-actors/Cargo.lock') }} | |
- name: Build builtin-actors | |
run: make build_builtin_actors | |
- name: Build contracts | |
run: make | |
- name: Run tests on bigints lib | |
run: | | |
cd testing | |
rustup target add wasm32-unknown-unknown | |
cargo test bigints_test | |
leb128-test: | |
name: "Leb128 Tests" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Instal deps | |
run: make install-opencl | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install dependencies | |
run: | | |
yarn install | |
make install_solc_linux | |
- name: Restore crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore previous compilation | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/target | |
key: ${{ runner.os }}-testing-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore builtin-actors | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/builtin-actors/target | |
key: ${{ runner.os }}-actors-${{ hashFiles('./testing/builtin-actors/Cargo.lock') }} | |
- name: Build builtin-actors | |
run: make build_builtin_actors | |
- name: Build contracts | |
run: make | |
- name: Run tests for leb128 | |
run: | | |
cd testing | |
rustup target add wasm32-unknown-unknown | |
cargo test leb128_test | |
address-test: | |
name: "Address Tests" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Instal deps | |
run: make install-opencl | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install dependencies | |
run: | | |
yarn install | |
make install_solc_linux | |
- name: Restore crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore previous compilation | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/target | |
key: ${{ runner.os }}-testing-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore builtin-actors | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/builtin-actors/target | |
key: ${{ runner.os }}-actors-${{ hashFiles('./testing/builtin-actors/Cargo.lock') }} | |
- name: Build builtin-actors | |
run: make build_builtin_actors | |
- name: Build contracts | |
run: make | |
- name: Run tests for address | |
run: | | |
cd testing | |
rustup target add wasm32-unknown-unknown | |
cargo test address | |
deserialize-test: | |
name: "Deserialize Params Tests" | |
timeout-minutes: 30 | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
- name: Instal deps | |
run: make install-opencl | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '16.16.0' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Install latest stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Install dependencies | |
run: | | |
yarn install | |
make install_solc_linux | |
- name: Restore crates | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore previous compilation | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/target | |
key: ${{ runner.os }}-testing-${{ hashFiles('./testing/Cargo.lock') }} | |
- name: Restore builtin-actors | |
uses: actions/cache@v3 | |
with: | |
path: | | |
./testing/builtin-actors/target | |
key: ${{ runner.os }}-actors-${{ hashFiles('./testing/builtin-actors/Cargo.lock') }} | |
- name: Build builtin-actors | |
run: make build_builtin_actors | |
- name: Build contracts | |
run: make | |
- name: Run tests for deserialize params | |
run: | | |
cd testing | |
rustup target add wasm32-unknown-unknown | |
cargo test deserialize_params_tests | |
comment-result: | |
name: "Comment the result on PR" | |
runs-on: ubuntu-22.04 | |
if: github.event_name == 'pull_request' | |
needs: [account-integration, datacap-integration, market-integration, miner-integration, power-integration, precompiles-integration, send-integration, verifreg-integration] | |
steps: | |
- name: "Get gas_results_account.csv" | |
uses: actions/download-artifact@v3 | |
with: | |
name: gas_results_account.csv | |
- name: "Get gas_results_datacap.csv" | |
uses: actions/download-artifact@v3 | |
with: | |
name: gas_results_datacap.csv | |
- name: "Get gas_results_miner.csv" | |
uses: actions/download-artifact@v3 | |
with: | |
name: gas_results_miner.csv | |
- name: "Get gas_results_market.csv" | |
uses: actions/download-artifact@v3 | |
with: | |
name: gas_results_market.csv | |
- name: "Get gas_results_power.csv" | |
uses: actions/download-artifact@v3 | |
with: | |
name: gas_results_power.csv | |
- name: "Get gas_results_precompiles.csv" | |
uses: actions/download-artifact@v3 | |
with: | |
name: gas_results_precompiles.csv | |
- name: "Get gas_results_send.csv" | |
uses: actions/download-artifact@v3 | |
with: | |
name: gas_results_send.csv | |
- name: "Get gas_results_verifreg.csv" | |
uses: actions/download-artifact@v3 | |
with: | |
name: gas_results_verifreg.csv | |
- name: "Comment results" | |
env: | |
URL: ${{ github.event.pull_request.comments_url }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
pip install csv2md | |
MKD=$(( echo "## Account actor"; csv2md gas_results_account.csv; echo "## Miner actor"; csv2md gas_results_miner.csv; echo "## Datacap actor"; csv2md gas_results_datacap.csv; echo "## Market actor"; csv2md gas_results_market.csv; echo "## Power actor"; csv2md gas_results_power.csv; echo "## Precompiles actor"; csv2md gas_results_precompiles.csv; echo "## Send actor"; csv2md gas_results_send.csv; echo "## Verifreg actor"; csv2md gas_results_verifreg.csv ) | cat) | |
BODY=$(jq --null-input --arg body "# Gas results 🚀📝 | |
${MKD}" '{"body": $body}') | |
curl \ | |
-X POST \ | |
$URL \ | |
-H "Content-Type: application/json" \ | |
-H "Authorization: token $GITHUB_TOKEN" \ | |
--data "$BODY" |