forked from containers/composefs
-
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.
Merge pull request containers#282 from cgwalters/rust-crate
Add a composefs Rust crate
- Loading branch information
Showing
7 changed files
with
703 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,43 @@ | ||
# Inspired by https://github.com/rust-analyzer/rust-analyzer/blob/master/.github/workflows/ci.yaml | ||
# but tweaked in several ways. If you make changes here, consider doing so across other | ||
# repositories in e.g. ostreedev etc. | ||
name: Rust | ||
|
||
permissions: | ||
actions: read | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
workflow_dispatch: {} | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# xref containers/containers-image-proxy-rs | ||
- name: Cache Dependencies | ||
uses: Swatinem/rust-cache@v2 | ||
with: | ||
key: "tests" | ||
- name: cargo fmt (check) | ||
run: cargo fmt -- --check -l | ||
- name: Build | ||
run: cargo test --no-run | ||
- name: Run tests | ||
run: cargo test -- --nocapture --quiet | ||
cargo-deny: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: EmbarkStudios/cargo-deny-action@v1 | ||
with: | ||
log-level: warn | ||
command: check bans sources licenses |
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 |
---|---|---|
|
@@ -26,3 +26,5 @@ composefs.spec | |
libtool | ||
ltmain.sh | ||
missing | ||
target/ | ||
Cargo.lock |
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,27 @@ | ||
[package] | ||
name = "composefs" | ||
version = "0.1.0" | ||
edition = "2021" | ||
description = "Rust composefs" | ||
keywords = ["composefs", "oci", "opencontainers", "docker", "podman"] | ||
license = "MIT" | ||
repository = "https://github.com/containers/composefs" | ||
rust-version = "1.70.0" | ||
|
||
include = [ | ||
"/COPYING", | ||
"/README.md", | ||
"/rust/**", | ||
] | ||
|
||
[lib] | ||
name = "composefs" | ||
path = "rust/src/lib.rs" | ||
|
||
[dependencies] | ||
anyhow = "1.0" | ||
libc = "0.2" | ||
|
||
[dev-dependencies] | ||
tar = "0.4.38" | ||
tempfile = "3.2.0" |
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,10 @@ | ||
[licenses] | ||
unlicensed = "deny" | ||
allow = ["Apache-2.0", "Apache-2.0 WITH LLVM-exception", "MIT", "BSD-3-Clause", "BSD-2-Clause", "Unicode-DFS-2016"] | ||
|
||
[bans] | ||
|
||
[sources] | ||
unknown-registry = "deny" | ||
unknown-git = "deny" | ||
allow-git = [] |
Oops, something went wrong.