Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

commit-test #1822

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
ed66777
commit-test
gpmayorga Apr 29, 2024
b9db4ab
try with the home directory full
gpmayorga Apr 29, 2024
61b25cd
testing
gpmayorga Apr 29, 2024
db54afc
supress cargo output
gpmayorga Apr 29, 2024
228039f
keep checking submodules
gpmayorga Apr 29, 2024
f1f9bfe
typo
gpmayorga Apr 29, 2024
22c72c8
typo 2
gpmayorga Apr 29, 2024
e32fc09
remove echo
gpmayorga Apr 29, 2024
9098de5
typo "s"
gpmayorga Apr 29, 2024
94d6bdf
Add ./ to folders in ci run
gpmayorga Apr 29, 2024
357097b
better checks
gpmayorga Apr 29, 2024
3803644
better runtime folder logic
gpmayorga Apr 29, 2024
b508a2d
unbound variable
gpmayorga Apr 29, 2024
6176d37
slow down logs
gpmayorga Apr 29, 2024
47c8b76
remove concurrency, add logs to output
gpmayorga Apr 29, 2024
3a43847
completely removed concurrency
gpmayorga Apr 29, 2024
fd516ae
infinite loop
gpmayorga Apr 29, 2024
e309c9d
output the contents of target dir
gpmayorga Apr 29, 2024
c8cd256
log current dir and files
wischli Apr 29, 2024
068415d
break the loop when cargo finishes
gpmayorga Apr 29, 2024
3407a98
max depth of target output
gpmayorga Apr 29, 2024
7ae3e55
check for release folder
gpmayorga Apr 29, 2024
3775d72
remove the target output verbose
gpmayorga Apr 29, 2024
ce232f0
output cargo logs into a file
gpmayorga Apr 29, 2024
69209fa
log current dir and files also in error msg
wischli Apr 29, 2024
e6c0a4e
remove the idea of output file
gpmayorga Apr 29, 2024
34e972f
try to get rust logs working
wischli Apr 29, 2024
c45f2c5
fix: error logs
wischli Apr 29, 2024
c57353a
disable verbose cargo test logs
wischli Apr 29, 2024
40b02d1
fix: typo
wischli Apr 29, 2024
55bfdae
add rust cwd
wischli Apr 29, 2024
995f5d0
fix cwd for submodules dir
wischli Apr 29, 2024
a85596c
debug submodules dir
wischli Apr 29, 2024
63872d4
distinguish between error and not error
wischli Apr 30, 2024
8d38919
more lightweight error
wischli Apr 30, 2024
88cbc5f
debug cwd in evm.rs
wischli Apr 30, 2024
4509721
add tmp build step
wischli Apr 30, 2024
944787f
fix verbose logging
wischli Apr 30, 2024
efd335a
add foundry
wischli Apr 30, 2024
c855080
add more printlns
wischli Apr 30, 2024
a725bed
reduce noise strict
wischli Apr 30, 2024
5d4acff
revert debug changes
wischli Apr 30, 2024
e0265bf
docs: improve LP_SOL_SOURCES error msg and rustdocs
wischli Apr 30, 2024
bf6e0b2
fmt: taplo
wischli Apr 30, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 31 additions & 42 deletions .github/workflows/sanity-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,19 @@ concurrency:
group: 'tests-${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
permissions:
id-token: write
contents: read
id-token: write
contents: read
jobs:
test-n-lint:
name: ${{ matrix.target }}
runs-on: ubuntu-latest-8-cores
strategy:
matrix:
target: [test-integration]
# target: [test-general, test-integration,
# lint-fmt, lint-clippy, cargo-build, docs-build, lint-taplo]
target: [ test-general, test-integration,
lint-fmt, lint-clippy, cargo-build, docs-build, lint-taplo ]
steps:
- name: Check out code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #3.5.2
with:
submodules: 'recursive'
- name: Check submodule checkout status
id: check-submodule
run: |
if [ -d "runtime/integrations/tests/submodules/liquidity-pools" ]; then
echo "Submodule is checked out."
echo "ls -la runtime/integrations/tests/submodules/liquidity-pools"
echo "::set-output name=submodule_checked::true"
else
echo "Submodule is not checked out."
echo "::set-output name=submodule_checked::false"
exit 1
fi

- name: Prep build
uses: ./.github/actions/prep-ubuntu
Expand All @@ -41,34 +26,38 @@ jobs:
# Cache needs Google credentials:
GWIP: ${{ secrets.GWIP_SCCACHE }}
GSA: ${{ secrets.GSA_SCCACHE }}
submodules: 'recursive'

- name: Runing cargo ${{ matrix.target }}
run: ./ci/run-check.sh
env:
TARGET: ${{ matrix.target }}
# RUSTC_WRAPPER: "sccache"
# SCCACHE_RECACHE: true
RUSTC_WRAPPER: "sccache"

benchmark-check:
name: bench-check-${{ matrix.runtime }}
runs-on: ubuntu-latest #-4-cores
strategy:
matrix:
runtime: [ altair, centrifuge ]
steps:
- name: Check out code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #3.5.2

