Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
57e6eee
Implement RFC, T2 APIs + Implement Utils Lib
gomathishankar37 May 7, 2025
b213e61
Add more API support
gomathishankar37 May 9, 2025
8e421c4
Add More APIs
gomathishankar37 May 12, 2025
0cdf945
TODO
gomathishankar37 May 12, 2025
2fdbc59
Added APIs
gomathishankar37 May 12, 2025
effadb9
Added more API Support
gomathishankar37 May 13, 2025
41a5b2f
Add Test Directory, Code Format with rustfmt
gomathishankar37 May 14, 2025
6bc4a11
update main.rs
gomathishankar37 May 15, 2025
66a8908
Update More API support for crash upload
gomathishankar37 May 21, 2025
d4bef0c
Update APIs for crashupload_utils.rs
gomathishankar37 May 26, 2025
5a631ff
Sample PR Actions
gomathishankar37 May 27, 2025
deaecc5
Update GitHub workflows for Rust project
gomathishankar37 May 27, 2025
b4ed2b4
Run Cargo fmt
gomathishankar37 May 27, 2025
a735f83
Update native_full_build.yml
gomathishankar37 May 27, 2025
bfe3fac
Update main.rs
gomathishankar37 May 27, 2025
17f0846
Updated Crashupload Repo
gomathishankar37 May 27, 2025
8dfd44d
Update native_full_build.yml
gomathishankar37 May 27, 2025
0c213c9
Updated APIs with docstrings
gomathishankar37 Jun 3, 2025
b3b25ce
Update Code
gomathishankar37 Jun 4, 2025
33eff71
Update native_full_build.yml
gomathishankar37 Jun 4, 2025
a57d1ac
Update Code
gomathishankar37 Jun 4, 2025
af5021b
Update process_dumps() in crashupload_utils.rs
gomathishankar37 Jun 7, 2025
ab7c295
Update Code changes
gomathishankar37 Jun 10, 2025
9d6ce69
Add Yocto compatible Cargo manifest
gomathishankar37 Jun 12, 2025
092c44d
Update Cargo.toml
gomathishankar37 Jun 12, 2025
4223e19
Update Cargo.toml
gomathishankar37 Jun 12, 2025
d27fa0d
Fix Build Errors and Warnings in Rust Code
gomathishankar37 Jun 12, 2025
e5e6dcc
Update crashupload_utils.rs and main.rs
gomathishankar37 Jun 16, 2025
378e391
Update rs files
gomathishankar37 Jun 16, 2025
b9fcf6a
Update crashupload_utils.rs
gomathishankar37 Jun 16, 2025
d0b7f4e
Update Error code for cross device link rename failure
gomathishankar37 Jun 16, 2025
10e27e4
Update safe_rename and add utils
gomathishankar37 Jun 17, 2025
79dd2fd
Update basename() util to return owned String
gomathishankar37 Jun 17, 2025
67897e7
Update basename() util
gomathishankar37 Jun 17, 2025
b3dd541
Update Compress files logic
gomathishankar37 Jun 17, 2025
9727ebc
Update Unit Files and Log lines in src/
gomathishankar37 Jun 17, 2025
a44ecbd
Update process_dumps() to use abs path
gomathishankar37 Jun 18, 2025
046deb9
Update add_crashed_log_file() in crashupload_utils.rs
gomathishankar37 Jun 18, 2025
f451183
Update uploadtos3params file update logic
gomathishankar37 Jun 19, 2025
78a9907
Update Script call
gomathishankar37 Jun 19, 2025
9f33f61
Update Code
gomathishankar37 Jun 20, 2025
d440927
Update Cargo.toml
gomathishankar37 Jun 21, 2025
2065a9d
Update crashupload_utils.rs
gomathishankar37 Jun 23, 2025
9904207
Update lib.rs
gomathishankar37 Jun 23, 2025
bafc65c
Update crashupload_utils.rs
gomathishankar37 Jun 23, 2025
9e308c5
Update crashupload_utils.rs
gomathishankar37 Jun 23, 2025
1a6841c
Update code
gomathishankar37 Jun 24, 2025
e5b983a
Update version_file changes
gomathishankar37 Jun 25, 2025
8b43f55
Update version_file debug
gomathishankar37 Jun 25, 2025
e449af5
Update debugs
gomathishankar37 Jun 25, 2025
ee393e9
Update Debugs
gomathishankar37 Jun 25, 2025
1c18c29
Update Logs
gomathishankar37 Jun 25, 2025
01b8f44
Add debugs to bypass cleanup (DEBUG) (TO BE REVERTED)
gomathishankar37 Jun 26, 2025
6f0eeb9
Debug checkin
gomathishankar37 Jun 26, 2025
4bc7f1e
backup tars (debug)
gomathishankar37 Jun 26, 2025
0bb7136
Update Release opt fields in Cargo manifest
gomathishankar37 Jun 26, 2025
4dc8b24
Update native_full_build.yml
gomathishankar37 Jun 26, 2025
8e596f6
Merge branch 'develop' into feature-sample-rust
gomathishankar37 Jun 26, 2025
3559e59
Update Cargo.toml
gomathishankar37 Jun 26, 2025
f3c4274
Update Cargo.toml
gomathishankar37 Jun 26, 2025
afc5b12
Update docstrings
gomathishankar37 Jun 26, 2025
0a7f61d
Fix Doctest
gomathishankar37 Jun 26, 2025
775fd0c
Fix doctest
gomathishankar37 Jun 26, 2025
de75641
Update L1-Test.yaml
gomathishankar37 Jun 26, 2025
86018a7
Update L1-Test.yaml
gomathishankar37 Jun 27, 2025
7a05f1d
Update L1-Test.yaml
gomathishankar37 Jun 27, 2025
29f3431
Update L1-Test.yaml
gomathishankar37 Jun 27, 2025
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
70 changes: 70 additions & 0 deletions .github/workflows/L1-Test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: L1 Testing & Coverage

