Skip to content

Commit

Permalink
Merge branch 'mainnet' into feat/compile-tests
Browse files Browse the repository at this point in the history
  • Loading branch information
d0cd committed Dec 20, 2024
2 parents 3152050 + 26ce60d commit 2cf9934
Show file tree
Hide file tree
Showing 147 changed files with 8,867 additions and 623 deletions.
21 changes: 15 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,20 @@ commands:
- run:
name: Install Rust
command: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
rustup install 1.82.0
rustup override set 1.82.0
cargo --version --verbose
rustc --version
# If Rust is not installed on the machine, install it
if ! command -v rustc &> /dev/null; then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
rustup install 1.82.0
rustup override set 1.82.0
cargo --version --verbose
rustc --version
fi
if [ ! -f "Cargo.lock" ]; then
cargo generate-lockfile
fi
cargo install cargo-mtime
install-rust-windows:
Expand All @@ -71,6 +76,7 @@ commands:
if (!(Test-Path "Cargo.lock" -PathType Leaf)) {
cargo generate-lockfile
}
cargo install cargo-mtime
build-and-test:
description: "Build and run tests"
Expand All @@ -79,12 +85,14 @@ commands:
name: Build
no_output_timeout: 30m
command: |
cargo-mtime . ~/.cache/mtimes/project.db
cargo test --no-run --all --locked --profile ci --features only_testnet
- run:
name: Run tests
no_output_timeout: 30m
# The `--verbose` flag is used to check which files are being recompiled. Ideally, this should be none.
command: |
cargo-mtime . ~/.cache/mtimes/project.db
cargo test --all --locked --profile ci --features only_testnet --verbose
install_rust_nightly:
Expand Down Expand Up @@ -144,6 +152,7 @@ jobs:
- cargo-v1-{{ arch }}-{{ checksum "Cargo.toml" }}-{{ checksum "Cargo.lock" }}
- cargo-v1-{{ arch }}-{{ checksum "Cargo.toml" }}
- cargo-v1-{{ arch }}
- install-rust
- run:
name: Update Submodules
command: git submodule update --init --recursive
Expand Down
6 changes: 6 additions & 0 deletions .circleci/leo-example.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Alias the leo command to use the local binary.
# Note: Use a full path for $LEO when running locally.
leo() {
$LEO "$@"
}

(
# Create a new Leo lottery example program.
$LEO example lottery || exit
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
make install DESTDIR=../../kcov-build
cd ../..
rm -rf kcov-master
for file in target/debug/deps/*-*; do if [[ "$file" != *\.* ]]; then mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --exclude-region='@kcov_skip(start):@kcov_skip(end)' --verify "target/cov/$(basename $file)" "$file"; fi done
for file in target/ci/deps/*-*; do if [[ "$file" != *\.* ]]; then mkdir -p "target/cov/$(basename $file)"; ./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --exclude-region='@kcov_skip(start):@kcov_skip(end)' --verify "target/cov/$(basename $file)" "$file"; fi done
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
Expand Down
Loading

0 comments on commit 2cf9934

Please sign in to comment.