Skip to content

Commit

Permalink
Migrate to GitHub Actions (#18)
Browse files Browse the repository at this point in the history
Tests the following:

- `md5`: Linux/x86, Linux x86_64
- `sha1`: Linux/x86, Linux x86_64, ARM64 (cross)
- `sha2`: Linux/x86, Linux x86_64, ARM64 (cross)
  • Loading branch information
tarcieri authored Oct 20, 2020
1 parent 1dd2dea commit 9a7bc4f
Show file tree
Hide file tree
Showing 7 changed files with 278 additions and 15 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/md5.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: md5

on:
pull_request:
paths:
- "md5/**"
- "Cargo.*"
push:
branches: master

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"

jobs:
test:
strategy:
matrix:
include:
# 32-bit Linux/x86
- target: i686-unknown-linux-gnu
platform: ubuntu-latest
toolchain: 1.41.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
deps: true
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
toolchain: stable
deps: true

runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v1
- run: ${{ matrix.deps }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
override: true
- uses: marcopolo/cargo@master
with:
command: test
working-directory: md5
args: --target ${{ matrix.target }} --release
71 changes: 71 additions & 0 deletions .github/workflows/sha1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: sha1

on:
pull_request:
paths:
- "sha1/**"
- "Cargo.*"
push:
branches: master

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"

jobs:
test:
strategy:
matrix:
include:
# 32-bit Linux/x86
- target: i686-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.41.0 # MSRV
use_cross: false
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
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
rust: stable
use_cross: false
deps: true

# ARM64
- target: aarch64-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.41.0 # MSRV
use_cross: true
deps: true
- target: aarch64-unknown-linux-gnu
platform: ubuntu-latest
rust: stable
use_cross: true
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
- uses: marcopolo/cargo@master
with:
command: test
working-directory: sha1
use-cross: ${{ matrix.use_cross }}
args: --target ${{ matrix.target }} --release
75 changes: 75 additions & 0 deletions .github/workflows/sha2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: sha2

on:
pull_request:
paths:
- "sha2/**"
- "Cargo.*"
push:
branches: master

defaults:
run:
working-directory: sha2

env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"

jobs:
test:
strategy:
matrix:
include:
# 32-bit Linux/x86
- target: i686-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.41.0 # MSRV
use_cross: false
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
- target: x86_64-unknown-linux-gnu
platform: ubuntu-latest
rust: stable
use_cross: false
deps: true

# ARM64
- target: aarch64-unknown-linux-gnu
platform: ubuntu-latest
rust: 1.41.0 # MSRV
use_cross: true
deps: true
- target: aarch64-unknown-linux-gnu
platform: ubuntu-latest
rust: stable
use_cross: true
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
- uses: marcopolo/cargo@master
with:
command: test
working-directory: sha1
use-cross: ${{ matrix.use_cross }}
args: --target ${{ matrix.target }} --release
43 changes: 43 additions & 0 deletions .github/workflows/workspace.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Workspace

on:
pull_request:
paths-ignore:
- README.md
push:
branches: master
paths-ignore:
- README.md

jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.41.0 # MSRV
components: clippy
override: true
- run: cargo clippy --all -- -D warnings

# TODO(tarcieri): enable rustfmt
# rustfmt:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout sources
# uses: actions/checkout@v1
#
# - name: Install stable toolchain
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable
# components: rustfmt
# override: true
# - name: Run cargo fmt
# uses: actions-rs/cargo@v1
# with:
# command: fmt
# args: --all -- --check
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
target/
*/target/
*/*/target/
Cargo.lock
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

35 changes: 35 additions & 0 deletions Cargo.lock

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

0 comments on commit 9a7bc4f

Please sign in to comment.