Skip to content

Commit

Permalink
Merge #826
Browse files Browse the repository at this point in the history
826: cleanup r=Alexhuszagh a=Emilgardis



Co-authored-by: Emil Gardström <emil.gardstrom@gmail.com>
  • Loading branch information
bors[bot] and Emilgardis authored Jun 20, 2022
2 parents d0cfe20 + 6e536c7 commit 2937032
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 41 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ jobs:
- name: Run ShellCheck
uses: azohra/shell-linter@v0.3.0

cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1

fmt:
runs-on: ubuntu-latest
steps:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,9 @@ jobs:
run: cargo build -p xtask
- name: Build Docker image
id: build-docker-image
run: cargo xtask build-docker-image -v --no-cache --no-output --from-ci --tag weekly
run: cargo xtask build-docker-image -v --no-cache --no-output --from-ci --no-fastfail --tag weekly
cargo-deny:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: EmbarkStudios/cargo-deny-action@v1
14 changes: 7 additions & 7 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_ignored = "0.1.2"
shell-words = "1.1.0"
sha1_smol = "1.0.0"
const-sha1 = "0.2.0"

[target.'cfg(not(windows))'.dependencies]
nix = { version = "0.24", default-features = false, features = ["user"] }
Expand Down
25 changes: 0 additions & 25 deletions LICENSE-APACHE
Original file line number Diff line number Diff line change
Expand Up @@ -174,28 +174,3 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
1 change: 1 addition & 0 deletions LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Copyright (c) 2017-2022 by the respective authors
Copyright (c) 2016 Jorge Aparicio

Permission is hereby granted, free of charge, to any
Expand Down
34 changes: 34 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

# only check for the targets we currently publish
targets = [
{ triple = "x86_64-apple-darwin" },
{ triple = "x86_64-unknown-linux-gnu" },
{ triple = "x86_64-unknown-linux-musl" },
{ triple = "x86_64-pc-windows-msvc" },
]

[advisories]
vulnerability = "deny"
unmaintained = "deny"
notice = "deny"
unsound = "deny"
ignore = []

[bans]
multiple-versions = "deny"
deny = []

[sources]
unknown-registry = "deny"
unknown-git = "deny"
allow-git = []

[licenses]
unlicensed = "deny"
allow-osi-fsf-free = "neither"
copyleft = "deny"
confidence-threshold = 0.93
allow = ["Apache-2.0", "MIT", "CC0-1.0"]

[licenses.private]
ignore = true
14 changes: 8 additions & 6 deletions src/docker/custom.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@ impl<'a> Dockerfile<'a> {
.file_name()
.expect("workspace_root can't end in `..`")
.to_string_lossy(),
path_hash =
sha1_smol::Sha1::from(&metadata.workspace_root.to_string_lossy().as_bytes())
.digest()
.to_string()
.get(..5)
.expect("sha1 is expected to be at least 5 characters long"),
path_hash = format!(
"{}",
const_sha1::sha1(&const_sha1::ConstBuffer::from_slice(
metadata.workspace_root.to_string_lossy().as_bytes()
))
)
.get(..5)
.expect("sha1 is expected to be at least 5 characters long"),
custom = if matches!(self, Self::File { .. }) {
""
} else {
Expand Down
1 change: 0 additions & 1 deletion triagebot.toml

This file was deleted.

1 change: 1 addition & 0 deletions xtask/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ name = "xtask"
repository = "https://github.com/cross-rs/cross"
version = "0.0.0-dev.0"
edition = "2021"
publish = false


[dependencies]
Expand Down

0 comments on commit 2937032

Please sign in to comment.