mirror of
https://github.com/csd4ni3l/browser.git
synced 2026-03-10 17:19:22 +01:00
Add Rust build code instead of Python, add dummy Renderer and "render" using it, add Tab new function, fix tls/tcp enum not working and bunch of other borrowing/owning issues in connection, and remove the thread for html cache parsing
This commit is contained in:
87
.github/workflows/main.yml
vendored
87
.github/workflows/main.yml
vendored
@@ -11,79 +11,56 @@ jobs:
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
platform: linux
|
||||
python-version: "3.11"
|
||||
- os: windows-latest
|
||||
platform: windows
|
||||
python-version: "3.11"
|
||||
|
||||
steps:
|
||||
- name: Check-out repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
- name: Cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
python-version: "3.11"
|
||||
architecture: "x64"
|
||||
cache: "pip"
|
||||
cache-dependency-path: |
|
||||
**/requirements*.txt
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
target
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
|
||||
- name: Install Dependencies
|
||||
run: pip install -r requirements.txt
|
||||
|
||||
- name: Build Executable
|
||||
uses: Nuitka/Nuitka-Action@main
|
||||
with:
|
||||
nuitka-version: main
|
||||
script-name: run.py
|
||||
nofollow-import-to: "*tk*,_codecs,encodings,multiprocessing,gi"
|
||||
disable-plugins: tk-inter,dill-compat,eventlet,gevent,pyqt5,pyqt6,pyside2,pyside6,delvewheel,pywebview,matplotlib,spacy,enum-compat,pbr-compat,gevent,pmw-freezer,transformers,upx,kivy,options-nanny,multiprocessing,gi
|
||||
include-data-dir: assets=assets
|
||||
include-data-files: CREDITS=CREDITS
|
||||
mode: onefile
|
||||
output-file: csd4ni3lBrowser
|
||||
|
||||
- name: Locate and rename executable (Linux)
|
||||
- name: Install mold, clang, Wayland, ALSA and x11 headers and dependencies (Linux)
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
run: |
|
||||
set -euo pipefail
|
||||
echo "Searching for built Linux binary..."
|
||||
# List to help debugging when paths change
|
||||
ls -laR . | head -n 500 || true
|
||||
BIN=$(find . -maxdepth 4 -type f -name 'csd4ni3lBrowser*' -perm -u+x | head -n1 || true)
|
||||
if [ -z "${BIN}" ]; then
|
||||
echo "ERROR: No Linux binary found after build"
|
||||
exit 1
|
||||
fi
|
||||
echo "Found: ${BIN}"
|
||||
mkdir -p build_output
|
||||
cp "${BIN}" build_output/csd4ni3lBrowser.bin
|
||||
chmod +x build_output/csd4ni3lBrowser.bin
|
||||
echo "Executable ready: build_output/csd4ni3lBrowser.bin"
|
||||
sudo apt update
|
||||
sudo apt install -y build-essential clang cmake pkg-config mold \
|
||||
libwayland-dev libxkbcommon-dev libegl1-mesa-dev \
|
||||
libwayland-egl-backend-dev \
|
||||
libx11-dev libxext-dev libxrandr-dev libxinerama-dev libxcursor-dev \
|
||||
libxi-dev libxfixes-dev libxrender-dev \
|
||||
libfreetype6-dev libfontconfig1-dev libgl1-mesa-dev \
|
||||
libasound2-dev libudev-dev
|
||||
|
||||
shell: bash
|
||||
|
||||
- name: Locate and rename executable (Windows)
|
||||
- name: Build
|
||||
run: cargo build --release --verbose
|
||||
|
||||
- name: Verify executable (Linux)
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
run: test target/release/soundboard
|
||||
shell: bash
|
||||
|
||||
- name: Verify executable (Windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
run: |
|
||||
Write-Host "Searching for built Windows binary..."
|
||||
Get-ChildItem -Recurse -File -Filter 'csd4ni3lBrowser*.exe' | Select-Object -First 1 | ForEach-Object {
|
||||
Write-Host ("Found: " + $_.FullName)
|
||||
New-Item -ItemType Directory -Force -Path build_output | Out-Null
|
||||
Copy-Item $_.FullName "build_output\csd4ni3lBrowser.exe"
|
||||
Write-Host "Executable ready: build_output\csd4ni3lBrowser.exe"
|
||||
}
|
||||
if (!(Test-Path build_output\csd4ni3lBrowser.exe)) {
|
||||
Write-Error "ERROR: No Windows binary found after build"
|
||||
exit 1
|
||||
}
|
||||
run: Test-Path target\release\soundboard.exe
|
||||
shell: pwsh
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.platform }}
|
||||
path: build_output/csd4ni3lBrowser.*
|
||||
path: |
|
||||
target/release/soundboard
|
||||
target/release/soundboard.exe
|
||||
|
||||
release:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -114,5 +91,5 @@ jobs:
|
||||
--notes "Automated build for $TAG"
|
||||
fi
|
||||
# Upload the executables directly (no zip files)
|
||||
gh release upload "$TAG" downloads/linux/csd4ni3lBrowser.bin --clobber
|
||||
gh release upload "$TAG" downloads/windows/csd4ni3lBrowser.exe --clobber
|
||||
gh release upload "$TAG" downloads/linux/soundboard --clobber
|
||||
gh release upload "$TAG" downloads/windows/soundboard.exe --clobber
|
||||
Reference in New Issue
Block a user