on:
pull_request:
branches: [ main, develop ]
push:
branches: [ main, develop ]

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
test-and-coverage:
name: Test & Coverage
runs-on: ubuntu-latest
container:
image: ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust Toolchain components
run: |
if ! command -v cargo &> /dev/null; then
curl https://sh.rustup.rs -sSf | sh -s -- -y
export PATH="$HOME/.cargo/bin:$PATH"
fi
rustup update stable
rustup default stable
rustup component add llvm-tools-preview

- name: Add Rust to PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Install cargo-llvm-cov
run: cargo install cargo-llvm-cov

- name: Install additional dependencies
run: |
apt-get update && apt-get install -y git pkg-config libssl-dev || true

- name: Run all tests
run: cargo test --all-features --workspace --verbose

- name: Run tests with llvm-cov for coverage
run: |
mkdir -p ./coverage
# Generate both XML and summary report
cargo llvm-cov --all-features --workspace --cobertura --output-path ./coverage/cobertura.xml
# Print coverage summary to console
cargo llvm-cov --all-features --workspace --summary-only

# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3
# with:
# file: ./coverage/cobertura.xml
# flags: unittests
# name: codecov-umbrella
# fail_ci_if_error: false

# - name: Archive code coverage results
# uses: actions/upload-artifact@v4
# with:
# name: code-coverage-report
# path: coverage/

