Skip to content

Commit 642dbf1

Browse files
committed
CI: test on 64-bit Windows (GNU)
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 642dbf1

File tree

6 files changed

+143
-70
lines changed

6 files changed

+143
-70
lines changed

.github/workflows/md5.yml

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,37 @@ 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
4344
- run: ${{ matrix.deps }}
@@ -47,10 +48,27 @@ jobs:
4748
toolchain: ${{ matrix.toolchain }}
4849
target: ${{ matrix.target }}
4950
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
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: msys2/setup-msys2@v2
68+
- uses: actions-rs/toolchain@v1
5369
with:
54-
command: test
55-
working-directory: md5
56-
args: --target ${{ matrix.target }} --release
70+
profile: minimal
71+
toolchain: ${{ matrix.toolchain }}
72+
target: ${{ matrix.target }}
73+
override: true
74+
- run: cargo test --target ${{ matrix.target }} --release

.github/workflows/sha1.yml

Lines changed: 52 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,52 +8,83 @@ 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
35+
rust: 1.43.0 # MSRV
3736
deps: true
3837
- target: x86_64-unknown-linux-gnu
39-
platform: ubuntu-latest
4038
rust: stable
41-
use_cross: false
4239
deps: true
4340

41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v1
44+
- run: ${{ matrix.deps }}
45+
- uses: actions-rs/toolchain@v1
46+
with:
47+
profile: minimal
48+
toolchain: ${{ matrix.rust }}
49+
target: ${{ matrix.target }}
50+
override: true
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: msys2/setup-msys2@v2
68+
- uses: actions-rs/toolchain@v1
69+
with:
70+
profile: minimal
71+
toolchain: ${{ matrix.toolchain }}
72+
target: ${{ matrix.target }}
73+
override: true
74+
- run: cargo test --target ${{ matrix.target }} --release
75+
76+
# Cross-compiled tests
77+
cross:
78+
strategy:
79+
matrix:
80+
include:
4481
# ARM64
4582
- target: aarch64-unknown-linux-gnu
46-
platform: ubuntu-latest
47-
rust: 1.41.0 # MSRV
48-
use_cross: true
49-
deps: true
83+
rust: 1.43.0 # MSRV
5084
- target: aarch64-unknown-linux-gnu
51-
platform: ubuntu-latest
5285
rust: stable
53-
use_cross: true
54-
deps: true
5586

56-
runs-on: ${{ matrix.platform }}
87+
runs-on: ubuntu-latest
5788
steps:
5889
- uses: actions/checkout@v1
5990
- run: ${{ matrix.deps }}
@@ -63,11 +94,5 @@ jobs:
6394
toolchain: ${{ matrix.rust }}
6495
target: ${{ matrix.target }}
6596
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
97+
- run: cargo install cross
98+
- run: cross test --target ${{ matrix.target }} --release

.github/workflows/sha2.yml

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,47 +17,74 @@ 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
35+
rust: 1.43.0 # MSRV
4136
deps: true
4237
- target: x86_64-unknown-linux-gnu
43-
platform: ubuntu-latest
4438
rust: stable
45-
use_cross: false
4639
deps: true
4740

41+
runs-on: ubuntu-latest
42+
steps:
43+
- uses: actions/checkout@v1
44+
- run: ${{ matrix.deps }}
45+
- uses: actions-rs/toolchain@v1
46+
with:
47+
profile: minimal
48+
toolchain: ${{ matrix.rust }}
49+
target: ${{ matrix.target }}
50+
override: true
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: msys2/setup-msys2@v2
68+
- uses: actions-rs/toolchain@v1
69+
with:
70+
profile: minimal
71+
toolchain: ${{ matrix.toolchain }}
72+
target: ${{ matrix.target }}
73+
override: true
74+
- run: cargo test --target ${{ matrix.target }} --release
75+
76+
# Cross-compiled tests
77+
cross:
78+
strategy:
79+
matrix:
80+
include:
4881
# ARM64
4982
- target: aarch64-unknown-linux-gnu
50-
platform: ubuntu-latest
51-
rust: 1.41.0 # MSRV
52-
use_cross: true
53-
deps: true
83+
rust: 1.43.0 # MSRV
5484
- target: aarch64-unknown-linux-gnu
55-
platform: ubuntu-latest
5685
rust: stable
57-
use_cross: true
58-
deps: true
5986

60-
runs-on: ${{ matrix.platform }}
87+
runs-on: ubuntu-latest
6188
steps:
6289
- uses: actions/checkout@v1
6390
- run: ${{ matrix.deps }}
@@ -67,11 +94,5 @@ jobs:
6794
toolchain: ${{ matrix.rust }}
6895
target: ${{ matrix.target }}
6996
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
97+
- run: cargo install cross
98+
- 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: 9 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,13 @@ 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+
### Minimum Supported Rust Version
13+
14+
All crates in this repository support **Rust 1.43** or higher.
15+
16+
In the future when the minimum supported Rust version is changed,
17+
it will be accompanied by a minor version bump.
18+
1219
## License
1320

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

2229
[//]: # (badges)
2330

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

0 commit comments

Comments
 (0)