From dac16c41d3e535540057c2ea078d0cd5ef0e92a0 Mon Sep 17 00:00:00 2001 From: Nicolas Stalder Date: Sun, 31 Jan 2021 13:36:53 +0100 Subject: [PATCH] Prepare for a release --- .builds/archlinux.yml | 40 -------------------------------- .github/workflows/ci.yml | 50 ++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 13 +++++------ README.md | 6 ++--- 4 files changed, 59 insertions(+), 50 deletions(-) delete mode 100644 .builds/archlinux.yml create mode 100644 .github/workflows/ci.yml diff --git a/.builds/archlinux.yml b/.builds/archlinux.yml deleted file mode 100644 index db9df77a..00000000 --- a/.builds/archlinux.yml +++ /dev/null @@ -1,40 +0,0 @@ -image: archlinux - -packages: -- arm-none-eabi-gcc -- arm-none-eabi-newlib -- clang -- lib32-glibc -- sccache-bin - -sources: -- https://github.com/nickray/littlefs2 - -tasks: - -- rust: | - curl -sSf https://sh.rustup.rs | sh -s -- -y -q - echo 'export RUSTC_WRAPPER=/usr/bin/sccache' >> $HOME/.cargo/env - echo 'export RUSTFLAGS="-D warnings"' >> $HOME/.cargo/env - source $HOME/.cargo/env - rustup target add thumbv7em-none-eabi - -- build-thumb: | - cd littlefs2 - source $HOME/.cargo/env - cargo build --target thumbv7em-none-eabi - cargo build --target thumbv7em-none-eabi --release - -- build-desktop: | - cd littlefs2 - source $HOME/.cargo/env - cargo build - cargo build --release - -- test-desktop: | - cd littlefs2 - source $HOME/.cargo/env - cargo test - cargo test --features ui-tests - cargo test --release - cargo test --features ui-tests --release diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..7a0d1150 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,50 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + target: + - thumbv7em-none-eabi + - x86_64-unknown-linux-gnu + + steps: + - name: Install build dependencies + shell: bash + run: | + env && pwd && sudo apt-get update -y -qq && sudo apt-get install -y -qq llvm libc6-dev-i386 libclang-dev + - uses: fiam/arm-none-eabi-gcc@v1 + with: + release: "9-2020-q2" + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + target: ${{ matrix.target }} + override: true + components: llvm-tools-preview + + - uses: actions/checkout@v2 + - name: Build + run: cargo build --release --verbose + + - name: Run tests + if: matrix.target == 'x86_64-unknown-linux-gnu' + run: > + cargo test && + cargo test --features ui-tests && + cargo test --release && + cargo test --release --features ui-tests + + - name: Build Documentation + run: cargo doc --no-deps + - name: Deploy Docs + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./target/doc + diff --git a/Cargo.toml b/Cargo.toml index d0077dc8..1b129c45 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "littlefs2" description = "Idiomatic Rust API for littlefs" -version = "0.1.0-alpha.1" +version = "0.1.0" authors = ["Nicolas Stalder ", "Brandon Edens "] edition = "2018" license = "Apache-2.0 OR MIT" @@ -10,12 +10,11 @@ categories = ["embedded", "filesystem", "no-std"] repository = "https://github.com/nickray/littlefs2" [dependencies] -# aligned = { version = "0.3.2", optional = true } bitflags = "1.0.4" -# cortex-m-semihosting = "0.3.5" cty = "0.2.1" +# can't currently bump because https://github.com/japaric/heapless/issues/166 generic-array = "0.13.2" -heapless = "0.5.4" +heapless = "0.5.6" # heapless-bytes = { path = "../heapless-bytes", optional = true } # Listed as regular dependency behind feature flag, @@ -44,13 +43,13 @@ default-features = false # older version of `cstr_core` that depends on version of "1" of `memchr`. This # way the bug won't enable the "std" of `memchr` "1" (because `memchr` "1" and # `memchr` "2" are considered different crates) -version = "=0.1.0" +version = "=0.1.2" [dependencies.littlefs2-sys] -version = "0.1.5" +version = "0.1.6" [dependencies.serde] -version = "1.0" +version = "1" default-features = false features = ["derive"] optional = true diff --git a/README.md b/README.md index 22d0b149..fef56fe3 100644 --- a/README.md +++ b/README.md @@ -19,9 +19,9 @@ alt="API docs" /> - - CI + + CI