- name: Clean target directory (ensure it's not persisted)
run: rm -rf target/
52 changes: 52 additions & 0 deletions .github/workflows/native_full_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build Crash Upload Component in Native Environment

on:
pull_request:
branches: [ main, develop ]
push:
branches: [ main, develop ]

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
build:
name: Build Check
runs-on: ubuntu-latest
container:
image: ghcr.io/rdkcentral/docker-device-mgt-service-test/native-platform:latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust Toolchain components
run: |
if ! command -v cargo &> /dev/null; then
curl https://sh.rustup.rs -sSf | sh -s -- -y
export PATH="$HOME/.cargo/bin:$PATH"
fi
rustup update stable
rustup default stable

- name: Add Rust to PATH
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Install additional components
run: rustup component add clippy

- name: Run cargo check
run: cargo check --all-targets --all-features

- name: Run clippy (do not fail on warnings)
run: cargo clippy --all-targets --all-features -- -D warnings || true

- name: Build all libraries and binaries (debug)
run: cargo build --all-targets --all-features

- name: Build all libraries and binaries (release)
run: cargo build --release --all-targets --all-features

- name: Clean target directory (ensure it's not persisted)
run: rm -rf target/
175 changes: 175 additions & 0 deletions .github/workflows/release_docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
name: Release Documentation

#on:
push:
branches: [ main ]
release:
types: [ published ]

env:
CARGO_TERM_COLOR: always

permissions:
contents: write
pages: write
id-token: write

jobs:
docs:
name: Generate and Deploy Documentation
runs-on: ubuntu-latest
container:
image: rust:latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install dependencies
run: |
apt-get update && apt-get install -y git pkg-config libssl-dev
cargo install cargo-readme

- name: Generate documentation
run: |
cargo doc --all-features --no-deps --workspace
echo '<meta http-equiv="refresh" content="0; url=./doc/index.html">' > target/doc/index.html

- name: Copy additional files to docs
run: |
cp README.md target/doc/ 2>/dev/null || true
cp LICENSE* target/doc/ 2>/dev/null || true

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'target/doc'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

- name: Generate README from lib.rs
run: |
# Configure git for commit
git config --global --add safe.directory /__w/*/
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"

# Find the main library crate and generate README
if [ -f "src/lib.rs" ]; then
cargo readme --input src/lib.rs --output README.md
elif find . -name "lib.rs" -path "*/src/lib.rs" | head -1 | xargs -I{} dirname {} | xargs -I{} dirname {} | head -1; then
# Handle workspace with multiple crates - use first one found
CRATE_DIR=$(find . -name "lib.rs" -path "*/src/lib.rs" | head -1 | xargs -I{} dirname {} | xargs -I{} dirname {})
cd "$CRATE_DIR"
cargo readme --input src/lib.rs --output ../README.md
cd - > /dev/null
fi

- name: Check if README changed and commit
run: |
if [ -f "README.md" ]; then
if ! git diff --quiet README.md 2>/dev/null; then
git add README.md
git commit -m "docs: auto-update README.md from lib.rs documentation" || echo "No changes to commit"
git push || echo "Nothing to push"
else
echo "README.md unchanged"
fi
else
echo "README.md not found"
fi

- name: Clean target directory (ensure it's not persisted)
run: rm -rf target/ }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-docs-${{ hashFiles('**/Cargo.lock') }}

- name: Install cargo-readme
run: cargo install cargo-readme

- name: Generate documentation
run: |
cargo doc --all-features --no-deps --workspace
echo '<meta http-equiv="refresh" content="0; url=./doc/index.html">' > target/doc/index.html

- name: Copy additional files to docs
run: |
cp README.md target/doc/ || true
cp LICENSE* target/doc/ || true

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'target/doc'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

- name: Generate README from lib.rs
run: |
# Find the main library crate
if [ -f "src/lib.rs" ]; then
cargo readme --input src/lib.rs --output README.md
elif [ -f "*/src/lib.rs" ]; then
# Handle workspace with multiple crates
for crate_dir in */; do
if [ -f "${crate_dir}src/lib.rs" ] && [ -f "${crate_dir}Cargo.toml" ]; then
cd "$crate_dir"
cargo readme --input src/lib.rs --output ../README.md
cd ..
break
fi
done
fi

- name: Check if README changed
id: readme_check
run: |
if git diff --quiet README.md; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi

- name: Commit updated README
if: steps.readme_check.outputs.changed == 'true'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add README.md
git commit -m "docs: auto-update README.md from lib.rs documentation"
git push

- name: Clean target directory
run: cargo clean
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/target/
Loading
Loading