From c0203e0d6c01e8224a13d1c51da61110f3dcac36 Mon Sep 17 00:00:00 2001 From: gogo Date: Sat, 20 Jan 2024 20:38:15 +0100 Subject: [PATCH] fix rust stable --- .../workflows/linux-tests-nightly-rust.yml | 52 +++++++++++++++++++ ...-tests.yml => linux-tests-stable-rust.yml} | 2 +- cryptatools-core/src/utils/alphabets.rs | 4 -- 3 files changed, 53 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/linux-tests-nightly-rust.yml rename .github/workflows/{linux-tests.yml => linux-tests-stable-rust.yml} (97%) diff --git a/.github/workflows/linux-tests-nightly-rust.yml b/.github/workflows/linux-tests-nightly-rust.yml new file mode 100644 index 000000000..1add7897b --- /dev/null +++ b/.github/workflows/linux-tests-nightly-rust.yml @@ -0,0 +1,52 @@ +name: Linux Tests On Rust Nightly +on: [push] + +jobs: + test: + strategy: + matrix: + os: [ubuntu-latest] + runs-on: + - ubuntu-latest + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + + - uses: actions-rs/cargo@v1 + with: + command: build + args: --release --all-features + + - name: Install dependencies + run: | + pip install setuptools wheel + + - name: Build cryptatools + run: cargo build --all + + - name: Install cryptatools clis + run: cargo install --path ./cryptatools-cli + + - name: Run tests + run: | + cargo test --all + + - name: Generate documentation + run: | + cargo doc --package cryptatools-core --workspace --no-deps + + - name: Build and install Python Bindings + run: | + python3 ./cryptatools-core/setup.py bdist_wheel --verbose ; + pip3 install ./dist/* --force-reinstall ; + + - name: Test python bindings + run: | + python3 ./cryptatools-core/binding-testing/testing.py ; diff --git a/.github/workflows/linux-tests.yml b/.github/workflows/linux-tests-stable-rust.yml similarity index 97% rename from .github/workflows/linux-tests.yml rename to .github/workflows/linux-tests-stable-rust.yml index a099db748..6e6c1fb6c 100644 --- a/.github/workflows/linux-tests.yml +++ b/.github/workflows/linux-tests-stable-rust.yml @@ -16,7 +16,7 @@ jobs: - uses: actions-rs/toolchain@v1 with: - toolchain: nightly + toolchain: stable override: true - uses: actions-rs/cargo@v1 diff --git a/cryptatools-core/src/utils/alphabets.rs b/cryptatools-core/src/utils/alphabets.rs index 04b15fd90..610f60fa0 100644 --- a/cryptatools-core/src/utils/alphabets.rs +++ b/cryptatools-core/src/utils/alphabets.rs @@ -1,6 +1,5 @@ use itertools::Itertools; use bimap::btree::BiBTreeMap; -//use std::assert_matches::assert_matches; ///``` /// use cryptatools_core::utils::{convert::Encode, alphabets::split_bytes_by_characters_representation, alphabets::Alphabet}; @@ -873,9 +872,6 @@ impl Alphabet { /// Returns: a converted human readable set of character text in the same order as the original unconverted text. /// /// ``` - /// #![feature(assert_matches)] - /// - /// use std::assert_matches::assert_matches; /// use cryptatools_core::utils::{convert::Encode, alphabets::split_bytes_by_characters_representation, alphabets::Alphabet}; /// use cryptatools_core::utils::alphabets::Encoding; ///