Skip to content

Commit

Permalink
Merge pull request #11 from kpcyrd/update
Browse files Browse the repository at this point in the history
Update dependencies, rewrite build scripts
  • Loading branch information
kpcyrd authored Jun 3, 2023
2 parents ef22b6b + a7d4154 commit 0485047
Show file tree
Hide file tree
Showing 8 changed files with 386 additions and 356 deletions.
81 changes: 57 additions & 24 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,31 @@ on:

jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-release-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-release-

- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
run: cargo build --release --verbose

- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: bin
path: target/release/rshijack

cross:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -47,7 +60,9 @@ jobs:
binutils: s390x-linux-gnu
steps:
- name: Install binutils
run: sudo apt-get install binutils-${{ matrix.arch.binutils }}
run: |
sudo apt-get update
sudo apt-get install -y binutils-${{ matrix.arch.binutils }}
if: matrix.arch.binutils
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand All @@ -68,18 +83,36 @@ jobs:
name: rshijack-${{ matrix.arch.name }}
path: target/${{ matrix.arch.name }}/release/rshijack

clippy:
name: clippy
runs-on: ubuntu-latest
unit-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-22.04]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: clippy
- uses: actions-rs/cargo@v1
- uses: actions/checkout@v3

- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
command: clippy
args: --workspace --tests -- --deny warnings
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-debug-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-debug-

- name: Run clippy
run: cargo clippy -- -D warnings
- name: Run tests
run: cargo test --verbose

fmt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Run cargo fmt
run: cargo fmt --all -- --check
Loading

0 comments on commit 0485047

Please sign in to comment.