# benchmark-check:
# name: bench-check-${{ matrix.runtime }}
# runs-on: ubuntu-latest #-4-cores
# strategy:
# matrix:
# runtime: [altair, centrifuge]
# steps:
# - name: Check out code
# uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #3.5.2
- name: Prep build
uses: ./.github/actions/prep-ubuntu
with:
cache: enabled
GWIP: ${{ secrets.GWIP_SCCACHE }}
GSA: ${{ secrets.GSA_SCCACHE }}

# - name: Prep build
# uses: ./.github/actions/prep-ubuntu
# with:
# cache: enabled
# GWIP: ${{ secrets.GWIP_SCCACHE }}
# GSA: ${{ secrets.GSA_SCCACHE }}
# Required for integration tests evm interaction
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1

# - name: Runing cargo ${{ matrix.target }}
# run: ./ci/run-check.sh
# env:
# TARGET: benchmark-check
# RUNTIME: ${{ matrix.runtime }}
# RUSTC_WRAPPER: "sccache"
- name: Runing cargo ${{ matrix.target }}
run: ./ci/run-check.sh
env:
TARGET: benchmark-check
RUNTIME: ${{ matrix.runtime }}
RUSTC_WRAPPER: "sccache"
29 changes: 8 additions & 21 deletions ci/run-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,16 @@ rustup --version
cargo --version

case $TARGET in
cargo-build)
SCCACHE_RECACHE=true cargo build -p centrifuge-chain --release "$@"
;;
#
# test-general)
# cargo test --workspace --release --features runtime-benchmarks,try-runtime --exclude runtime-integration-tests
# ;;
cargo-build)
cargo build -p centrifuge-chain --release "$@"
;;

test-general)
cargo test --workspace --release --features runtime-benchmarks,try-runtime --exclude runtime-integration-tests
;;

test-integration)
cargo test --release --package runtime-integration-tests --features fast-runtime &
CARGO_PID=$!
while true; do
if [ -d "target/debug/" ]; then
ls -la target/debug/build/runtime-integration*/out/
ls -la target/debug/deps/runtime_integration*/out/
break
else
echo "Folder not found"
sleep 3
fi
done
wait $CARGO_PID
echo "Cargo test command has finished"
cargo test --release --package runtime-integration-tests
;;

lint-fmt)
Expand Down
4 changes: 2 additions & 2 deletions runtime/integration-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ staging-xcm-executor = { workspace = true, features = ["std"] }

orml-traits = { workspace = true, features = ["std"] }

fp-evm = { workspace = true, features = ["std"] }
fp-self-contained = { workspace = true, features = ["std"] }
fp-evm = { workspace = true, features = ["std"]}

# Locals
altair-runtime = { workspace = true, features = ["std"] }
Expand Down Expand Up @@ -144,10 +144,10 @@ pallet-session = { workspace = true, features = ["std"] }
pallet-sudo = { workspace = true, features = ["std"] }
pallet-swaps = { workspace = true, features = ["std"] }
pallet-timestamp = { workspace = true, features = ["std"] }
pallet-token-mux = { workspace = true, features = ["std"] }
pallet-transaction-payment = { workspace = true, features = ["std"] }
pallet-transfer-allowlist = { workspace = true, features = ["std"] }
pallet-treasury = { workspace = true, features = ["std"] }
pallet-token-mux = { workspace = true, features = ["std"] }
pallet-uniques = { workspace = true, features = ["std"] }
pallet-utility = { workspace = true, features = ["std"] }
pallet-vesting = { workspace = true, features = ["std"] }
Expand Down
4 changes: 2 additions & 2 deletions runtime/integration-tests/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fn main() {

/*
match Command::new("git")
.args(&["fetch", "--all", "--recurse-submodules=yes"])
.args(&["pull", "--all", "--recurse-submodules=yes"])
.output()
{
Ok(o) if o.status.success() => {}
Expand Down Expand Up @@ -107,7 +107,7 @@ fn main() {
);
}
Err(err) => {
println!("cargo:warning=Failed to execute git command: {}", err);
eprintln!("cargo:warning=Failed to execute git command: {}", err);
}
}
}
Expand Down
8 changes: 6 additions & 2 deletions runtime/integration-tests/src/generic/utils/evm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,12 @@ use sp_runtime::traits::Get;
use crate::generic::{config::Runtime, utils::ESSENTIAL};

/// Liquidity-Pool solidity artifacts generated by build-script.
/// All needed contracts can be loaded from here
pub const LP_SOL_SOURCES: &str = env!("LP_SOL_SOURCES", "Build script failed to populate environment variable LP_SOL_SOURCES pointing to solidity source files.");
/// All needed contracts can be loaded from here.
///
/// This panics if the solidity contracts were not built properly. This can
/// happen if the submodule was not pulled or the forge cli has not been
/// installed locally.
pub const LP_SOL_SOURCES: &str = env!("LP_SOL_SOURCES", "Build script failed to populate environment variable LP_SOL_SOURCES pointing to missing solidity source files in the 'target/*/build/integration-tests*/out' directory required for EVM integration tests.\n\nPlease check if you have pulled the 'liquidity-pools' submodule via `git pull --recurse-submodules` and if you have installed the forge cli, e.g. check `forge -V`.");

#[derive(Clone, Debug, PartialEq)]
pub struct DeployedContractInfo {
Expand Down
Loading