From 63cdda58dd6a95a4a5d5349ea3f340801a18421b Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Mon, 4 Oct 2021 11:08:19 +0200 Subject: [PATCH 1/2] Github CI --- .github/workflows/rust.yml | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..651495d --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,48 @@ +name: Build + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + - nightly + - 1.51.0 # MSVR + steps: + - uses: actions/checkout@v2 + - name: Build + run: cargo build --verbose + # use some no_std target + - name: Install no_std target thumbv7em-none-eabihf + run: rustup target add thumbv7em-none-eabihf + - name: Build (no_std) + run: cargo build --verbose --target thumbv7em-none-eabihf + - name: Run tests + run: cargo test --verbose + + style_checks: + runs-on: ubuntu-latest + strategy: + matrix: + rust: + - stable + - nightly + - 1.51.0 # MSVR + steps: + - uses: actions/checkout@v2 + - name: Rustfmt + run: cargo fmt -- --check + - name: Clippy + run: cargo clippy + - name: Rustdoc + run: cargo doc From 7c7c5158191e6b04e17222c256c0852293755fe8 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Mon, 4 Oct 2021 11:20:14 +0200 Subject: [PATCH 2/2] no_std fix --- Cargo.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Cargo.toml b/Cargo.toml index 3ea995a..ed285aa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,6 +15,9 @@ homepage = "https://github.com/phip1611/tar-no-std" repository = "https://github.com/phip1611/tar-no-std" documentation = "https://docs.rs/tar-no-std" +# required because "env_logger" uses "log" but with dependency to std.. +resolver = "2" + [dependencies] bitflags = "1.3" arrayvec = { version = "0.7", default-features = false }