Skip to content

Commit 9e3f715

Browse files
authored
CI: test on 64-bit Windows (GNU) (#19)
Splits the GitHub Actions configs into `linux`, `windows`, and `cross` jobs, each configured to test certain targets. Tests Windows in the 64-bit environment only, as it seems it's not possible to test MINGW32 builds on 64-bit Windows: rust-lang/rust#33535 (comment) > The compiler only assumes that it can run executables for its own > platform, which in this case is x86_64-pc-windows-gnu. That means that > the compiler is running a 64-bit mingw gcc trying to generate a 32-bit > executable. The mingw gcc builds, however, do not support this.
1 parent 224ecbe commit 9e3f715

File tree

6 files changed

+158
-77
lines changed

6 files changed

+158
-77
lines changed

.github/workflows/md5.yml

Lines changed: 33 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,49 +8,67 @@ on:
88
push:
99
branches: master
1010

11+
defaults:
12+
run:
13+
working-directory: md5
14+
1115
env:
1216
CARGO_INCREMENTAL: 0
1317
RUSTFLAGS: "-Dwarnings"
1418

1519
jobs:
16-
test:
20+
# Linux tests
21+
linux:
1722
strategy:
1823
matrix:
1924
include:
2025
# 32-bit Linux/x86
2126
- target: i686-unknown-linux-gnu
22-
platform: ubuntu-latest
23-
toolchain: 1.41.0 # MSRV
27+
toolchain: 1.43.0 # MSRV
2428
deps: sudo apt install gcc-multilib
2529
- target: i686-unknown-linux-gnu
26-
platform: ubuntu-latest
2730
toolchain: stable
2831
deps: sudo apt install gcc-multilib
2932

3033
# 64-bit Linux/x86_64
3134
- target: x86_64-unknown-linux-gnu
32-
platform: ubuntu-latest
33-
toolchain: 1.41.0 # MSRV
35+
toolchain: 1.43.0 # MSRV
3436
deps: true
3537
- target: x86_64-unknown-linux-gnu
36-
platform: ubuntu-latest
3738
toolchain: stable
3839
deps: true
3940

40-
runs-on: ${{ matrix.platform }}
41+
runs-on: ubuntu-latest
4142
steps:
4243
- uses: actions/checkout@v1
43-
- run: ${{ matrix.deps }}
4444
- uses: actions-rs/toolchain@v1
4545
with:
4646
profile: minimal
4747
toolchain: ${{ matrix.toolchain }}
4848
target: ${{ matrix.target }}
4949
override: true
50-
# NOTE: using `marcopolo/cargo` fork to support the `working-directory` attribute
51-
# See: https://github.com/actions-rs/cargo/pull/59
52-
- uses: marcopolo/cargo@master
50+
- run: ${{ matrix.deps }}
51+
- run: cargo test --target ${{ matrix.target }} --release
52+
53+
# Windows tests
54+
windows:
55+
strategy:
56+
matrix:
57+
include:
58+
# 64-bit Windows (GNU)
59+
- target: x86_64-pc-windows-gnu
60+
toolchain: 1.43.0 # MSRV
61+
- target: x86_64-pc-windows-gnu
62+
toolchain: stable
63+
64+
runs-on: windows-latest
65+
steps:
66+
- uses: actions/checkout@v1
67+
- uses: actions-rs/toolchain@v1
5368
with:
54-
command: test
55-
working-directory: md5
56-
args: --target ${{ matrix.target }} --release
69+
profile: minimal
70+
toolchain: ${{ matrix.toolchain }}
71+
target: ${{ matrix.target }}
72+
override: true
73+
- uses: msys2/setup-msys2@v2
74+
- run: cargo test --target ${{ matrix.target }} --release

.github/workflows/sha1.yml

Lines changed: 52 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,66 +8,88 @@ on:
88
push:
99
branches: master
1010

11+
defaults:
12+
run:
13+
working-directory: sha1
14+
1115
env:
1216
CARGO_INCREMENTAL: 0
1317
RUSTFLAGS: "-Dwarnings"
1418

1519
jobs:
16-
test:
20+
# Linux tests
21+
linux:
1722
strategy:
1823
matrix:
1924
include:
2025
# 32-bit Linux/x86
2126
- target: i686-unknown-linux-gnu
22-
platform: ubuntu-latest
23-
rust: 1.41.0 # MSRV
24-
use_cross: false
27+
rust: 1.43.0 # MSRV
2528
deps: sudo apt install gcc-multilib
2629
- target: i686-unknown-linux-gnu
27-
platform: ubuntu-latest
2830
rust: stable
29-
use_cross: false
3031
deps: sudo apt install gcc-multilib
3132

3233
# 64-bit Linux/x86_64
3334
- target: x86_64-unknown-linux-gnu
34-
platform: ubuntu-latest
35-
rust: 1.41.0 # MSRV
36-
use_cross: false
37-
deps: true
35+
rust: 1.43.0 # MSRV
3836
- target: x86_64-unknown-linux-gnu
39-
platform: ubuntu-latest
4037
rust: stable
41-
use_cross: false
42-
deps: true
4338

39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v1
42+
- uses: actions-rs/toolchain@v1
43+
with:
44+
profile: minimal
45+
toolchain: ${{ matrix.rust }}
46+
target: ${{ matrix.target }}
47+
override: true
48+
- run: ${{ matrix.deps }}
49+
- run: cargo test --target ${{ matrix.target }} --release
50+
51+
# Windows tests
52+
windows:
53+
strategy:
54+
matrix:
55+
include:
56+
# 64-bit Windows (GNU)
57+
- target: x86_64-pc-windows-gnu
58+
toolchain: 1.43.0 # MSRV
59+
- target: x86_64-pc-windows-gnu
60+
toolchain: stable
61+
62+
runs-on: windows-latest
63+
steps:
64+
- uses: actions/checkout@v1
65+
- uses: actions-rs/toolchain@v1
66+
with:
67+
profile: minimal
68+
toolchain: ${{ matrix.toolchain }}
69+
target: ${{ matrix.target }}
70+
override: true
71+
- uses: msys2/setup-msys2@v2
72+
- run: cargo test --target ${{ matrix.target }} --release
73+
74+
# Cross-compiled tests
75+
cross:
76+
strategy:
77+
matrix:
78+
include:
4479
# ARM64
4580
- target: aarch64-unknown-linux-gnu
46-
platform: ubuntu-latest
47-
rust: 1.41.0 # MSRV
48-
use_cross: true
49-
deps: true
81+
rust: 1.43.0 # MSRV
5082
- target: aarch64-unknown-linux-gnu
51-
platform: ubuntu-latest
5283
rust: stable
53-
use_cross: true
54-
deps: true
5584

56-
runs-on: ${{ matrix.platform }}
85+
runs-on: ubuntu-latest
5786
steps:
5887
- uses: actions/checkout@v1
59-
- run: ${{ matrix.deps }}
6088
- uses: actions-rs/toolchain@v1
6189
with:
6290
profile: minimal
6391
toolchain: ${{ matrix.rust }}
6492
target: ${{ matrix.target }}
6593
override: true
66-
# NOTE: using `marcopolo/cargo` fork to support the `working-directory` attribute
67-
# See: https://github.com/actions-rs/cargo/pull/59
68-
- uses: marcopolo/cargo@master
69-
with:
70-
command: test
71-
working-directory: sha1
72-
use-cross: ${{ matrix.use_cross }}
73-
args: --target ${{ matrix.target }} --release
94+
- run: cargo install cross
95+
- run: cross test --target ${{ matrix.target }} --release

.github/workflows/sha2.yml

Lines changed: 48 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,61 +17,79 @@ env:
1717
RUSTFLAGS: "-Dwarnings"
1818

1919
jobs:
20-
test:
20+
# Linux tests
21+
linux:
2122
strategy:
2223
matrix:
2324
include:
2425
# 32-bit Linux/x86
2526
- target: i686-unknown-linux-gnu
26-
platform: ubuntu-latest
27-
rust: 1.41.0 # MSRV
28-
use_cross: false
27+
rust: 1.43.0 # MSRV
2928
deps: sudo apt install gcc-multilib
3029
- target: i686-unknown-linux-gnu
31-
platform: ubuntu-latest
3230
rust: stable
33-
use_cross: false
3431
deps: sudo apt install gcc-multilib
3532

3633
# 64-bit Linux/x86_64
3734
- target: x86_64-unknown-linux-gnu
38-
platform: ubuntu-latest
39-
rust: 1.41.0 # MSRV
40-
use_cross: false
41-
deps: true
35+
rust: 1.43.0 # MSRV
4236
- target: x86_64-unknown-linux-gnu
43-
platform: ubuntu-latest
4437
rust: stable
45-
use_cross: false
46-
deps: true
4738

39+
runs-on: ubuntu-latest
40+
steps:
41+
- uses: actions/checkout@v1
42+
- uses: actions-rs/toolchain@v1
43+
with:
44+
profile: minimal
45+
toolchain: ${{ matrix.rust }}
46+
target: ${{ matrix.target }}
47+
override: true
48+
- run: ${{ matrix.deps }}
49+
- run: cargo test --target ${{ matrix.target }} --release
50+
51+
# Windows tests
52+
windows:
53+
strategy:
54+
matrix:
55+
include:
56+
# 64-bit Windows (GNU)
57+
- target: x86_64-pc-windows-gnu
58+
toolchain: 1.43.0 # MSRV
59+
- target: x86_64-pc-windows-gnu
60+
toolchain: stable
61+
62+
runs-on: windows-latest
63+
steps:
64+
- uses: actions/checkout@v1
65+
- uses: actions-rs/toolchain@v1
66+
with:
67+
profile: minimal
68+
toolchain: ${{ matrix.toolchain }}
69+
target: ${{ matrix.target }}
70+
override: true
71+
- uses: msys2/setup-msys2@v2
72+
- run: cargo test --target ${{ matrix.target }} --release
73+
74+
# Cross-compiled tests
75+
cross:
76+
strategy:
77+
matrix:
78+
include:
4879
# ARM64
4980
- target: aarch64-unknown-linux-gnu
50-
platform: ubuntu-latest
51-
rust: 1.41.0 # MSRV
52-
use_cross: true
53-
deps: true
81+
rust: 1.43.0 # MSRV
5482
- target: aarch64-unknown-linux-gnu
55-
platform: ubuntu-latest
5683
rust: stable
57-
use_cross: true
58-
deps: true
5984

60-
runs-on: ${{ matrix.platform }}
85+
runs-on: ubuntu-latest
6186
steps:
6287
- uses: actions/checkout@v1
63-
- run: ${{ matrix.deps }}
6488
- uses: actions-rs/toolchain@v1
6589
with:
6690
profile: minimal
6791
toolchain: ${{ matrix.rust }}
6892
target: ${{ matrix.target }}
6993
override: true
70-
# NOTE: using `marcopolo/cargo` fork to support the `working-directory` attribute
71-
# See: https://github.com/actions-rs/cargo/pull/59
72-
- uses: marcopolo/cargo@master
73-
with:
74-
command: test
75-
working-directory: sha1
76-
use-cross: ${{ matrix.use_cross }}
77-
args: --target ${{ matrix.target }} --release
94+
- run: cargo install cross
95+
- run: cross test --target ${{ matrix.target }} --release

.github/workflows/workspace.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions-rs/toolchain@v1
1818
with:
1919
profile: minimal
20-
toolchain: 1.41.0 # MSRV
20+
toolchain: 1.43.0 # MSRV
2121
components: clippy
2222
override: true
2323
- run: cargo clippy --all -- -D warnings

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# RustCrypto: ASM hashes [![Project Chat][chat-image]][chat-link]
1+
# RustCrypto: ASM hashes ![Rust Version][rustc-image] [![Project Chat][chat-image]][chat-link]
22

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

12+
## Supported Platforms
13+
14+
All crates are tested on the following platforms:
15+
16+
- Linux (32-bit and 64-bit x86)
17+
- Windows (64-bit x86, GNU only)
18+
- ARM64 (except `md5`, which is x86 only)
19+
20+
Windows MSVC builds are known to be broken. See [#17].
21+
22+
## Minimum Supported Rust Version
23+
24+
All crates in this repository support **Rust 1.43** or higher.
25+
26+
In the future when the minimum supported Rust version is changed,
27+
it will be accompanied by a minor version bump.
28+
1229
## License
1330

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

2239
[//]: # (badges)
2340

41+
[rustc-image]: https://img.shields.io/badge/rustc-1.43+-blue.svg
2442
[chat-image]: https://img.shields.io/badge/zulip-join_chat-blue.svg
2543
[chat-link]: https://rustcrypto.zulipchat.com/#narrow/stream/260041-hashes
44+
45+
[//]: # (general links)
46+
47+
[#17]: https://github.com/RustCrypto/asm-hashes/issues/17

0 commit comments

Comments
 (0)