Skip to content

Commit

Permalink
ci: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jacderida committed Feb 1, 2025
1 parent e36ca5f commit b047df4
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 25 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/benchmark-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
timeout-minutes: 30

- name: Start a local network
uses: maidsafe/ant-local-testnet-action@main
uses: jacderida/ant-local-testnet-action@chore-enable_logging
env:
ANT_LOG: "all"
with:
Expand All @@ -71,7 +71,9 @@ jobs:

- name: Start a client instance to compare memory usage
shell: bash
run: ./target/release/ant --local file upload "./the-test-data.zip"
run: |
mkdir -p $CLIENT_DATA_PATH/logs
./target/release/ant --local file upload "./the-test-data.zip" 2> $CLIENT_DATA_PATH/logs/ant.log
env:
ANT_LOG: "all"
timeout-minutes: 5
Expand Down
25 changes: 12 additions & 13 deletions .github/workflows/memcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
timeout-minutes: 30

- name: Start a local network
uses: maidsafe/ant-local-testnet-action@main
uses: jacderida/ant-local-testnet-action@chore-enable_logging
with:
action: start
enable-evm-testnet: true
Expand Down Expand Up @@ -70,34 +70,33 @@ jobs:
shell: bash

- name: File upload
run: ./target/release/ant --local file upload --public "./the-test-data.zip" > ./upload_output 2>&1
run: |
mkdir -p "${CLIENT_DATA_PATH}/logs"
./target/release/ant \
--local \
file upload \
--public "./the-test-data.zip" \
> ./upload_output_second \
2> "${CLIENT_DATA_PATH}/logs/ant.log"
env:
ANT_LOG: "v"
timeout-minutes: 15

- name: showing the upload terminal output
run: cat upload_output
run: cat upload_output_second
shell: bash
if: always()

- name: parse address
run: |
UPLOAD_ADDRESS=$(rg "At address: ([0-9a-f]*)" -o -r '$1' ./upload_output)
UPLOAD_ADDRESS=$(rg "At address: ([0-9a-f]*)" -o -r '$1' ./upload_output_second)
echo "UPLOAD_ADDRESS=$UPLOAD_ADDRESS" >> $GITHUB_ENV
shell: bash

# Uploading same file using different client shall not incur any payment neither uploads
# Note rg will throw an error directly in case of failed to find a matching pattern.
- name: Start a different client to upload the same file
run: |
pwd
ls -l $ANT_DATA_PATH
mv $CLIENT_DATA_PATH $ANT_DATA_PATH/client_first
ls -l $ANT_DATA_PATH
ls -l $ANT_DATA_PATH/client_first
ls -l $ANT_DATA_PATH/client_first/logs
mkdir $ANT_DATA_PATH/client
ls -l $ANT_DATA_PATH
./target/release/ant --local file upload --public "./the-test-data.zip" > ./upload_output_second 2>&1
rg 'All chunks already exist on the network.' ./upload_output_second -c --stats
env:
Expand Down Expand Up @@ -180,7 +179,7 @@ jobs:

- name: Stop the local network and upload logs
if: always()
uses: maidsafe/ant-local-testnet-action@main
uses: jacderida/ant-local-testnet-action@chore-enable_logging
with:
action: stop
log_file_prefix: safe_test_logs_memcheck
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ jobs:
timeout-minutes: 30

- name: Start a local network
uses: maidsafe/ant-local-testnet-action@main
uses: jacderida/ant-local-testnet-action@chore-enable_logging
with:
action: start
enable-evm-testnet: true
Expand Down Expand Up @@ -315,8 +315,8 @@ jobs:
[System.IO.File]::WriteAllBytes($fileName, $byteArray)
# Run autonomi commands
./target/release/ant --log-output-dest data-dir --local file upload "random_file_$i.bin" --public
./target/release/ant --log-output-dest data-dir --local file upload "random_file_$i.bin"
./target/release/ant --local file upload "random_file_$i.bin" --public
./target/release/ant --local file upload "random_file_$i.bin"
}
env:
ANT_LOG: "v"
Expand Down Expand Up @@ -558,7 +558,7 @@ jobs:
timeout-minutes: 30

- name: Start a local network
uses: maidsafe/ant-local-testnet-action@main
uses: jacderida/ant-local-testnet-action@chore-enable_logging
with:
action: start
enable-evm-testnet: true
Expand Down Expand Up @@ -705,7 +705,7 @@ jobs:
timeout-minutes: 30

- name: Start a local network
uses: maidsafe/ant-local-testnet-action@main
uses: jacderida/ant-local-testnet-action@chore-enable_logging
with:
action: start
enable-evm-testnet: true
Expand Down Expand Up @@ -1014,7 +1014,7 @@ jobs:
timeout-minutes: 30

- name: Start a local network
uses: maidsafe/ant-local-testnet-action@main
uses: jacderida/ant-local-testnet-action@chore-enable_logging
with:
action: start
enable-evm-testnet: true
Expand Down
5 changes: 1 addition & 4 deletions ant-node/src/bin/antnode/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -591,10 +591,7 @@ fn init_logging(
log_builder.initialize()?
};

println!(
"Initialised logging. Logs will be output to {:?}",
output_dest
);
println!("Logging initialised. Logs will be output to {output_dest:?}",);

Ok((
output_dest.to_string(),
Expand Down

0 comments on commit b047df4

Please sign in to comment.