Skip to content

Commit

Permalink
[ci] use rust stable (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: Gabi O'Bittern <gabi_o'[email protected]>
Co-authored-by: Beauregard Polecat <[email protected]>
  • Loading branch information
3 people authored Jan 17, 2025
1 parent e9628e0 commit 861aa78
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 48 deletions.
13 changes: 1 addition & 12 deletions .github/actions/build_env/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,9 @@ runs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.78.0
toolchain: stable
override: true

- name: install rustfmt clippy
shell: bash
run: rustup component add rustfmt clippy

- name: also rust cache
uses: Swatinem/[email protected]
with:
shared-key: "libra"
cache-on-failure: "true"

# call own action for libra_cli
# known issue with needing to hard code the @version
# https://github.com/orgs/community/discussions/41927
- uses: 0LNetworkCommunity/libra-framework/.github/actions/get_cli@main
26 changes: 0 additions & 26 deletions .github/actions/get_cli/action.yaml

This file was deleted.

5 changes: 3 additions & 2 deletions .github/workflows/cleanliness.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ jobs:
- name: setup env
uses: ./.github/actions/build_env

- uses: Swatinem/rust-cache@v2.7.3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "libra-framework"
shared-key: "forensic-db"
cache-all-crates: true
cache-on-failure: true

- name: format
uses: actions-rs/cargo@v1
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/rust-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,11 @@ jobs:
- name: setup env
uses: ./.github/actions/build_env

- uses: Swatinem/rust-cache@v2.7.3
- uses: Swatinem/rust-cache@v2
with:
shared-key: "forensic-db"
cache-all-crates: true
cache-on-failure: true

- name: test
working-directory: ./
Expand Down
3 changes: 0 additions & 3 deletions src/analytics/enrich_account_funding.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ use crate::schema_exchange_orders::{ExchangeOrder, OrderType};
#[cfg(test)]
use crate::date_util::parse_date;

#[cfg(test)]
use crate::date_util::parse_date;

#[derive(Default, Debug, Clone, Deserialize, Serialize)]
pub struct AccountDataAlt {
pub current_balance: f64,
Expand Down
4 changes: 2 additions & 2 deletions src/json_rescue_v5_extract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ use diem_temppath::TempPath;
use diem_types::account_address::AccountAddress;
use log::{error, trace, warn};
use std::path::{Path, PathBuf};

/// The canonical transaction archives for V5 were kept in a different format as in v6 and v7.
/// As of Nov 2024, there's a project to recover the V5 transaction archives to be in the same bytecode flat file format as v6 and v7.
/// Until then, we must parse the json files.
pub fn extract_v5_json_rescue(
one_json_file: &Path,
) -> Result<(Vec<WarehouseTxMaster>, Vec<WarehouseEvent>, Vec<String>)> {
Expand All @@ -45,7 +45,7 @@ pub fn extract_v5_json_rescue(
wtxs.sender = cast_legacy_account(sender)?;

// must cast from V5 Hashvalue buffer layout
wtxs.tx_hash = HashValue::from_slice(&t.hash.to_vec())?;
wtxs.tx_hash = HashValue::from_slice(t.hash.to_vec())?;

wtxs.function = make_function_name(script);
trace!("function: {}", &wtxs.function);
Expand Down
6 changes: 4 additions & 2 deletions src/warehouse_cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ pub struct WarehouseCli {
#[clap(long, short('r'))]
/// URI of graphDB e.g. neo4j+s://localhost:port
db_uri: Option<String>,
#[clap(long, short('u'))]

#[clap(long, short('u'))]
/// username of db
db_username: Option<String>,
#[clap(long, short('p'))]
Expand Down Expand Up @@ -117,6 +117,7 @@ pub enum AnalyticsSub {
#[clap(long)]
/// start day (exclusive) of trades YYYY-MM-DD
start_day: String,

#[clap(long)]
/// end day (exclusive) of trades YYYY-MM-DD
end_day: String,
Expand All @@ -125,10 +126,11 @@ pub enum AnalyticsSub {
/// slow search producing likely candidates at each day
/// requires top n # for length of initial list to scan
replay_balances: Option<u64>,
#[clap(long)]

#[clap(long)]
/// get perfect deposit matches on dump cases, requires tolerance value of 1.0 or more
match_simple_dumps: Option<f64>,

#[clap(long)]
/// clear cache for local matches
clear_cache: bool,
Expand Down

0 comments on commit 861aa78

Please sign in to comment.