Skip to content

Release v0.5.2

Release v0.5.2 #24

Workflow file for this run

name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: 🏗️ Setup build cache
uses: actions/cache@v4
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: 🚚 Install dependencies (repro-env)
run: |
wget 'https://github.com/kpcyrd/repro-env/releases/download/v0.3.2/repro-env'
echo '660995089d32178a63763cf47e1b97e265ef5cf24bf646d16728ca51bf2fab50 repro-env' | sha256sum -c -
sudo install -m755 repro-env -t /usr/bin
- name: 🛠️ Build
run: make
- name: Print sha256 of binary
run: sha256sum target/x86_64-unknown-linux-musl/release/rshijack
- name: 📦 Upload binary
uses: actions/upload-artifact@v4
with:
name: bin
path: target/x86_64-unknown-linux-musl/release/rshijack
cross:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch:
- name: x86_64-unknown-linux-gnu
- name: x86_64-unknown-linux-musl
- name: i686-unknown-linux-gnu
binutils: i686-linux-gnu
- name: armv7-unknown-linux-gnueabihf
binutils: arm-linux-gnueabihf
- name: aarch64-unknown-linux-gnu
binutils: aarch64-linux-gnu
- name: aarch64-unknown-linux-musl
binutils: aarch64-linux-gnu
- name: riscv64gc-unknown-linux-gnu
binutils: riscv64-linux-gnu
unstripped: true
- name: powerpc64le-unknown-linux-gnu
binutils: powerpc64le-linux-gnu
- name: s390x-unknown-linux-gnu
binutils: s390x-linux-gnu
steps:
- name: Install binutils
run: |
sudo apt-get update
sudo apt-get install -y binutils-${{ matrix.arch.binutils }}
if: matrix.arch.binutils
- uses: actions/checkout@v4
- name: 🏗️ Setup build cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ matrix.arch.name }}-release-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-${{ matrix.arch.name }}-release-
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.arch.name }}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --target ${{ matrix.arch.name }} --release
- name: Stripping binary
run: /usr/${{ matrix.arch.binutils }}/bin/strip target/${{ matrix.arch.name }}/release/rshijack
if: "${{ contains(matrix.arch.name, 'linux') && !matrix.arch.unstripped }}"
- uses: actions/upload-artifact@v4
with:
name: rshijack-${{ matrix.arch.name }}
path: target/${{ matrix.arch.name }}/release/rshijack
unit-test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-24.04]
steps:
- uses: actions/checkout@v4
- name: Set up cargo cache
uses: actions/cache@v4
with:
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-24.04
steps:
- uses: actions/checkout@v4
- name: Run cargo fmt
run: cargo fmt --all -- --check