diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000000..2db6b4ba1b --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,50 @@ +name: Build + +on: [push, pull_request] + +env: + CARGO_TERM_COLOR: always + +jobs: + build_test: + name: Build and Test + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Rust + uses: dtolnay/rust-toolchain@nightly + + - name: Install Miri + run: | + rustup toolchain install nightly --component miri + cargo miri setup + + - name: Test with Miri + run: cargo miri test --all-features + + deploy_docs: + name: Deploy documentation + runs-on: ubuntu-latest + needs: build_test + if: github.ref == 'refs/heads/master' && github.event_name != 'pull_request' + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + + - name: Build documentation + run: cargo doc --all-features + + - name: Finalize documentation + run: | + echo "" > target/doc/index.html + touch target/doc/.nojekyll + + - name: Deploy + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: target/doc diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9dc8f2c845..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -language: rust -script: - - cd $TRAVIS_BUILD_DIR - - cargo build - - cargo test - - cargo build --all-features - - cargo test --all-features -after_success: |- - [ $TRAVIS_BRANCH = master ] && - [ $TRAVIS_PULL_REQUEST = false ] && - cargo doc --all-features && - echo "" > target/doc/index.html && - sudo pip install ghp-import && - ghp-import -n target/doc && - git push -fq https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages -env: - global: - secure: te+DVowxg7YWHJHKRE2eEKEg5lK8IwK4aeKZ6rsDMaTcQFzP+jzSYJiodVuDMXy45sfDMCnkWmVmpfXFI5tCLBSqTDXXOZ0UpE2f4fI0d3inH6McEoXNM43HNZqvEWj6Uc4PzTSzkywcAhg39I08PRbp5zzdj+UhB0Ty++Twwjpipr2KQMNmu9RZEwPtbyjqE69yXkDWy1oM3o51uPnpK0RUH+ZE+B0StTG6CMzVY3gW+kQX96Ow+LYkhgn/YjfubVvKO7QHz8Nd1hOxg78tn1ZTHIazN7p3bJejpsZoU92cNCcx1xM0vV/rXNN1pLxzJOBxNC9tU9FNJAaLsg5kAVGZi8Xvu62nUmkpzki71/nilHBAUxJHGIyv0H52p4DyITEN8NzR5WkqN4qBv814Dpvna1Ua3TPqiYWP/LBb+xM27DuPHKuOifePNWehE84qhQMPgArQyiNCgfKaKbaiFO+J4jiUfEV/1aztuEFyHftLoRYstmHfMkhwYHfSf683QGjlqqoL3SFClp1sKAp8WO5b5ZasT9fOGaqPWi8g28/ZGIu67wocT/hJvXxwozAycsXV36JVHs1ab/ujRYMUbcnObx8E5taKLKhWn2jYWsrJ99bUag7F6wTz1erG0eboScTD8QgVY7Zfvz0Eh1MfePOhEJGZfETR80BypC9fZhY= diff --git a/README.md b/README.md index 6e2cb21266..ff1ccc2452 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ [![Crates.io](https://img.shields.io/crates/v/generic-array.svg)](https://crates.io/crates/generic-array) -[![Build Status](https://travis-ci.org/fizyk20/generic-array.svg?branch=master)](https://travis-ci.org/fizyk20/generic-array) +[![Build Status](https://github.com/fizyk20/generic-array/actions/workflows/CI.yml/badge.svg)](https://github.com/fizyk20/generic-array/actions/workflows/CI.yml) # generic-array This crate implements generic array types for Rust. diff --git a/src/impl_zeroize.rs b/src/impl_zeroize.rs index ef4ac0fa12..a22dd5e7b8 100644 --- a/src/impl_zeroize.rs +++ b/src/impl_zeroize.rs @@ -1,4 +1,4 @@ -use {ArrayLength, GenericArray}; +use crate::{ArrayLength, GenericArray}; use zeroize::Zeroize; @@ -22,4 +22,4 @@ mod tests { assert_eq!(array[0], 0); assert_eq!(array[1], 0); } -} \ No newline at end of file +}