diff --git a/.github/workflows/py-bindings.yml b/.github/workflows/py-bindings.yml deleted file mode 100644 index 8db03785..00000000 --- a/.github/workflows/py-bindings.yml +++ /dev/null @@ -1,108 +0,0 @@ -# This file is based on the output of: -# -# maturin generate-ci github --pytest -m bindings/python/Cargo.toml -# -# Using maturin v1.4.0 -name: Py-bindings - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -permissions: - contents: read - -jobs: - linux: - runs-on: ubuntu-latest - strategy: - matrix: - target: [x86_64, x86, aarch64, armv7, s390x, ppc64le] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter --manifest-path bindings/python/Cargo.toml - sccache: 'true' - manylinux: auto - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - name: pytest - if: ${{ startsWith(matrix.target, 'x86_64') }} - shell: bash - run: | - set -e - pip install mla-archive --find-links dist --force-reinstall - pip install pytest - cd bindings/python && pytest - - windows: - runs-on: windows-latest - strategy: - matrix: - target: [x64, x86] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - architecture: ${{ matrix.target }} - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter --manifest-path bindings/python/Cargo.toml - sccache: 'true' - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - name: pytest - shell: bash - run: | - set -e - pip install mla-archive --find-links dist --force-reinstall - pip install pytest - cd bindings/python && pytest - - macos: - runs-on: macos-latest - strategy: - matrix: - target: [x86_64, aarch64] - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.10' - - name: Build wheels - uses: PyO3/maturin-action@v1 - with: - target: ${{ matrix.target }} - args: --release --out dist --find-interpreter --manifest-path bindings/python/Cargo.toml - sccache: 'true' - - name: Upload wheels - uses: actions/upload-artifact@v3 - with: - name: wheels - path: dist - - name: pytest - if: ${{ !startsWith(matrix.target, 'aarch64') }} - shell: bash - run: | - set -e - pip install mla-archive --find-links dist --force-reinstall - pip install pytest - cd bindings/python && pytest - diff --git a/.github/workflows/sanitize.yml b/.github/workflows/sanitize.yml deleted file mode 100644 index 20700d18..00000000 --- a/.github/workflows/sanitize.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Ensure repository healthy state over time - -permissions: - contents: read - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - -env: - CARGO_TERM_COLOR: always - -jobs: - bindings-headers-sync: - # Assert .h and .hpp bindings files are the ones generated - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - uses: actions-rs/cargo@v1 - with: - command: install - args: cbindgen - - name: Test C header - working-directory: bindings/C - run: cbindgen --config cbindgen_c.toml | diff - mla.h - - name: Test C++ header - working-directory: bindings/C - run: cbindgen --config cbindgen_cpp.toml | diff - mla.hpp - - changelog-format: - # Ensure CHANGELOGs respect the KeepAChangelog format - strategy: - matrix: - changelog: [curve25519-parser, mla, mlar] - include: - - changelog: curve25519-parser - path: curve25519-parser - - changelog: mla - path: mla - - changelog: mlar - path: mlar - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Get ${{ matrix.changelog }} Changelog Entry - uses: mindsers/changelog-reader-action@v2 - id: changelog_reader - with: - # Check format for the last 10 entries - validation_depth: 10 - path: ${{ matrix.path }}/CHANGELOG.md - - name: Information - run: | - echo -e "\e[1mVersion\e[0m ${{ steps.changelog_reader.outputs.version }}" - echo -e "\e[1mStatus\e[0m ${{ steps.changelog_reader.outputs.status }}" - echo -en "\e[1mBody\e[0m" - cat << 'EOF' - ${{ steps.changelog_reader.outputs.changes }} - EOF diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1a05bf3d..38864f34 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -13,63 +13,6 @@ env: CARGO_TERM_COLOR: always jobs: - build: - strategy: - matrix: - build: [linux, macos, windows] - include: - - build: linux - os: ubuntu-latest - - build: macos - os: macos-latest - - build: windows - os: windows-latest - extension: .exe - - runs-on: ${{matrix.os}} - - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Build - env: - RUSTFLAGS: -D warnings - uses: actions-rs/cargo@v1 - with: - command: build - args: --release --all --exclude mla-fuzz-afl --verbose - - name: Run tests - run: cargo test --all --exclude mla-fuzz-afl --release --verbose - - name: Upload resulting 'mlar' - uses: actions/upload-artifact@v1 - with: - name: ${{ matrix.build }} - path: ./target/release/mlar${{ matrix.extension }} - - long-tests: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Run long tests - run: cd mla && cargo test --release -- --ignored - - all-features: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Run long tests - run: cargo test --all-features --all --exclude mla-fuzz-afl --exclude mla-bindings-c --release - test-bindings-c-cpp-linux: runs-on: ubuntu-latest steps: @@ -107,10 +50,11 @@ jobs: - uses: actions/checkout@v2 - uses: actions-rs/toolchain@v1 with: - # Avoid a regression of Cargo, breaking at link time - toolchain: 1.69 - default: true + toolchain: stable target: ${{ matrix.target }} + - name: "Display necessary libs" + working-directory: bindings/C + run: cargo rustc -- --print=native-static-libs - uses: microsoft/setup-msbuild@v1.0.2 - name: Compile C/CPP bindings test program for Windows working-directory: bindings/C/tests/windows-msvc/ @@ -119,80 +63,4 @@ jobs: working-directory: bindings/C/tests/windows-msvc/ run: ./${{ matrix.msvc_platform }}/${{ matrix.version }}/mla-bindings-test.exe - afl-build: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Install dependencies - run: sudo apt-get install llvm - - name: Install cargo-afl binary crate - uses: actions-rs/install@v0.1 - with: - crate: cargo-afl - version: latest - use-tool-cache: true - - name: Test AFL build - env: - RUSTFLAGS: -D warnings - run: cargo afl build - - fmt: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: rustfmt - - name: Check format - run: cargo fmt --all -- --check - - audit: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Security audit - uses: actions-rs/audit-check@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - clippy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: clippy - - name: Install dependencies - run: sudo apt-get install llvm - - name: Install cargo-afl binary crate - uses: actions-rs/install@v0.1 - with: - crate: cargo-afl - version: latest - use-tool-cache: true - - uses: actions-rs/cargo@v1 - with: - command: clippy - args: --all-targets -- -D warnings - - publish-dry-run: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Dry-run publish curve25519-parser - run: cd curve25519-parser && cargo publish --dry-run - - name: Dry-run publish mla - run: cd mla && cargo publish --dry-run - - name: Dry-run publish mlar - run: cd mlar && cargo publish --dry-run - \ No newline at end of file + \ No newline at end of file diff --git a/bindings/C/tests/windows-msvc/mla-bindings-test.vcxproj b/bindings/C/tests/windows-msvc/mla-bindings-test.vcxproj index 627d02a4..35fd3716 100644 --- a/bindings/C/tests/windows-msvc/mla-bindings-test.vcxproj +++ b/bindings/C/tests/windows-msvc/mla-bindings-test.vcxproj @@ -175,7 +175,7 @@ Console DebugFull - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);Ws2_32.lib;Userenv.lib;Bcrypt.lib + ntdll.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);Ws2_32.lib;Userenv.lib;Bcrypt.lib $(SolutionDir)\..\..\..\..\target\i686-pc-windows-msvc\debug @@ -195,7 +195,7 @@ Console DebugFull - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);Ws2_32.lib;Userenv.lib;Bcrypt.lib + ntdll.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);Ws2_32.lib;Userenv.lib;Bcrypt.lib $(SolutionDir)\..\..\..\..\target\i686-pc-windows-msvc\debug @@ -219,7 +219,7 @@ true true $(SolutionDir)\..\..\..\..\target\i686-pc-windows-msvc\release - %(AdditionalDependencies);Bcrypt.lib + %(AdditionalDependencies);Bcrypt.lib;ntdll.lib if not exist "$(SolutionDir)\..\..\..\..\target\i686-pc-windows-msvc\release\mla.lib" cargo build --target=i686-pc-windows-msvc --release @@ -242,7 +242,7 @@ true true $(SolutionDir)\..\..\..\..\target\i686-pc-windows-msvc\release - %(AdditionalDependencies);Bcrypt.lib + %(AdditionalDependencies);Bcrypt.lib;ntdll.lib if not exist "$(SolutionDir)\..\..\..\..\target\i686-pc-windows-msvc\release\mla.lib" cargo build --target=i686-pc-windows-msvc --release @@ -261,7 +261,7 @@ Console DebugFull - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);Ws2_32.lib;Userenv.lib;;Bcrypt.lib + ntdll.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);Ws2_32.lib;Userenv.lib;;Bcrypt.lib $(SolutionDir)\..\..\..\..\target\x86_64-pc-windows-msvc\debug @@ -281,7 +281,7 @@ Console DebugFull - kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);Ws2_32.lib;Userenv.lib;Bcrypt.lib + ntdll.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies);Ws2_32.lib;Userenv.lib;Bcrypt.lib $(SolutionDir)\..\..\..\..\target\x86_64-pc-windows-msvc\debug @@ -305,7 +305,7 @@ true true $(SolutionDir)\..\..\..\..\target\x86_64-pc-windows-msvc\release - %(AdditionalDependencies);Bcrypt.lib + %(AdditionalDependencies);Bcrypt.lib;ntdll.lib if not exist "$(SolutionDir)\..\..\..\..\target\x86_64-pc-windows-msvc\release\mla.lib" cargo build --target=x86_64-pc-windows-msvc --release @@ -328,7 +328,7 @@ true true $(SolutionDir)\..\..\..\..\target\x86_64-pc-windows-msvc\release - %(AdditionalDependencies);Bcrypt.lib + %(AdditionalDependencies);Bcrypt.lib;ntdll.lib if not exist "$(SolutionDir)\..\..\..\..\target\x86_64-pc-windows-msvc\release\mla.lib" cargo build --target=x86_64-pc-windows-msvc --release diff --git a/mla/Cargo.toml b/mla/Cargo.toml index f9ebbb3f..173aa305 100644 --- a/mla/Cargo.toml +++ b/mla/Cargo.toml @@ -9,8 +9,6 @@ homepage = "https://github.com/ANSSI-FR/MLA" repository = "https://github.com/ANSSI-FR/MLA" readme = "../README.md" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] rand = { version = "0.8", default-features = false, features = ["getrandom", "std"]} rand_chacha = { version = "0.3", default-features = false}