mirror of
https://github.com/EFForg/rayhunter.git
synced 2026-04-26 23:49:59 -07:00
139 lines
4.5 KiB
YAML
139 lines
4.5 KiB
YAML
name: Build Release
|
|
|
|
on:
|
|
push:
|
|
branches: [main, "release-*"]
|
|
pull_request:
|
|
branches: [ "main" ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build_rayhunter_check:
|
|
strategy:
|
|
matrix:
|
|
platform:
|
|
- name: ubuntu-24
|
|
os: ubuntu-latest
|
|
target: x86_64-unknown-linux-musl
|
|
- name: ubuntu-24-aarch64
|
|
os: ubuntu-24.04-arm
|
|
target: aarch64-unknown-linux-musl
|
|
- name: macos-arm
|
|
os: macos-latest
|
|
target: aarch64-apple-darwin
|
|
- name: macos-intel
|
|
os: macos-13
|
|
target: x86_64-apple-darwin
|
|
- name: windows-x86_64
|
|
os: windows-latest
|
|
target: x86_64-pc-windows-gnu
|
|
runs-on: ${{ matrix.platform.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Build rayhunter-check
|
|
run: cargo build --bin rayhunter-check --release
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: rayhunter-check-${{ matrix.platform.name }}
|
|
path: target/release/rayhunter-check${{ matrix.platform.os == 'windows-latest' && '.exe' || '' }}
|
|
if-no-files-found: error
|
|
build_rootshell:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: armv7-unknown-linux-musleabihf
|
|
- name: Build rootshell (arm32)
|
|
run: cargo build --bin rootshell --target armv7-unknown-linux-musleabihf --release
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: rootshell
|
|
path: target/armv7-unknown-linux-musleabihf/release/rootshell
|
|
if-no-files-found: error
|
|
build_rayhunter:
|
|
strategy:
|
|
matrix:
|
|
device:
|
|
- name: tplink
|
|
- name: orbic
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: armv7-unknown-linux-musleabihf
|
|
- name: Build rayhunter-daemon (arm32)
|
|
run: |
|
|
pushd bin/web
|
|
npm install
|
|
npm run build
|
|
popd
|
|
cargo build --bin rayhunter-daemon --target armv7-unknown-linux-musleabihf --release --no-default-features --features ${{ matrix.device.name }}
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: rayhunter-daemon-${{ matrix.device.name }}
|
|
path: target/armv7-unknown-linux-musleabihf/release/rayhunter-daemon
|
|
if-no-files-found: error
|
|
build_rust_installer:
|
|
needs:
|
|
- build_rayhunter
|
|
strategy:
|
|
matrix:
|
|
platform:
|
|
- name: ubuntu-24
|
|
os: ubuntu-latest
|
|
target: x86_64-unknown-linux-musl
|
|
- name: ubuntu-24-aarch64
|
|
os: ubuntu-24.04-arm
|
|
target: aarch64-unknown-linux-musl
|
|
- name: macos-arm
|
|
os: macos-latest
|
|
target: aarch64-apple-darwin
|
|
- name: macos-intel
|
|
os: macos-13
|
|
target: x86_64-apple-darwin
|
|
- name: windows-x86_64
|
|
os: windows-latest
|
|
target: x86_64-pc-windows-gnu
|
|
runs-on: ${{ matrix.platform.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/download-artifact@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: ${{ matrix.platform.target }}
|
|
|
|
- run: cargo build --bin installer --release --target ${{ matrix.platform.target }} --features vendor
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: installer-${{ matrix.platform.name }}
|
|
path: target/${{ matrix.platform.target }}/release/installer${{ matrix.platform.os == 'windows-latest' && '.exe' || '' }}
|
|
if-no-files-found: error
|
|
|
|
build_release_zip:
|
|
needs:
|
|
- build_rayhunter_check
|
|
- build_rootshell
|
|
- build_rayhunter
|
|
- build_rust_installer
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/download-artifact@v4
|
|
- name: Fix executable permissions on binaries
|
|
run: chmod +x installer-*/installer rayhunter-check-*/rayhunter-check rayhunter-daemon-*/rayhunter-daemon
|
|
- name: Setup release directory
|
|
run: mv rayhunter-daemon-* rootshell/rootshell installer-* 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
|