From 74f4ee180c847528cd28361234db53a73e131c5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kriv=C3=A1cs=20Schr=C3=B8der?= Date: Mon, 27 Mar 2023 11:16:43 +0200 Subject: [PATCH 1/3] Fix bug in `impl_zeroize.rs` --- src/impl_zeroize.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 +} From 1188b89fa28c6780289d3840e5be0b31e8d8f99e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kriv=C3=A1cs=20Schr=C3=B8der?= Date: Mon, 27 Mar 2023 11:17:26 +0200 Subject: [PATCH 2/3] Switch from TravisCI to GitHub Actions --- .github/workflows/CI.yml | 54 ++++++++++++++++++++++++++++++++++++++++ .travis.yml | 18 -------------- README.md | 2 +- 3 files changed, 55 insertions(+), 19 deletions(-) create mode 100644 .github/workflows/CI.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000000..2a86904981 --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,54 @@ +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@stable + + - name: Build + run: cargo build + + - name: Test + run: cargo test + + - name: Build (all features) + run: cargo build --all-features + + - name: Test (all features) + run: cargo 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. From 18487f3c59c9bfad684c8b2958edf42115616756 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20Kriv=C3=A1cs=20Schr=C3=B8der?= Date: Mon, 27 Mar 2023 20:27:24 +0200 Subject: [PATCH 3/3] Run tests with Miri instead --- .github/workflows/CI.yml | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2a86904981..2db6b4ba1b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,19 +14,15 @@ jobs: uses: actions/checkout@v3 - name: Install Rust - uses: dtolnay/rust-toolchain@stable - - - name: Build - run: cargo build + uses: dtolnay/rust-toolchain@nightly - - name: Test - run: cargo test - - - name: Build (all features) - run: cargo build --all-features + - name: Install Miri + run: | + rustup toolchain install nightly --component miri + cargo miri setup - - name: Test (all features) - run: cargo test --all-features + - name: Test with Miri + run: cargo miri test --all-features deploy_docs: name: Deploy documentation