Merges PR #165 and PR #172. PR #165: The CDP spec marks canAccessOpener as a required boolean on TargetInfo but Obscura was omitting it. Strict Rust clients like chromiumoxide reject the event entirely and panic with "Created target not present" when the field is absent. Added canAccessOpener: false to every TargetInfo emitted by setDiscoverTargets, getTargets, createTarget, attachToBrowserTarget, attachToTarget, and getTargetInfo. PR #172: Added a cross-compile matrix entry for aarch64-unknown-linux-gnu running on ubuntu-22.04 x86_64, producing obscura-aarch64-linux-cross. This is a fallback for when GitHub ARM runners are unavailable without removing the native ARM build.
95 lines
2.8 KiB
YAML
95 lines
2.8 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- target: x86_64-unknown-linux-gnu
|
|
# Build on Ubuntu 22.04 so the Linux release binary works on
|
|
# common LTS servers with glibc 2.35 instead of requiring the
|
|
# newer glibc shipped by ubuntu-latest.
|
|
os: ubuntu-22.04
|
|
name: obscura-x86_64-linux
|
|
cross: false
|
|
- target: aarch64-unknown-linux-gnu
|
|
# Native build on GitHub's ARM runner.
|
|
os: ubuntu-22.04-arm
|
|
name: obscura-aarch64-linux
|
|
cross: false
|
|
- target: aarch64-unknown-linux-gnu
|
|
# Cross-compile fallback from x86_64 Ubuntu 22.04. Same glibc
|
|
# 2.35 floor, useful when ARM runners are unavailable.
|
|
os: ubuntu-22.04
|
|
name: obscura-aarch64-linux-cross
|
|
cross: true
|
|
- target: aarch64-apple-darwin
|
|
os: macos-latest
|
|
name: obscura-aarch64-macos
|
|
cross: false
|
|
- target: x86_64-apple-darwin
|
|
os: macos-latest
|
|
name: obscura-x86_64-macos
|
|
cross: false
|
|
- target: x86_64-pc-windows-msvc
|
|
os: windows-latest
|
|
name: obscura-x86_64-windows
|
|
cross: false
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
|
|
- name: Install cross-compilation toolchain (aarch64-linux)
|
|
if: matrix.cross == true
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gcc-aarch64-linux-gnu
|
|
mkdir -p .cargo
|
|
cat >> .cargo/config.toml << 'CARGO_EOF'
|
|
[target.aarch64-unknown-linux-gnu]
|
|
linker = "aarch64-linux-gnu-gcc"
|
|
CARGO_EOF
|
|
|
|
- name: Build
|
|
run: cargo build --release --target ${{ matrix.target }}
|
|
|
|
- name: Build stealth
|
|
run: cargo build --release --target ${{ matrix.target }} --features stealth
|
|
continue-on-error: true
|
|
|
|
- name: Package (Unix)
|
|
if: runner.os != 'Windows'
|
|
run: |
|
|
cd target/${{ matrix.target }}/release
|
|
tar czf ../../../${{ matrix.name }}.tar.gz obscura obscura-worker
|
|
cd ../../..
|
|
|
|
- name: Package (Windows)
|
|
if: runner.os == 'Windows'
|
|
run: |
|
|
cd target/${{ matrix.target }}/release
|
|
7z a ../../../${{ matrix.name }}.zip obscura.exe obscura-worker.exe
|
|
cd ../../..
|
|
|
|
- name: Upload
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: |
|
|
${{ matrix.name }}.tar.gz
|
|
${{ matrix.name }}.zip
|