mirror of
https://github.com/PR0M3TH3AN/Marlin.git
synced 2025-09-09 15:48:43 +00:00
Update CI workflow to use actions-rs/toolchain for Rust setup
- Replace actions/setup-rust with actions-rs/toolchain for both stable and nightly toolchain installations. - Enable minimal profile for faster toolchain setup. - Clean up comments and ensure consistency in artifact upload steps.
This commit is contained in:
32
.github/workflows/ci.yml
vendored
32
.github/workflows/ci.yml
vendored
@@ -21,14 +21,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4 # Updated to v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Rust (stable)
|
- name: Install Rust (stable)
|
||||||
uses: actions/setup-rust@v1 # Using the official setup-rust action
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
# Optional: enable caching
|
override: true
|
||||||
# cache: true
|
profile: minimal # Faster toolchain setup
|
||||||
|
|
||||||
- name: Install system prerequisites for tests and benchmarks
|
- name: Install system prerequisites for tests and benchmarks
|
||||||
run: |
|
run: |
|
||||||
@@ -39,13 +39,6 @@ jobs:
|
|||||||
run: chmod +x ./run_all_tests.sh
|
run: chmod +x ./run_all_tests.sh
|
||||||
|
|
||||||
- name: Run Comprehensive Test Script
|
- name: Run Comprehensive Test Script
|
||||||
# This script should now handle:
|
|
||||||
# - Building and installing Marlin
|
|
||||||
# - Running cargo test --all
|
|
||||||
# - Generating test corpus
|
|
||||||
# - Running bench/dirty-vs-full.sh (produces dirty-vs-full.md)
|
|
||||||
# - (Optional) Running the cold-start benchmark (produces perf.json or similar)
|
|
||||||
# - Running the demo flow tests
|
|
||||||
run: ./run_all_tests.sh
|
run: ./run_all_tests.sh
|
||||||
|
|
||||||
- name: Upload Dirty vs Full Benchmark Report
|
- name: Upload Dirty vs Full Benchmark Report
|
||||||
@@ -53,33 +46,33 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: marlin-dirty-vs-full-benchmark-report
|
name: marlin-dirty-vs-full-benchmark-report
|
||||||
path: bench/dirty-vs-full.md
|
path: bench/dirty-vs-full.md
|
||||||
if-no-files-found: warn # Don't fail if the file isn't there, just warn
|
if-no-files-found: warn
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
# If your run_all_tests.sh now also creates perf.json for cold-start
|
|
||||||
- name: Upload Cold Start Benchmark JSON (if generated by script)
|
- name: Upload Cold Start Benchmark JSON (if generated by script)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
if: ${{ success() }} # Only if previous steps succeed
|
if: ${{ success() }}
|
||||||
with:
|
with:
|
||||||
name: marlin-cold-start-perf-json
|
name: marlin-cold-start-perf-json
|
||||||
path: perf.json # Assuming run_all_tests.sh now creates this
|
path: perf.json
|
||||||
if-no-files-found: ignore # Okay if this specific file isn't generated
|
if-no-files-found: ignore
|
||||||
retention-days: 7
|
retention-days: 7
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
name: Code Coverage (Tarpaulin)
|
name: Code Coverage (Tarpaulin)
|
||||||
needs: comprehensive-tests # Run after the main tests
|
needs: comprehensive-tests
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Rust (nightly for Tarpaulin, if needed)
|
- name: Install Rust (nightly for Tarpaulin, if needed)
|
||||||
uses: actions/setup-rust@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: nightly # Or stable if Tarpaulin works well with it for your project
|
toolchain: nightly # Or stable if Tarpaulin works well with it for your project
|
||||||
override: true
|
override: true
|
||||||
components: llvm-tools-preview # Component needed by Tarpaulin
|
components: llvm-tools-preview # Component needed by Tarpaulin
|
||||||
|
profile: minimal
|
||||||
|
|
||||||
- name: Install system prerequisites for Tarpaulin
|
- name: Install system prerequisites for Tarpaulin
|
||||||
run: |
|
run: |
|
||||||
@@ -90,11 +83,10 @@ jobs:
|
|||||||
run: cargo install cargo-tarpaulin
|
run: cargo install cargo-tarpaulin
|
||||||
|
|
||||||
- name: Code Coverage (libmarlin only)
|
- name: Code Coverage (libmarlin only)
|
||||||
# MARLIN_DB_PATH should be unset or point to a temp location for isolated test runs
|
|
||||||
run: |
|
run: |
|
||||||
unset MARLIN_DB_PATH
|
unset MARLIN_DB_PATH
|
||||||
cargo +nightly tarpaulin --package libmarlin --out Html --out Xml --fail-under 85
|
cargo +nightly tarpaulin --package libmarlin --out Html --out Xml --fail-under 85
|
||||||
continue-on-error: true # So the workflow doesn't fail if coverage is low during development
|
continue-on-error: true
|
||||||
|
|
||||||
- name: Upload HTML Coverage Report
|
- name: Upload HTML Coverage Report
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
Reference in New Issue
Block a user