Skip to content

Add release CI, bump action versions to avoid deprecations #621

Add release CI, bump action versions to avoid deprecations

Add release CI, bump action versions to avoid deprecations #621

Workflow file for this run

on: [push, pull_request]
name: CI
jobs:
check:
name: Check
strategy:
matrix:
arch: [x86, x86_64]
include:
- arch: x86
target: i686-unknown-linux-gnu
- arch: x86_64
target: x86_64-unknown-linux-gnu
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}
components: rustfmt, clippy
- name: Download FRIDA
run: |
export FRIDA_VERSION=$(cat FRIDA_VERSION)
cd frida-gum-sys && wget https://github.com/frida/frida/releases/download/$FRIDA_VERSION/frida-gum-devkit-$FRIDA_VERSION-linux-${{ matrix.arch }}.tar.xz -O frida-gum.tar.xz && tar xJvf frida-gum.tar.xz
cd ..
cd frida-sys && wget https://github.com/frida/frida/releases/download/$FRIDA_VERSION/frida-core-devkit-$FRIDA_VERSION-linux-${{ matrix.arch }}.tar.xz -O frida-core.tar.xz && tar xJvf frida-core.tar.xz
- name: Install OpenSSL
if: ${{ matrix.arch == 'x86' }}
run: |
sudo apt-get update && sudo apt-get install gcc-multilib --fix-missing
git clone --branch OpenSSL_1_1_1-stable https://github.com/openssl/openssl.git /tmp/openssl/
cd /tmp/openssl/
./Configure linux-generic32 --prefix=/tmp/openssl/install/
make -j CFLAGS="-m32" LDFLAGS="-m32"
make install_sw
echo "OPENSSL_DIR=/tmp/openssl/install/" >> $GITHUB_ENV
- name: Check
uses: actions-rs/cargo@v1
with:
command: check
args: --target ${{ matrix.target }}
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --target ${{ matrix.target }}
- name: Format
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --target ${{ matrix.target }} -- -D warnings
test-gum:
name: Test Gum
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
arch: [x86, x86_64]
include:
- arch: x86
os: ubuntu-latest
target: i686-unknown-linux-gnu
- arch: x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- arch: x86_64
os: macOS-latest
target: x86_64-apple-darwin
- arch: x86
os: windows-latest
target: i686-pc-windows-msvc
- arch: x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
exclude:
- os: macOS-latest
arch: x86
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
- name: Install gcc-multilib
if: ${{ matrix.target == 'i686-unknown-linux-gnu' && matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install gcc-multilib --fix-missing
- name: Test Gum
run: cd frida-gum && cargo test --target ${{ matrix.target }} --features=auto-download
- name: Test Gum with all features
run: cd frida-gum && cargo test --target ${{ matrix.target }} --all-features
test-frida:
name: Test Frida
strategy:
matrix:
os: [ubuntu-latest, macOS-latest, windows-latest]
arch: [x86, x86_64]
include:
- arch: x86
os: ubuntu-latest
target: i686-unknown-linux-gnu
- arch: x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- arch: x86_64
os: macOS-latest
target: x86_64-apple-darwin
- arch: x86
os: windows-latest
target: i686-pc-windows-msvc
- arch: x86_64
os: windows-latest
target: x86_64-pc-windows-msvc
exclude:
- os: macOS-latest
arch: x86
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
- name: Install gcc-multilib
if: ${{ matrix.target == 'i686-unknown-linux-gnu' && matrix.os == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install gcc-multilib --fix-missing
- name: Test Frida
run: cd frida && cargo test --target ${{ matrix.target }} --features=auto-download
- name: Test Frida with all features
run: cd frida && cargo test --target ${{ matrix.target }} --all-features
docs:
name: Build Documentation
runs-on: ubuntu-latest
env:
DOCS_RS: 1
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: Build Gum documentation
run: |
cd frida-gum
cargo rustdoc --features "event-sink invocation-listener" -- --cfg doc_cfg
check-nostd:
name: Check no_std
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
target: x86_64-unknown-linux-gnu
- name: Download FRIDA
run: |
export FRIDA_VERSION=$(cat FRIDA_VERSION)
cd frida-gum-sys && wget https://github.com/frida/frida/releases/download/$FRIDA_VERSION/frida-gum-devkit-$FRIDA_VERSION-linux-x86_64.tar.xz -O frida-gum.tar.xz && tar xJvf frida-gum.tar.xz
cd ..
cd frida-sys && wget https://github.com/frida/frida/releases/download/$FRIDA_VERSION/frida-core-devkit-$FRIDA_VERSION-linux-x86_64.tar.xz -O frida-core.tar.xz && tar xJvf frida-core.tar.xz
- name: Nostd
uses: actions-rs/cargo@v1
with:
command: run
args: --target x86_64-unknown-linux-gnu -p linux-no-std
build-ios:
runs-on: macOS-latest
steps:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: install ios
run: rustup target add aarch64-apple-ios
- name: install cargo ndk
run: cargo install cargo-ndk
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- name: Build iOS
run: cargo build --target aarch64-apple-ios --features=event-sink,invocation-listener,stalker-observer,stalker-params,auto-download