chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

View File

@@ -0,0 +1,62 @@
on:
push:
branches:
- master
pull_request:
branches:
- master
name: android
env:
NDK_VERSION: "r26d"
ANDROID_VERSION: "12.0.0"
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-linux-android
- name: Setup Android Environment
run: |
NDK_URL="https://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-linux.zip"
NDK_DIR="${HOME}/android-ndk-${NDK_VERSION}"
# Download and extract NDK
echo "Downloading NDK from $NDK_URL"
wget -q "$NDK_URL" -O android-ndk.zip
unzip -q android-ndk.zip -d "$HOME"
# Set ANDROID_NDK_ROOT environment variable
echo "ANDROID_NDK_ROOT=$NDK_DIR" >> $GITHUB_ENV
# Setup & start redroid container
sudo apt-get install -y linux-modules-extra-$(uname -r) android-tools-adb
sudo modprobe binder_linux devices=binder,hwbinder,vndbinder
docker run -itd --rm --privileged \
--mount "type=bind,src=$(pwd),dst=/data/host$(pwd),ro" \
--mount "type=bind,src=/tmp,dst=/data/host/tmp,ro" \
--mount "type=bind,src=$(pwd)/.github/workflows/run-on-host.sh,dst=/system/xbin/run-on-host,ro" \
--name redroid-test \
-p 5555:5555 \
redroid/redroid:${ANDROID_VERSION}_64only-latest
# Start ADB server and connect to our redroid container
adb start-server
timeout 60 bash -c 'until adb connect localhost:5555; do sleep 2; done'
# Configure Android environment
echo "CARGO_TARGET_X86_64_LINUX_ANDROID_RUNNER=adb -s localhost:5555 shell run-on-host" >> $GITHUB_ENV
echo "CC_X86_64_linux_android=$NDK_DIR/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android34-clang" >> $GITHUB_ENV
echo "AR_x86_64_linux_android=$NDK_DIR/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" >> $GITHUB_ENV
echo "CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER=$NDK_DIR/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android34-clang" >> $GITHUB_ENV
echo "CARGO_TARGET_AARCH64_LINUX_ANDROID_RUSTFLAGS=-C link-arg=-Wl,--as-needed" >> $GITHUB_ENV
- run: cargo build --verbose --target x86_64-linux-android
- run: cargo test --verbose --target x86_64-linux-android -- --nocapture
- name: Stop the redroid container
run: docker stop redroid-test || true

View File

@@ -0,0 +1,37 @@
# Run cargo tests in a FreeBSD VM. This needs to run on one of the GitHub macos runners, because
# they are currently the only ones to support virtualization.
#
# See https://github.com/vmactions/freebsd-vm
on:
push:
branches:
- master
pull_request:
branches:
- master
name: freebsd
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Run tests in FreeBSD VM
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: |
pkg install -y curl
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
export PATH="${HOME}/.cargo/bin:$PATH"
echo "~~~~ rustc --version ~~~~"
rustc --version
run: |
export PATH="${HOME}/.cargo/bin:$PATH"
ls -la
cargo build --verbose
cargo test --verbose

View File

@@ -0,0 +1,19 @@
on:
push:
branches:
- master
pull_request:
branches:
- master
name: linux
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --verbose
- run: cargo test --verbose

View File

@@ -0,0 +1,19 @@
on:
push:
branches:
- master
pull_request:
branches:
- master
name: macos
jobs:
build:
runs-on: macos-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --verbose
- run: cargo test --verbose

View File

@@ -0,0 +1,36 @@
# Run cargo tests in a NetBSD VM. This needs to run on one of the GitHub macos runners, because
# they are currently the only ones to support virtualization.
#
# See https://github.com/vmactions/netbsd-vm
#
# The standard filesystem on NetBSD installs, ffs, doesn't support extended attributes. The
# filesystem type needs to be set fo FFSv2ea (on NetBSD 10 or later) for this to be enabled.
# See http://wikimirror.netbsd.de/tutorials/acls_and_extended_attributes_on_ffs/
# Disabled until NetBSD 10 is released and available via vmactions
on: workflow_dispatch
name: netbsd
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Run tests in NetBSD VM
uses: vmactions/netbsd-vm@v1
with:
usesh: true
prepare: |
/usr/sbin/pkg_add curl
curl https://sh.rustup.rs -sSf --output rustup.sh
sh rustup.sh -y --profile minimal --default-toolchain stable
export PATH="${HOME}/.cargo/bin:$PATH"
echo "~~~~ rustc --version ~~~~"
rustc --version
run: |
export PATH="${HOME}/.cargo/bin:$PATH"
ls -la
cargo build --verbose
cargo test --verbose

View File

@@ -0,0 +1,7 @@
#!/system/bin/sh
CMD="$1"
shift
cd /data/local/tmp || exit 1
exec "/data/host$CMD" "$@"

View File

@@ -0,0 +1,20 @@
on:
push:
branches:
- master
pull_request:
branches:
- master
name: unsupported
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-unknown-illumos
- run: cargo build --verbose --target x86_64-unknown-illumos