-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Add Main Branch Fn Check CI (#744)
* Feat: Add Main Branch Fn Check CI * add key prepare in workflow * Fix Fn_Check Co-authored-by: Jimmy <[email protected]>
- Loading branch information
1 parent
a4d2794
commit 57d97f0
Showing
6 changed files
with
127 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ Jenkinsfile | |
target | ||
hooks | ||
**/target | ||
checkpoint.toml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: FN_CHECK | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- add-fn-ckeck | ||
pull_request: | ||
branches: | ||
- main | ||
env: | ||
CARGO_TERM_COLOR: always | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
platform: [scalable] | ||
runs-on: ${{ matrix.platform }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
components: rustfmt | ||
- name: Prepare key | ||
shell: bash | ||
run: | | ||
tar -C ~/.ssh -zcf key.tar.gz ./ | ||
- name: Build rust base image | ||
shell: bash | ||
run: | | ||
make ci_build_binary_rust_base | ||
- name: Build debug_env image and Start | ||
shell: bash | ||
run: | | ||
docker build -t findorad:debug_env -f container/Dockerfile-debug-env . | ||
docker run -d --rm --network host --name findorad-debug-env findorad:debug_env | ||
sleep 120 | ||
- name: Run fn_check | ||
shell: bash | ||
run: | | ||
docker exec findorad-debug-env /platform/tools/fn_check.sh | ||
docker rm -f findorad-debug-env |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,8 @@ name: Wasm Building And Pushing | |
on: | ||
push: | ||
branches: | ||
- '**' | ||
- main | ||
- develop | ||
tags: | ||
- '*-release' | ||
|
||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
FROM binary-rust-base | ||
ENV WORK_DIR /platform | ||
ENV WASM_DIR /tmp/wasm-js-bindings | ||
ENV VERGEN_SHA_EXTERN release_build | ||
ENV PATH=$PATH:/root/.cargo/bin/ | ||
|
||
COPY . $WORK_DIR | ||
WORKDIR $WORK_DIR | ||
|
||
RUN apt-get install -y procps | ||
|
||
RUN rustup toolchain install stable && \ | ||
rustup component add clippy --toolchain stable && \ | ||
rustup component add rustfmt | ||
|
||
RUN mkdir -p /root/.cargo/bin/ && make debug_env | ||
|
||
RUN printf "./tools/devnet/startnodes.sh\ntail -f /tmp/findora/devnet/node0/consensus.log" > docker_debug_env.sh | ||
RUN chmod +x docker_debug_env.sh | ||
CMD ["sh","-c","./docker_debug_env.sh"] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
#! /bin/bash | ||
set -e | ||
|
||
echo "Set Faucet Mnemonic" | ||
echo "zoo nerve assault talk depend approve mercy surge bicycle ridge dismiss satoshi boring opera next fat cinnamon valley office actor above spray alcohol giant" > /tmp/Faucet_Mnemonic | ||
fn setup -O /tmp/Faucet_Mnemonic -S http://localhost | ||
|
||
echo "Init network" | ||
stt init | ||
sleep 15 | ||
|
||
echo "1. transfer" | ||
fn transfer -n 1000000 -t WJZKo8_BwLMeSz3h7jYdfjjBZlJiRdhUXkqgUVzReE0= | ||
|
||
echo "2. confidential-amount transfer" | ||
fn transfer -n 1000000 -t WJZKo8_BwLMeSz3h7jYdfjjBZlJiRdhUXkqgUVzReE0= --confidential-amount | ||
|
||
echo "3. confidential-type transfer" | ||
fn transfer -n 1000000 -t WJZKo8_BwLMeSz3h7jYdfjjBZlJiRdhUXkqgUVzReE0= --confidential-type | ||
|
||
echo "4. confidential-amount and confidential-type transfer" | ||
fn transfer -n 1000000 -t WJZKo8_BwLMeSz3h7jYdfjjBZlJiRdhUXkqgUVzReE0= --confidential-amount --confidential-type | ||
|
||
echo "5. transfer-batch" | ||
echo -e "WJZKo8_BwLMeSz3h7jYdfjjBZlJiRdhUXkqgUVzReE0=\nevNR_3Jk8lSMSSHNdkk3d8Lq2peHicpKl0-_Wf2clfo=\nEGrwne7CoB6c3NgydG_CBmQFBL-27Shd6_cZ68ktOR8=" > /tmp/batch_list | ||
fn transfer-batch -n 1000000 -t /tmp/batch_list | ||
|
||
echo "6. Create Asset" | ||
fn asset --create --memo TTT --decimal 6 --code VG9rZW4wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBUVFQ= --transferable | ||
sleep 30 | ||
|
||
echo "7. Issue Asset" | ||
fn asset --issue --code VG9rZW4wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBUVFQ= --amount 8000000 | ||
sleep 30 | ||
|
||
echo "8. Asset transfer" | ||
fn transfer -n 1000000 -t WJZKo8_BwLMeSz3h7jYdfjjBZlJiRdhUXkqgUVzReE0= --asset VG9rZW4wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBUVFQ= | ||
fn transfer -n 1000000 -t WJZKo8_BwLMeSz3h7jYdfjjBZlJiRdhUXkqgUVzReE0= --confidential-amount --asset VG9rZW4wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBUVFQ= | ||
fn transfer -n 1000000 -t WJZKo8_BwLMeSz3h7jYdfjjBZlJiRdhUXkqgUVzReE0= --confidential-type --asset VG9rZW4wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBUVFQ= | ||
fn transfer -n 1000000 -t WJZKo8_BwLMeSz3h7jYdfjjBZlJiRdhUXkqgUVzReE0= --confidential-amount --confidential-type --asset VG9rZW4wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDBUVFQ= | ||
|
||
echo "9. Stake" | ||
fn delegate -n 1000000 --validator 611C922247C3BE7EA13455B191B6EFD909F10196 | ||
sleep 30 | ||
|
||
echo "10. Claim rewards" | ||
fn claim | ||
|
||
echo "11. Unstake" | ||
fn undelegate -n 900000 --validator 611C922247C3BE7EA13455B191B6EFD909F10196 | ||
|
||
echo "12. UTXO to EVM" | ||
fn contract-deposit -a 0xE89441fDD60b473fBaC19F6DBcee7e7D61Bd99e6 -n 1000000 | ||
sleep 30 | ||
|
||
echo "13. EVM to UTXO" | ||
fn contract-withdraw -n 900000 -e "abuse plug bench require oval youth spike country ten pudding power hedgehog" |