mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-24 16:08:55 +03:00
Merge pull request #1945 from AleoHQ/update-ci
prepare for testnet3 as repo branch
This commit is contained in:
commit
afd3fa3dc5
@ -1,8 +0,0 @@
|
||||
# leo add (w/o login) & remove
|
||||
|
||||
$LEO new my-app && cd my-app || exit 1
|
||||
$LEO add justice-league/u8u32
|
||||
echo "import u8u32.u8_u32; function main() {}" > src/main.leo
|
||||
$LEO build
|
||||
$LEO remove u8u32
|
||||
$LEO clean
|
@ -1,16 +0,0 @@
|
||||
# leo new hello-world
|
||||
|
||||
cd ./project/examples/pedersen-hash
|
||||
|
||||
export PEDERSEN_HASH_CONSTRAINTS=1539;
|
||||
|
||||
# line that we're searching for is:
|
||||
# `Build Number of constraints - 1539`
|
||||
export ACTUAL_CONSTRAINTS=$($LEO build | grep constraints | awk '{print $NF}')
|
||||
|
||||
# if else expression with only else block
|
||||
[[ PEDERSEN_HASH_CONSTRAINTS -eq ACTUAL_CONSTRAINTS ]] || {
|
||||
echo >&2 "Number of constraints for Pedersen Hash is not $PEDERSEN_HASH_CONSTRAINTS";
|
||||
echo >&2 "Real number of constraints is $ACTUAL_CONSTRAINTS";
|
||||
exit 1;
|
||||
}
|
@ -3,7 +3,7 @@
|
||||
$LEO new hello-world
|
||||
ls -la
|
||||
cd hello-world && ls -la
|
||||
$LEO run
|
||||
$LEO build
|
||||
|
||||
# Assert that the 'outputs' folder is not empty
|
||||
|
||||
@ -24,11 +24,20 @@ cd ..
|
||||
|
||||
# Assert that the 'outputs' folder is empty
|
||||
|
||||
cd outputs || exit 1
|
||||
if [ "$(ls -A $DIR)" ]; then
|
||||
echo "$DIR is not empty"
|
||||
if [ "$(ls -A outputs)" ]; then
|
||||
echo "outputs is not empty"
|
||||
exit 1
|
||||
else
|
||||
echo "$DIR is empty"
|
||||
echo "outputs is empty"
|
||||
fi
|
||||
|
||||
# Assert that the 'build' folder is empty
|
||||
|
||||
if [ "$(ls -A build)" ]; then
|
||||
echo "build is not empty"
|
||||
exit 1
|
||||
else
|
||||
echo "build is empty"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -1,18 +0,0 @@
|
||||
# leo clone
|
||||
|
||||
# Clone the test-app package.
|
||||
export PACKAGE="$ALEO_PM_USERNAME/test-app"
|
||||
$LEO clone $PACKAGE
|
||||
|
||||
# Assert that the 'test-app' folder is not empty
|
||||
|
||||
cd test-app || exit 1
|
||||
if [ "$(ls -A $DIR)" ]; then
|
||||
echo "$DIR is not empty"
|
||||
else
|
||||
echo "$DIR is empty"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
ls -la
|
||||
$LEO run
|
@ -1,5 +0,0 @@
|
||||
mkdir hello-world
|
||||
cd hello-world
|
||||
$LEO init || exit 1
|
||||
ls -la hello-world
|
||||
$LEO run
|
@ -1,15 +0,0 @@
|
||||
# leo login & logout
|
||||
|
||||
$LEO login -u "$ALEO_PM_USERNAME" -p "$ALEO_PM_PASSWORD"
|
||||
$LEO new my-app && cd my-app || exit 1
|
||||
|
||||
cat Leo.toml
|
||||
|
||||
# verify that in Leo.toml there's no line with [AUTHOR];
|
||||
# since CI does not allow showing credentials, we won't see it in the file;
|
||||
# so the only way to test is to make sure that there's just no [AUTHOR] there
|
||||
[[ $(cat Leo.toml | grep "\[AUTHOR\]" | wc -l) -eq 0 ]] || exit 1
|
||||
|
||||
$LEO add howard/silly-sudoku
|
||||
$LEO remove silly-sudoku
|
||||
$LEO logout
|
@ -1,9 +1,7 @@
|
||||
$LEO new hello-world
|
||||
# Create a new foo project.
|
||||
$LEO new foo
|
||||
ls -la
|
||||
cd hello-world && ls -la
|
||||
|
||||
# verify that in Leo.toml there's a placeholder for author
|
||||
# because at the time of calling `leo new` user is not logged in
|
||||
[[ $(cat Leo.toml | grep "\[AUTHOR\]" | wc -l) -eq 1 ]] || exit 1
|
||||
cd foo && ls -la
|
||||
|
||||
# Try to compile and run the template project.
|
||||
$LEO run
|
||||
|
@ -1,56 +0,0 @@
|
||||
# leo login, publish and logout
|
||||
|
||||
# Login
|
||||
$LEO login -u "$ALEO_PM_USERNAME" -p "$ALEO_PM_PASSWORD"
|
||||
|
||||
# Clone the test-app package.
|
||||
export PACKAGE="$ALEO_PM_USERNAME/test-app"
|
||||
$LEO clone $PACKAGE
|
||||
cd test-app || exit 1
|
||||
|
||||
# Fetch the current Leo package version number.
|
||||
#
|
||||
# 1. Print out the Leo.toml file.
|
||||
# 2. Search for a line with the word "version".
|
||||
# 3. Isolate that into a single line.
|
||||
# 4. Split the line from the '=' sign and keep the right-hand side.
|
||||
# 5. Remove the quotes around the version number.
|
||||
# 6. Trim any excess whitespace.
|
||||
export CURRENT=$(cat Leo.toml \
|
||||
| grep version \
|
||||
| head -1 \
|
||||
| awk -F= '{ print $2 }' \
|
||||
| sed 's/[",]//g' \
|
||||
| xargs)
|
||||
|
||||
# Increment the current Leo package version number by 1.
|
||||
#
|
||||
# 1. Print out the Leo.toml file.
|
||||
# 2. Search for a line with the word "version".
|
||||
# 3. Isolate that into a single line.
|
||||
# 4. Split the line from the '=' sign and keep the right-hand side.
|
||||
# 5. Remove the quotes around the version number.
|
||||
# 6. Trim any excess whitespace.
|
||||
# 7. Increment the version number by 1 (on the semver patch).
|
||||
#
|
||||
# https://stackoverflow.com/questions/8653126/how-to-increment-version-number-in-a-shell-script
|
||||
export UPDATED=$(cat Leo.toml \
|
||||
| grep version \
|
||||
| head -1 \
|
||||
| awk -F= '{ print $2 }' \
|
||||
| sed 's/[",]//g' \
|
||||
| xargs \
|
||||
| awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}')
|
||||
|
||||
# Write the updated Leo package version number to the Leo.toml file.
|
||||
export TOML=$(cat Leo.toml | sed "s/$CURRENT/$UPDATED/g")
|
||||
echo "$TOML" > Leo.toml
|
||||
|
||||
# Run the package to confirm the manifest remains well-formed.
|
||||
$LEO run
|
||||
|
||||
# Publish the package to Aleo.pm
|
||||
$LEO publish
|
||||
|
||||
# Logout
|
||||
$LEO logout
|
@ -1,7 +0,0 @@
|
||||
# leo setup
|
||||
|
||||
cd ./project/examples/pedersen-hash || exit 1
|
||||
$LEO setup
|
||||
$LEO setup
|
||||
$LEO setup --skip-key-check
|
||||
$LEO clean
|
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@ -3,9 +3,7 @@ on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- staging
|
||||
- trying
|
||||
- testnet3
|
||||
paths-ignore:
|
||||
- 'docs/**'
|
||||
- 'documentation/**'
|
||||
@ -189,7 +187,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: master
|
||||
ref: testnet3
|
||||
|
||||
- name: Install sccache
|
||||
env:
|
||||
|
6
.github/workflows/docs.yml
vendored
6
.github/workflows/docs.yml
vendored
@ -1,8 +1,8 @@
|
||||
name: Master Crates Docs
|
||||
name: Testnet3 Crates Docs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- testnet3
|
||||
|
||||
jobs:
|
||||
build-crates-docs:
|
||||
@ -16,7 +16,7 @@ jobs:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
ref: master
|
||||
ref: testnet3
|
||||
|
||||
- name: Install sccache
|
||||
env:
|
||||
|
@ -6,9 +6,9 @@ Thank you for your interest in contributing to Leo! Below you can find some guid
|
||||
|
||||
Please follow the instructions below when filing pull requests:
|
||||
|
||||
- Ensure that your branch is forked from the current [master](https://github.com/AleoHQ/leo/tree/master) branch.
|
||||
- Ensure that your branch is forked from the current [testnet3](https://github.com/AleoHQ/leo/tree/testnet3) branch.
|
||||
- Fill out the provided markdown template for the feature or proposal. Be sure to link the pull request to any issues by using keywords. Example: "closes #130".
|
||||
- Run `cargo fmt` before you commit; we use the `nightly` version of `rustfmt` to format the code, so you'll need to have the `nightly` toolchain installed on your machine; there's a [git hook](https://git-scm.com/docs/githooks) that ensures proper formatting before any commits can be made, and [`.rustfmt.toml`](https://github.com/AleoHQ/Leo/blob/master/.rustfmt.toml) specifies some of the formatting conventions.
|
||||
- Run `cargo fmt` before you commit; we use the `nightly` version of `rustfmt` to format the code, so you'll need to have the `nightly` toolchain installed on your machine; there's a [git hook](https://git-scm.com/docs/githooks) that ensures proper formatting before any commits can be made, and [`.rustfmt.toml`](https://github.com/AleoHQ/Leo/blob/testnet3/.rustfmt.toml) specifies some of the formatting conventions.
|
||||
- Run `cargo clippy` to ensure that popular correctness and performance pitfalls are avoided.
|
||||
|
||||
## Style
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/AleoHQ/leo/actions"><img src="https://github.com/AleoHQ/leo/workflows/CI/badge.svg"></a>
|
||||
<a href="https://codecov.io/gh/AleoHQ/leo"><img src="https://codecov.io/gh/AleoHQ/leo/branch/master/graph/badge.svg?token=S6MWO60SYL"/></a>
|
||||
<a href="https://codecov.io/gh/AleoHQ/leo"><img src="https://codecov.io/gh/AleoHQ/leo/branch/testnet3/graph/badge.svg?token=S6MWO60SYL"/></a>
|
||||
<a href="https://discord.gg/5v2ynrw2ds"><img src="https://img.shields.io/discord/700454073459015690?logo=discord"/></a>
|
||||
</p>
|
||||
|
||||
|
@ -37,4 +37,4 @@ Error [EPAR0370000]: ~
|
||||
|
||||
What the solution to an unexpected token is depends on what you wanted to achieve.
|
||||
Most likely, you made a typo somewhere.
|
||||
For a more complete overview of valid Leo tokens, consult the [Leo grammar](https://github.com/AleoHQ/leo/blob/master/grammar/README.md).
|
||||
For a more complete overview of valid Leo tokens, consult the [Leo grammar](https://github.com/AleoHQ/leo/blob/testnet3/grammar/README.md).
|
||||
|
Loading…
Reference in New Issue
Block a user