Skip to content

Commit

Permalink
[WIP] CI: test on 64-bit Windows (GNU)
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri committed Oct 20, 2020
1 parent 224ecbe commit f21c023
Show file tree
Hide file tree
Showing 6 changed files with 92 additions and 38 deletions.
44 changes: 30 additions & 14 deletions .github/workflows/md5.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,36 @@ on:
push:
branches: master

defaults:
run:
working-directory: md5

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"

jobs:
test:
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 }}
Expand All @@ -47,10 +47,26 @@ jobs:
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: cargo test --target ${{ matrix.target }} --release

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: msys2/setup-msys2@v2
- 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
- run: cargo test --target ${{ matrix.target }} --release
70 changes: 50 additions & 20 deletions .github/workflows/sha1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,50 +8,87 @@ 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
rust: 1.43.0 # MSRV
deps: true
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
rust: stable
use_cross: false
deps: true

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
- run: ${{ matrix.deps }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
override: true
- 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: msys2/setup-msys2@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
override: true
- 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 }}
steps:
Expand All @@ -63,11 +100,4 @@ jobs:
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: cross test --target ${{ matrix.target }} --release
6 changes: 3 additions & 3 deletions .github/workflows/sha2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
# 32-bit Linux/x86
- target: i686-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.41.0 # MSRV
rust: 1.43.0 # MSRV
use_cross: false
deps: sudo apt install gcc-multilib
- target: i686-unknown-linux-gnu
Expand All @@ -36,7 +36,7 @@ jobs:
# 64-bit Linux/x86_64
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.41.0 # MSRV
rust: 1.43.0 # MSRV
use_cross: false
deps: true
- target: x86_64-unknown-linux-gnu
Expand All @@ -48,7 +48,7 @@ jobs:
# ARM64
- target: aarch64-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.41.0 # MSRV
rust: 1.43.0 # MSRV
use_cross: true
deps: true
- target: aarch64-unknown-linux-gnu
Expand Down
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.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ functionality please refer to the crates from
enabled `asm` feature `md5`, `sha-1`, `sha2` and `whirlpool` crates will use
code from this repository.

### 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.

## License

All crates licensed under the [MIT license](http://opensource.org/licenses/MIT).
Expand Down

0 comments on commit f21c023

Please sign in to comment.