-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
122 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: "CI" | ||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
name: cargo test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
- run: cargo test --all-features | ||
|
||
# Check formatting with rustfmt | ||
formatting: | ||
name: cargo fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# Ensure rustfmt is installed and setup problem matcher | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
with: | ||
components: rustfmt | ||
- name: Rustfmt Check | ||
uses: actions-rust-lang/rustfmt@v1 | ||
|
||
# Check licensing and produce a list of licenses | ||
licensing: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install cargo-about | ||
uses: baptiste0928/cargo-install@v3 | ||
with: | ||
crate: cargo-about | ||
version: "0.6.4" | ||
- name: Run license check | ||
run: cargo about generate about.hbs > license.html | ||
- name: Archive license file | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: license | ||
path: license.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
<!-- Used in conjuction with `cargo-about` to generate a list of licenses. --> | ||
<html> | ||
|
||
<head> | ||
<style> | ||
@media (prefers-color-scheme: dark) { | ||
body { | ||
background: #333; | ||
color: white; | ||
} | ||
a { | ||
color: skyblue; | ||
} | ||
} | ||
.container { | ||
font-family: sans-serif; | ||
max-width: 800px; | ||
margin: 0 auto; | ||
} | ||
.intro { | ||
text-align: center; | ||
} | ||
.licenses-list { | ||
list-style-type: none; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
.license-used-by { | ||
margin-top: -10px; | ||
} | ||
.license-text { | ||
max-height: 200px; | ||
overflow-y: scroll; | ||
white-space: pre-wrap; | ||
} | ||
</style> | ||
<title>Third Party Licenses</title> | ||
</head> | ||
|
||
<body> | ||
<main class="container"> | ||
<div class="intro"> | ||
<h1>Third Party Licenses</h1> | ||
<p>This page lists the licenses of the projects used in warp.</p> | ||
</div> | ||
|
||
<h2>Overview of licenses:</h2> | ||
<ul class="licenses-overview"> | ||
{{#each overview}} | ||
<li><a href="#{{id}}">{{name}}</a> ({{count}})</li> | ||
{{/each}} | ||
</ul> | ||
|
||
<h2>All license text:</h2> | ||
<ul class="licenses-list"> | ||
{{#each licenses}} | ||
<li class="license"> | ||
<h3 id="{{id}}">{{name}}</h3> | ||
<h4>Used by:</h4> | ||
<ul class="license-used-by"> | ||
{{#each used_by}} | ||
<li><a href="{{#if crate.repository}} {{crate.repository}} {{else}} https://crates.io/crates/{{crate.name}} {{/if}}">{{crate.name}} {{crate.version}}</a></li> | ||
{{/each}} | ||
</ul> | ||
<pre class="license-text">{{text}}</pre> | ||
</li> | ||
{{/each}} | ||
</ul> | ||
</main> | ||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Used in conjuction with `cargo-about` to generate a list of licenses. | ||
accepted = [ | ||
"Apache-2.0", | ||
"MIT", | ||
"Unicode-DFS-2016" | ||
] |