mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-26 15:39:59 -07:00
Android kernels with CONFIG_ANDROID_PARANOID_NETWORK extensions set require users to have a few special group IDs before getting network access. Unfortunately, we need to use nightly to get access to the .groups() method.
78 lines
2.5 KiB
YAML
78 lines
2.5 KiB
YAML
name: Build Release
|
|
|
|
on:
|
|
push:
|
|
branches: [main, "release-*"]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build_serial:
|
|
strategy:
|
|
matrix:
|
|
platform:
|
|
- os: ubuntu-latest
|
|
build_name: serial
|
|
- os: windows-latest
|
|
build_name: serial.exe
|
|
- os: macos-latest
|
|
build_name: serial
|
|
runs-on: ${{ matrix.platform.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build serial
|
|
run: cargo build --bin serial --release
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: serial-${{ matrix.platform.os }}
|
|
path: ./target/release/${{ matrix.platform.build_name }}
|
|
if-no-files-found: error
|
|
build_rootshell_and_rayhunter:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
with:
|
|
targets: armv7-unknown-linux-gnueabihf
|
|
- name: Install cross-compilation dependencies
|
|
uses: awalsh128/cache-apt-pkgs-action@latest
|
|
with:
|
|
packages: build-essential libc6-armhf-cross libc6-dev-armhf-cross gcc-arm-linux-gnueabihf
|
|
version: 1.0
|
|
- name: Build rootshell (arm32)
|
|
run: cargo build --bin rootshell --target armv7-unknown-linux-gnueabihf --release
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: rootshell
|
|
path: target/armv7-unknown-linux-gnueabihf/release/rootshell
|
|
if-no-files-found: error
|
|
- name: Build rayhunter-daemon (arm32)
|
|
run: cargo build --bin rayhunter-daemon --target armv7-unknown-linux-gnueabihf --release
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: rayhunter-daemon
|
|
path: target/armv7-unknown-linux-gnueabihf/release/rayhunter-daemon
|
|
if-no-files-found: error
|
|
build_release_zip:
|
|
needs:
|
|
- build_serial
|
|
- build_rootshell_and_rayhunter
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/download-artifact@v4
|
|
- name: Fix executable permissions on serial binaries
|
|
run: chmod +x serial-*/serial
|
|
- name: Setup release directory
|
|
run: mv rayhunter-daemon/rayhunter-daemon rootshell/rootshell serial-* dist
|
|
- name: Archive release directory
|
|
run: tar -cvf release.tar -C dist .
|
|
# TODO: have this create a release directly
|
|
- name: Upload release
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: release.tar
|
|
path: release.tar
|
|
if-no-files-found: error
|