Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: test on 64-bit Windows (GNU) #19

Merged
merged 3 commits into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 33 additions & 15 deletions .github/workflows/md5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,49 +8,67 @@ on:
push:
branches: master

defaults:
run:
working-directory: md5

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"

jobs:
test:
# Linux tests
linux:
strategy:
matrix:
include:
# 32-bit Linux/x86
- target: i686-unknown-linux-gnu
platform: ubuntu-latest
toolchain: 1.41.0 # MSRV
toolchain: 1.43.0 # MSRV
deps: sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
platform: ubuntu-latest
toolchain: stable
deps: sudo apt install gcc-multilib

# 64-bit Linux/x86_64
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
toolchain: 1.41.0 # MSRV
toolchain: 1.43.0 # MSRV
deps: true
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
toolchain: stable
deps: true

runs-on: ${{ matrix.platform }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: ${{ matrix.deps }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
override: true
# NOTE: using `marcopolo/cargo` fork to support the `working-directory` attribute
# See: https://github.com/actions-rs/cargo/pull/59
- uses: marcopolo/cargo@master
- run: ${{ matrix.deps }}
- run: cargo test --target ${{ matrix.target }} --release

# Windows tests
windows:
strategy:
matrix:
include:
# 64-bit Windows (GNU)
- target: x86_64-pc-windows-gnu
toolchain: 1.43.0 # MSRV
- target: x86_64-pc-windows-gnu
toolchain: stable

runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
command: test
working-directory: md5
args: --target ${{ matrix.target }} --release
profile: minimal
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
override: true
- uses: msys2/setup-msys2@v2
- run: cargo test --target ${{ matrix.target }} --release
82 changes: 52 additions & 30 deletions .github/workflows/sha1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,66 +8,88 @@ on:
push:
branches: master

defaults:
run:
working-directory: sha1

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"

jobs:
test:
# Linux tests
linux:
strategy:
matrix:
include:
# 32-bit Linux/x86
- target: i686-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.41.0 # MSRV
use_cross: false
rust: 1.43.0 # MSRV
deps: sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
platform: ubuntu-latest
rust: stable
use_cross: false
deps: sudo apt install gcc-multilib

# 64-bit Linux/x86_64
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.41.0 # MSRV
use_cross: false
deps: true
rust: 1.43.0 # MSRV
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
rust: stable
use_cross: false
deps: true

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- run: ${{ matrix.deps }}
- run: cargo test --target ${{ matrix.target }} --release

# Windows tests
windows:
strategy:
matrix:
include:
# 64-bit Windows (GNU)
- target: x86_64-pc-windows-gnu
toolchain: 1.43.0 # MSRV
- target: x86_64-pc-windows-gnu
toolchain: stable

runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
override: true
- uses: msys2/setup-msys2@v2
- run: cargo test --target ${{ matrix.target }} --release

# Cross-compiled tests
cross:
strategy:
matrix:
include:
# ARM64
- target: aarch64-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.41.0 # MSRV
use_cross: true
deps: true
rust: 1.43.0 # MSRV
- target: aarch64-unknown-linux-gnu
platform: ubuntu-latest
rust: stable
use_cross: true
deps: true

runs-on: ${{ matrix.platform }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: ${{ matrix.deps }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
# NOTE: using `marcopolo/cargo` fork to support the `working-directory` attribute
# See: https://github.com/actions-rs/cargo/pull/59
- uses: marcopolo/cargo@master
with:
command: test
working-directory: sha1
use-cross: ${{ matrix.use_cross }}
args: --target ${{ matrix.target }} --release
- run: cargo install cross
- run: cross test --target ${{ matrix.target }} --release
78 changes: 48 additions & 30 deletions .github/workflows/sha2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,61 +17,79 @@ env:
RUSTFLAGS: "-Dwarnings"

jobs:
test:
# Linux tests
linux:
strategy:
matrix:
include:
# 32-bit Linux/x86
- target: i686-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.41.0 # MSRV
use_cross: false
rust: 1.43.0 # MSRV
deps: sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
platform: ubuntu-latest
rust: stable
use_cross: false
deps: sudo apt install gcc-multilib

# 64-bit Linux/x86_64
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.41.0 # MSRV
use_cross: false
deps: true
rust: 1.43.0 # MSRV
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
rust: stable
use_cross: false
deps: true

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- run: ${{ matrix.deps }}
- run: cargo test --target ${{ matrix.target }} --release

# Windows tests
windows:
strategy:
matrix:
include:
# 64-bit Windows (GNU)
- target: x86_64-pc-windows-gnu
toolchain: 1.43.0 # MSRV
- target: x86_64-pc-windows-gnu
toolchain: stable

runs-on: windows-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
override: true
- uses: msys2/setup-msys2@v2
- run: cargo test --target ${{ matrix.target }} --release

# Cross-compiled tests
cross:
strategy:
matrix:
include:
# ARM64
- target: aarch64-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.41.0 # MSRV
use_cross: true
deps: true
rust: 1.43.0 # MSRV
- target: aarch64-unknown-linux-gnu
platform: ubuntu-latest
rust: stable
use_cross: true
deps: true

runs-on: ${{ matrix.platform }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: ${{ matrix.deps }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
# NOTE: using `marcopolo/cargo` fork to support the `working-directory` attribute
# See: https://github.com/actions-rs/cargo/pull/59
- uses: marcopolo/cargo@master
with:
command: test
working-directory: sha1
use-cross: ${{ matrix.use_cross }}
args: --target ${{ matrix.target }} --release
- run: cargo install cross
- run: cross test --target ${{ matrix.target }} --release
2 changes: 1 addition & 1 deletion .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.41.0 # MSRV
toolchain: 1.43.0 # MSRV
components: clippy
override: true
- run: cargo clippy --all -- -D warnings
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 23 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RustCrypto: ASM hashes [![Project Chat][chat-image]][chat-link]
# RustCrypto: ASM hashes ![Rust Version][rustc-image] [![Project Chat][chat-image]][chat-link]

Assembly implementations of hash functions core functionality based on code from
[Project Nayuki](https://www.nayuki.io/).
Expand All @@ -9,6 +9,23 @@ functionality please refer to the crates from
enabled `asm` feature `md5`, `sha-1`, `sha2` and `whirlpool` crates will use
code from this repository.

## Supported Platforms

All crates are tested on the following platforms:

- Linux (32-bit and 64-bit x86)
- Windows (64-bit x86, GNU only)
- ARM64 (except `md5`, which is x86 only)

Windows MSVC builds are known to be broken. See [#17].

## Minimum Supported Rust Version

All crates in this repository support **Rust 1.43** or higher.

In the future when the minimum supported Rust version is changed,
it will be accompanied by a minor version bump.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add comment about MSVC targets?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some platform notes in 47d0fd7

## License

All crates licensed under the [MIT license](http://opensource.org/licenses/MIT).
Expand All @@ -21,5 +38,10 @@ dual licensed as above, without any additional terms or conditions.

[//]: # (badges)

[rustc-image]: https://img.shields.io/badge/rustc-1.43+-blue.svg
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260041-hashes

[//]: # (general links)

[#17]: https://github.com/RustCrypto/asm-hashes/issues/17