Skip to content

Commit

Permalink
ci: temporary use stable build
Browse files Browse the repository at this point in the history
Since an issue appeared with nightly-2024-10-29 in aptos-core.
  • Loading branch information
Rqnsom committed Oct 31, 2024
1 parent a9fbc15 commit c132cec
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 28 deletions.
1 change: 0 additions & 1 deletion .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ x = "run --package aptos-cargo-cli --bin aptos-cargo-cli --"
[build]
rustflags = ["--cfg", "tokio_unstable", "-C", "force-frame-pointers=yes", "-C", "force-unwind-tables=yes"]

# TODO(grao): Figure out whether we should enable othaer cpu features, and whether we should use a different way to configure them rather than list every single one here.
[target.x86_64-unknown-linux-gnu]
rustflags = ["--cfg", "tokio_unstable", "-C", "link-arg=-fuse-ld=lld", "-C", "force-frame-pointers=yes", "-C", "force-unwind-tables=yes", "-C", "target-feature=+sse4.2"]

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/check-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@ jobs:
- uses: actions/checkout@v2

- name: Install required deps
run: sudo apt-get install libudev-dev libdw-dev
run: sudo apt-get install libudev-dev libdw-dev lld

- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: default
toolchain: nightly
toolchain: stable

- name: Run check
run: cargo +nightly check --all-targets
run: cargo check --all-targets

- name: Run fmt
run: cargo +nightly fmt --all -- --check
run: cargo fmt --all -- --check

- name: Run clippy
run: cargo +nightly clippy --all-targets -- -D warnings
run: cargo clippy --all-targets -- -D warnings
30 changes: 16 additions & 14 deletions move-mutator/src/configuration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,18 @@ mod tests {
fs::write("test.toml", toml_content).unwrap();
let config = Configuration::from_toml_file(Path::new("test.toml")).unwrap();
fs::remove_file("test.toml").unwrap();
assert_eq!(config.project.move_sources, vec![Path::new(
"/path/to/move/source"
)]);
assert_eq!(
config.project.move_sources,
vec![Path::new("/path/to/move/source")]
);
assert_eq!(
config.project.mutate_modules,
ModuleFilter::Selected(vec!["module1".to_owned(), "module2".to_owned()])
);
assert_eq!(config.mutation.unwrap().operators, vec![
"operator1",
"operator2"
]);
assert_eq!(
config.mutation.unwrap().operators,
vec!["operator1", "operator2"]
);
assert_eq!(config.individual.len(), 1);
assert_eq!(config.individual[0].file, PathBuf::from("/path/to/file"));
assert!(config.individual[0].verify_mutants);
Expand Down Expand Up @@ -255,9 +256,10 @@ mod tests {
fs::write("test.json", json_content).unwrap();
let config = Configuration::from_json_file(Path::new("test.json")).unwrap();
fs::remove_file("test.json").unwrap();
assert_eq!(config.project.move_sources, vec![Path::new(
"/path/to/move/source"
)]);
assert_eq!(
config.project.move_sources,
vec![Path::new("/path/to/move/source")]
);
assert_eq!(config.project.mutate_modules, ModuleFilter::All);
assert_eq!(
config.project.out_mutant_dir,
Expand All @@ -271,10 +273,10 @@ mod tests {
Path::new("/path/to/configuration")
);
assert_eq!(config.project_path.unwrap(), Path::new("/path/to/project"));
assert_eq!(config.mutation.unwrap().operators, vec![
"operator1",
"operator2"
]);
assert_eq!(
config.mutation.unwrap().operators,
vec!["operator1", "operator2"]
);
}

#[test]
Expand Down
2 changes: 0 additions & 2 deletions move-spec-test/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

#![allow(clippy::too_long_first_doc_paragraph)]

use clap::Parser;
use move_mutator::cli::{FunctionFilter, ModuleFilter, PackagePathCheck};
use serde::{Deserialize, Serialize};
Expand Down
2 changes: 0 additions & 2 deletions move-spec-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Copyright © Aptos Foundation
// SPDX-License-Identifier: Apache-2.0

#![allow(clippy::too_long_first_doc_paragraph)]

mod benchmark;
pub mod cli;
mod prover;
Expand Down
9 changes: 5 additions & 4 deletions move-spec-test/src/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ pub(crate) fn prove<W: WriteColor>(
prover_conf: &move_prover::cli::Options,
mut error_writer: &mut W,
) -> anyhow::Result<()> {
let mut model = config
.clone()
.move_model_for_package(package_path, ModelConfig {
let mut model = config.clone().move_model_for_package(
package_path,
ModelConfig {
all_files_as_targets: true,
target_filter: None,
compiler_version: config
Expand All @@ -38,7 +38,8 @@ pub(crate) fn prove<W: WriteColor>(
.compiler_config
.language_version
.unwrap_or(LanguageVersion::V1),
})?;
},
)?;

let mut prover_conf = prover_conf.clone();
prover_conf.output_path = package_path
Expand Down

0 comments on commit c132cec

Please sign in to comment.