Skip to content

Commit

Permalink
Experiment with CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cmichi committed Feb 16, 2022
1 parent d4c7038 commit de13be5
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 17 deletions.
11 changes: 6 additions & 5 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,12 @@ fmt:
script:
- cargo fmt --verbose --all -- --check

#clippy:
#stage: check
#<<: *docker-env
#script:
#- cargo clippy --verbose --all-targets --all-features -- -D warnings;
clippy:
stage: check
<<: *docker-env
script:
- cargo clippy --verbose -- -D warnings;
- cargo clippy --verbose --all-targets --all-features -- -D warnings;

#### stage: test (all features)

Expand Down
17 changes: 9 additions & 8 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ version = "0.17.0"
authors = ["Parity Technologies <admin@parity.io>"]
build = "build.rs"
edition = "2021"
rust-version = "1.56.1"

license = "GPL-3.0"
readme = "README.md"
Expand Down
20 changes: 20 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ fn main() {
dylint_dir.join("Cargo.toml").display()
);
let target_dir = format!("--target-dir={}", out_dir.as_path().display());
//let target_dir = format!("--target-dir=/tmp/lalala/");
let args = vec!["--release", &target_dir, &manifest_arg];
invoke_cargo("build", &args, Some(dylint_dir.clone())).expect("dylint build failed");

Expand Down Expand Up @@ -268,12 +269,31 @@ where
let mut cmd = Command::new("cargo");
cmd.env_remove("RUSTUP_TOOLCHAIN");
cmd.env_remove("CARGO_TARGET_DIR");
//cmd.env_remove("CARGO_HOME");

if let Some(path) = working_dir {
println!("Setting cargo working dir to '{}'", path.as_ref().display());
cmd.current_dir(path);
}

//cmd.env("CARGO_TARGET_DIR", "/tmp/lalala");

/*
cmd.arg("--version");
let child = cmd
// capture the stdout to return from this function as bytes
.stdout(std::process::Stdio::piped())
.spawn()
.unwrap_or_else(|_| panic!("Error executing `{:?}`", cmd));
let output = child.wait_with_output()?;
eprintln!("output: {:?}", std::str::from_utf8(&output.stdout).expect("conversion must work"));
//std::process::exit(1);
*/





cmd.arg(command);
cmd.args(args);

Expand Down
1 change: 0 additions & 1 deletion metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "contract-metadata"
version = "0.5.1"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
rust-version = "1.56.1"

license = "Apache-2.0"
readme = "README.md"
Expand Down
1 change: 0 additions & 1 deletion templates/new/_Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "{{name}}"
version = "0.1.0"
authors = ["[your_name] <[your_email]>"]
edition = "2021"
rust-version = "1.56.1"

[dependencies]
ink_primitives = { version = "3.0.0-rc8", default-features = false }
Expand Down
1 change: 0 additions & 1 deletion templates/tools/generate-metadata/_Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name = "metadata-gen"
version = "0.1.0"
authors = ["Parity Technologies <admin@parity.io>"]
edition = "2021"
rust-version = "1.56.1"
publish = false

[[bin]]
Expand Down

0 comments on commit de13be5

Please sign in to comment.