Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
75 commits
Select commit Hold shift + click to select a range
2a9ee18
Atlas: free read-aloud, voice mode and hands-free mode with Android TTS
claude Oct 3, 2026
0835b75
CI: use the runner's preinstalled Android SDK
claude Oct 3, 2026
ea9f85e
Atlas: agents with custom system prompts, hide Pro upsells, voice set…
claude Oct 3, 2026
f47a9dd
Atlas: on-device learning mode (learner/judge/manager), starter cards…
claude Oct 3, 2026
261ca2f
Atlas: per-agent model settings and tools, web search providers, tabl…
claude Oct 3, 2026
509a160
Atlas: built-in metasearch (SearXNG-style, no server)
claude Oct 3, 2026
67698fd
Atlas: backup/restore, zip pack import, emergency screen, learning ro…
claude Oct 3, 2026
b787fa1
Atlas: preferred model per agent, model per learning role
claude Oct 3, 2026
c15feeb
Atlas: offline library (Kiwix .zim) search for the AI
claude Oct 3, 2026
5601478
Atlas: Survival Manual, low-battery mode, phrase cards, Field Identif…
claude Oct 3, 2026
6407220
Fix manifest merge with libkiwix (allowBackup/label) and agent store …
claude Oct 3, 2026
c903428
Atlas: add-on downloads, off-grid mode, manual reading features, writ…
claude Oct 3, 2026
6101023
Atlas: phone assistant tools, study mode with sources/podcast/video, …
claude Oct 3, 2026
924db14
Fix FileProvider clash (own subclass); add compass shown only with a …
claude Oct 3, 2026
3477fcd
Atlas: podcast episodes (prompt or auto, length, style, extra researc…
claude Oct 3, 2026
cef1652
Atlas: downloadable Atlas library packs, podcast minutes and hosts by…
claude Oct 4, 2026
9ba1ee6
Audit fixes: TTS init race and errors, hands-free loop, Whisper noise…
claude Oct 4, 2026
20f9342
Offline maps: Mapsforge vector maps, GPS, saved places with distance/…
claude Oct 4, 2026
95ca751
Atlas packs: report why each download failed
claude Oct 4, 2026
45b494e
Atlas identity: remove Off Grid/Wednesday branding, new palette, seri…
claude Oct 4, 2026
d50e76c
Natural offline voices (Kokoro/Piper via sherpa-onnx) with in-app dow…
claude Oct 4, 2026
4de1dd8
Atlas packs: 40 new/fixed source links, safer archive.org fallback
claude Oct 4, 2026
23ad296
Learning: question bank cycle (learner proposes, judge approves/rejec…
claude Oct 4, 2026
5ccddd2
Review fixes: neural voice engine thread-safety and playback end, GPS…
claude Oct 4, 2026
845e493
Second review pass: TTS without an engine no longer hangs, Kiwix nati…
claude Oct 4, 2026
215baa9
README describes Atlas; 10 more library sources and 3 substitutes; AP…
claude Oct 4, 2026
ffd4d74
My models screen (delete any model, move to SD card, add/remove visio…
claude Oct 4, 2026
e24f328
Review fixes: safe model move (copy, save, then delete; shared vision…
claude Oct 4, 2026
35a4724
CI: report type errors in more Atlas files
claude Oct 4, 2026
2df460c
Fix thinking level type
claude Oct 4, 2026
81a83fe
First start: show the screen immediately and fill the model list in t…
claude Oct 4, 2026
064aa80
Audit fixes, earpiece output in voice mode, context size picker in ch…
claude Oct 4, 2026
c9b5e3c
Model tester: memory fit, load, writing and reading speed, context, G…
claude Oct 4, 2026
8ebb37c
Reply time estimates: learns each model's speed, live countdown in ch…
claude Oct 4, 2026
c3eb785
Daily briefing (news on your interests, fun facts, offline edition), …
claude Oct 4, 2026
4ed44cb
Memory-size safety net (falls back to last working size, recovers aft…
claude Oct 5, 2026
64be1f5
Fix type narrowing in text loader
claude Oct 5, 2026
d08f772
Import .safetensors SD1.5 checkpoints (converted on the phone, CPU/GP…
claude Oct 5, 2026
dde0096
checkpoint-runtime-audit-and-recovery-fixes
coolchan03 Oct 7, 2026
d673d9f
finalize-image-runtime-audit
coolchan03 Oct 7, 2026
c080c09
Finalize Atlas runtime audit
coolchan03 Oct 7, 2026
e1028bd
Step 1: improve automatic hardware acceleration
coolchan03 Oct 7, 2026
4e95bb5
Step 2: expose runtime status and fix Sonar gate
coolchan03 Oct 7, 2026
1df5702
Step 3: surface and optimize token speed
coolchan03 Oct 7, 2026
f6103a0
Step 4: keep display awake during AI work
coolchan03 Oct 7, 2026
899aaf1
Step 5: keep AI responses running in background
coolchan03 Oct 7, 2026
5c25cfd
Fix acceleration regression fixtures
coolchan03 Oct 7, 2026
384ff7b
Finalize Atlas regression and release fixes
coolchan03 Oct 7, 2026
5db3020
Fix Atlas packs workflow YAML
coolchan03 Oct 7, 2026
c371423
Fix final Sonar reliability issues
coolchan03 Oct 7, 2026
19ff4bc
Fix llama JSI native artifacts in Atlas APK
coolchan03 Oct 7, 2026
c89c9c8
Harden Atlas llama runtime and release validation
coolchan03 Oct 7, 2026
073e656
Add Atlas llama runtime health checks
coolchan03 Oct 7, 2026
af799f9
WIP: native SDXL/FLUX image weights, model attachments, download inte…
coolchan03 Oct 8, 2026
e10fbcc
Harden image checkpoint detection, ZIP readiness and add-on safety
coolchan03 Oct 8, 2026
40babc8
Resume large image downloads and extract ZIPs natively on Android
coolchan03 Oct 8, 2026
febb3ef
Update Atlas fork URL and download references after repository rename
coolchan03 Oct 8, 2026
9556090
Add native image-model benchmark and SDXL quality defaults
coolchan03 Oct 8, 2026
595e120
Support Z-Image Anima Chroma native image pipelines and dependency ch…
coolchan03 Oct 8, 2026
177fbd1
Show Anima support file downloads and clarify Qwen text encoder
coolchan03 Oct 8, 2026
71d380d
Enable Vulkan GPU native diffusion with device fallback and step diag…
coolchan03 Oct 9, 2026
66df694
Fix Vulkan CI missing SPIRV-Headers CMake package
coolchan03 Oct 9, 2026
6b0e28d
Fix Android Vulkan C++ headers and refresh CI actions
coolchan03 Oct 9, 2026
03dc1bf
Fix Vulkan SPIRV header include path for ARM64 cross-compile
coolchan03 Oct 9, 2026
40916d4
Fix Android diffusion Process PID compilation
coolchan03 Oct 9, 2026
8c0afe4
Move Android image tests ahead of Vulkan build and retain failure rep…
coolchan03 Oct 9, 2026
ad463e9
Fix VAE decoding progress parser and extend Android regression tests
coolchan03 Oct 9, 2026
cd25261
Harden native image runtime memory GPU watchdog and CI gates
coolchan03 Oct 9, 2026
4e531a1
Clean up partial native image outputs on failure and cancellation
coolchan03 Oct 9, 2026
8b1599f
Fix hidden Vulkan probe regex bug and surface real GPU diagnostics
coolchan03 Oct 9, 2026
cda7e74
Avoid unsupported Adreno BF16 Vulkan shaders with on-load FP16 weights
coolchan03 Oct 9, 2026
13abae5
Guard BF16 Vulkan pipelines on unsupported GPUs and fully convert BF1…
coolchan03 Oct 9, 2026
4501ba1
Avoid BF16 shader pipelines on Qualcomm Adreno even when drivers adve…
coolchan03 Oct 9, 2026
a1c5d58
fix(image): use Vulkan shared-memory matvec on Adreno
coolchan03 Oct 9, 2026
2fb94eb
fix(security): migrate Atlas credentials to OS keychain
coolchan03 Oct 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
90 changes: 90 additions & 0 deletions .github/workflows/atlas-apk.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Build Atlas APK

# Builds an installable Android APK (arm64 phones) on every push to atlas-voice,
# and publishes it on the Releases page so it can be downloaded on the phone.
on:
push:
branches: [atlas-voice]
workflow_dispatch:

jobs:
apk:
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v5
with:
node-version: '20'
cache: 'npm'
- uses: actions/setup-java@v5
with:
distribution: 'temurin'
java-version: '17'
- name: Use the runner's Android SDK
run: |
echo "ANDROID_HOME=$ANDROID_SDK_ROOT" >> $GITHUB_ENV
yes | "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin/sdkmanager" --licenses > /dev/null || true
- name: Free disk space
run: sudo rm -rf /usr/share/dotnet /opt/ghc || true
- uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ hashFiles('android/**/*.gradle*', 'android/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: gradle-
- name: Install JS dependencies
run: npm ci --ignore-scripts
- name: Install llama.rn native artifacts
run: node node_modules/llama.rn/install/download-native-artifacts.js
- name: Apply audited native dependency patches
run: ./node_modules/.bin/patch-package
- name: Type check (informational, Atlas files reported as warnings)
run: |
./node_modules/.bin/tsc --noEmit -p . > tsc.log 2>&1 || true
grep -E "error TS" tsc.log | grep -iE "atlas|MyModels|officeExtract|documentService|modelManager|importHelpers|quickImport|textGenAdvanced|Popovers|ChatInput|accel|thinking|storage|loaders|types/index|App.tsx|Maps|About|Onboarding|RemoteServers|ModelDownload|Agents|theme/|constants/|sharePrompt|Upsell|learning|agent|websearch|useWideLayout|handlers.ts|llmHelpers|generationToolLoop|ChatScreen/index|AgentChip|Emergency|KnowledgeBaseScreen|SettingsScreen|HomeScreen|OfflineLibrary|offlineLibrary|survival|Survival|lowPower|Phrase|Study|study|deviceTools|Private|AssistantAccess|ProjectDetail|ModelTest|ChatContextSection|AudioInput|contextCompaction|navigation/|ReplyEta|DailyBrief|Attachments|LowPowerCard|ctxGuard|loaders|useModelsScreen|llmHelpers|tools/handlers|ChatMessageArea|services/llm|litert.ts" | head -40 | while IFS= read -r l; do echo "::warning::$l"; done
echo "::notice title=TypeScript::total TS errors: $(grep -c 'error TS' tsc.log)"
- name: Get natural-voice engine (sherpa-onnx)
run: |
mkdir -p android/app/libs
curl --fail --silent --show-error --location --retry 3 --proto '=https' --proto-redir '=https' -o android/app/libs/sherpa-onnx.aar https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.13.7/sherpa-onnx-1.13.7.aar
echo "c4ef49e309f24fcee5c106b8a279481aaecaabb078cd37b2cd6e9a62cc8a73c8 android/app/libs/sherpa-onnx.aar" | sha256sum -c -
# phones only need 64-bit ARM: drop the other CPU types to keep the APK small
zip -q -d android/app/libs/sherpa-onnx.aar 'jni/armeabi-v7a/*' 'jni/x86/*' 'jni/x86_64/*' || true
ls -la android/app/libs
- name: Build release APK
working-directory: android
run: |
set -o pipefail
./gradlew assembleRelease -PreactNativeArchitectures=arm64-v8a --no-daemon 2>&1 | tee ../gradle.log || {
grep -E "^e: |error:|What went wrong|Could not|Execution failed|Unresolved|Duplicate|Manifest merger|Attribute |Suggestion|> Task .*FAILED|Caused by" ../gradle.log | grep -v "^w: " | head -40 | while IFS= read -r l; do echo "::error::$l"; done
exit 1
}
- name: Verify release native runtime
run: |
APK=android/app/build/outputs/apk/release/app-release.apk
test -f "$APK"
unzip -l "$APK" > apk-contents.txt
grep -q 'lib/arm64-v8a/librnllama.so' apk-contents.txt
grep -q 'lib/arm64-v8a/librnllama_v8.so' apk-contents.txt
grep -q 'lib/arm64-v8a/librnllama_v8_2.so' apk-contents.txt
node -e "const p=require('./node_modules/llama.rn/package.json'); if(p.version!=='0.13.0-rc.4') { console.error('Unexpected llama.rn version:',p.version); process.exit(1) } console.log('Verified llama.rn',p.version)"
echo "Verified Atlas release contains the ARM64 llama.rn native runtime."
- name: Rename APK
run: |
mkdir -p out
cp android/app/build/outputs/apk/release/app-release.apk out/Atlas-${{ github.run_number }}.apk
- uses: actions/upload-artifact@v4
with:
name: Atlas-apk
path: out/*.apk
- name: Publish release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create atlas-${{ github.run_number }} out/*.apk --latest \
--target ${{ github.sha }} --title "Atlas build ${{ github.run_number }}" \
--notes "Install this APK on your Android phone or tablet (download it, open it, allow installing from this source)."
137 changes: 137 additions & 0 deletions .github/workflows/atlas-native-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
name: Atlas native-image experimental APK

# Deliberately separate from atlas-voice's published/latest APK pipeline.
on:
push:
branches: [atlas-image-native]
workflow_dispatch:

jobs:
native-image-apk:
runs-on: ubuntu-24.04
timeout-minutes: 120
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: '22'
cache: npm
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: '17'
- name: Prepare Android SDK and available space
run: |
sudo rm -rf /usr/share/dotnet /opt/ghc || true
echo "ANDROID_HOME=$ANDROID_SDK_ROOT" >> "$GITHUB_ENV"
NDK=$(find "$ANDROID_SDK_ROOT/ndk" -mindepth 1 -maxdepth 1 -type d | sort -V | tail -1)
test -n "$NDK"
echo "ATLAS_NDK=$NDK" >> "$GITHUB_ENV"
# glslc builds the Vulkan GGML compute shaders for ARM64.
sudo apt-get update -qq
sudo apt-get install -y --no-install-recommends glslc spirv-headers libvulkan-dev
test -x "$(command -v glslc)"
test -f "$NDK/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/28/libvulkan.so"
- name: Install JS dependencies and patched native llama runtime
run: |
npm ci --ignore-scripts
node node_modules/llama.rn/install/download-native-artifacts.js
./node_modules/.bin/patch-package
- name: Validate image native source contract
run: node scripts/verify-native-image-contract.cjs
- name: TypeScript compile check
run: ./node_modules/.bin/tsc --noEmit -p .
- name: Run image model compatibility tests
run: |
./node_modules/.bin/jest --runInBand --coverage=false __tests__/unit/utils/nativeImageCompatibility.test.ts __tests__/unit/utils/nativeImageTuning.test.ts __tests__/unit/services/hardware.test.ts __tests__/unit/services/authService.test.ts __tests__/unit/services/authServiceSecurity.test.ts
- name: Add sherpa voice dependencies
run: |
mkdir -p android/app/libs
curl --fail --silent --show-error --location --retry 3 --proto '=https' --proto-redir '=https' \
-o android/app/libs/sherpa-onnx.aar \
https://github.com/k2-fsa/sherpa-onnx/releases/download/v1.13.7/sherpa-onnx-1.13.7.aar
echo "c4ef49e309f24fcee5c106b8a279481aaecaabb078cd37b2cd6e9a62cc8a73c8 android/app/libs/sherpa-onnx.aar" | sha256sum -c -
zip -q -d android/app/libs/sherpa-onnx.aar 'jni/armeabi-v7a/*' 'jni/x86/*' 'jni/x86_64/*' || true
- name: Test native image family classifier and progress diagnostics
working-directory: android
run: ./gradlew :app:testDebugUnitTest --tests 'ai.offgridmobile.localdream.AtlasImageArchitectureTest' --tests 'ai.offgridmobile.localdream.AtlasImageProgressTest' --tests 'ai.offgridmobile.localdream.AtlasVulkanProbeTest' --tests 'ai.offgridmobile.localdream.AtlasImageGpuPrecisionTest' :app:compileReleaseKotlin --no-daemon --console=plain
- name: Build native ARM64 diffusion CLI from pinned upstream source
run: |
git clone --depth 1 https://github.com/leejet/stable-diffusion.cpp.git /tmp/atlas-sdcpp
git -C /tmp/atlas-sdcpp fetch --depth 1 origin e16d26a96a1bf59824d12cc26352aa36c25c2252
git -C /tmp/atlas-sdcpp checkout e16d26a96a1bf59824d12cc26352aa36c25c2252
git -C /tmp/atlas-sdcpp submodule update --init --recursive --depth 1
# The pinned Vulkan backend unconditionally creates three BF16 matvec
# pipelines. On Adreno without native BF16 this aborts VkPipeline
# creation even for an otherwise compatible checkpoint.
# Vendor patches are generated and verified against exact pinned
# source revisions and applied before CMake or native compilation.
git -C /tmp/atlas-sdcpp/ggml apply --check "$GITHUB_WORKSPACE/android/patches/ggml-vulkan-guard-unsupported-bf16.patch"
git -C /tmp/atlas-sdcpp/ggml apply "$GITHUB_WORKSPACE/android/patches/ggml-vulkan-guard-unsupported-bf16.patch"
git -C /tmp/atlas-sdcpp apply --check "$GITHUB_WORKSPACE/android/patches/sdcpp-convert-all-bf16-to-f16.patch"
git -C /tmp/atlas-sdcpp apply "$GITHUB_WORKSPACE/android/patches/sdcpp-convert-all-bf16-to-f16.patch"
grep -q 'device->vendor_id != VK_VENDOR_ID_QUALCOMM' /tmp/atlas-sdcpp/ggml/src/ggml-vulkan/ggml-vulkan.cpp
grep -q 'tensor_storage.type == GGML_TYPE_BF16' /tmp/atlas-sdcpp/src/model_loader.cpp
# Android NDK has libvulkan.so and C API headers, but not vulkan.hpp.
# GGML needs Khronos' Vulkan C++ headers to compile.
# Pin to the same Vulkan SDK release used for SPIRV-Headers.
git clone --depth 1 --branch vulkan-sdk-1.4.335.0 https://github.com/KhronosGroup/Vulkan-Headers.git /tmp/atlas-vulkan-headers
test -s /tmp/atlas-vulkan-headers/include/vulkan/vulkan.hpp
test -s /tmp/atlas-vulkan-headers/include/vulkan/vulkan.h
# GGML Vulkan requires an official SPIRV-Headers CMake package.
# Ubuntu apt spirv-headers supplies headers, but no CMake config.
# Pin to the Vulkan SDK headers version reported by the build runner.
git clone --depth 1 --branch vulkan-sdk-1.4.335.0 https://github.com/KhronosGroup/SPIRV-Headers.git /tmp/atlas-spirv-headers
cmake -S /tmp/atlas-spirv-headers -B /tmp/atlas-spirv-headers-build -G Ninja \
-DCMAKE_INSTALL_PREFIX=/tmp/atlas-spirv-install \
-DSPIRV_HEADERS_ENABLE_TESTS=OFF -DSPIRV_HEADERS_ENABLE_INSTALL=ON
cmake --build /tmp/atlas-spirv-headers-build
cmake --install /tmp/atlas-spirv-headers-build
test -s /tmp/atlas-spirv-install/share/cmake/SPIRV-Headers/SPIRV-HeadersConfig.cmake
# CMake's SPIRV-Headers package is found, but this pinned GGML build
# does not propagate its include directory to ggml-vulkan C++ sources.
test -s /tmp/atlas-spirv-install/include/spirv/unified1/spirv.hpp
cmake -S /tmp/atlas-sdcpp -B /tmp/atlas-sdcpp/build-android -G Ninja \
-DCMAKE_TOOLCHAIN_FILE="$ATLAS_NDK/build/cmake/android.toolchain.cmake" \
-DCMAKE_BUILD_TYPE=Release -DANDROID_ABI=arm64-v8a -DANDROID_PLATFORM=android-28 \
-DSD_WEBP=OFF -DSD_WEBM=OFF -DGGML_OPENMP=OFF -DGGML_NATIVE=OFF \
-DSD_VULKAN=ON \
-DCMAKE_CXX_FLAGS=-I/tmp/atlas-spirv-install/include \
-DSPIRV-Headers_DIR=/tmp/atlas-spirv-install/share/cmake/SPIRV-Headers \
-DVulkan_GLSLC_EXECUTABLE="$(command -v glslc)" \
-DVulkan_INCLUDE_DIR=/tmp/atlas-vulkan-headers/include \
-DVulkan_LIBRARY="$ATLAS_NDK/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/lib/aarch64-linux-android/28/libvulkan.so" \
-DSD_BUILD_EXAMPLES=ON -DSD_BUILD_SHARED_LIBS=OFF -DSD_BUILD_SHARED_GGML_LIB=OFF
cmake --build /tmp/atlas-sdcpp/build-android --target sd-cli --parallel 3
mkdir -p android/app/src/main/jniLibs/arm64-v8a
cp /tmp/atlas-sdcpp/build-android/bin/sd-cli android/app/src/main/jniLibs/arm64-v8a/libatlas_sdcli.so
file android/app/src/main/jniLibs/arm64-v8a/libatlas_sdcli.so
# Fail closed if CI unexpectedly produced a CPU-only image runtime.
test -s android/app/src/main/jniLibs/arm64-v8a/libatlas_sdcli.so
strings android/app/src/main/jniLibs/arm64-v8a/libatlas_sdcli.so | grep -q 'ggml_vulkan'
readelf -d android/app/src/main/jniLibs/arm64-v8a/libatlas_sdcli.so | grep -q 'libvulkan.so'
- name: Assemble Android release APK
working-directory: android
run: ./gradlew assembleRelease -PreactNativeArchitectures=arm64-v8a --no-daemon
- name: Verify packaged diffusion and llama runtimes
run: |
APK=android/app/build/outputs/apk/release/app-release.apk
test -s "$APK"
unzip -l "$APK" > /tmp/atlas-apk-files.txt
grep -q 'lib/arm64-v8a/libatlas_sdcli.so' /tmp/atlas-apk-files.txt
grep -q 'lib/arm64-v8a/libstable_diffusion_core.so' /tmp/atlas-apk-files.txt
grep -q 'lib/arm64-v8a/librnllama.so' /tmp/atlas-apk-files.txt
- name: Upload Android diagnostics on failure
if: failure()
uses: actions/upload-artifact@v7
with:
name: atlas-image-build-diagnostics
if-no-files-found: ignore
path: |
android/app/build/reports/tests/
android/app/build/test-results/
android/build/reports/problems/
- uses: actions/upload-artifact@v7
with:
name: atlas-native-image-experimental-apk
path: android/app/build/outputs/apk/release/app-release.apk
89 changes: 89 additions & 0 deletions .github/workflows/atlas-packs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Build Atlas library packs

# Downloads the Atlas source books, converts them to text (with OCR for scans) and
# publishes one .zip pack per subject on the "atlas-library" release, where the app
# downloads them (Agents > Atlas library). Run it from the Actions tab, or it runs
# when the Atlas script changes.
on:
workflow_dispatch:
push:
branches: [atlas-voice]
paths: ['atlas/**', '.github/workflows/atlas-packs.yml']

jobs:
release:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Make sure the release exists
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release view atlas-library >/dev/null 2>&1 || gh release create atlas-library --target "$GITHUB_SHA" \
--prerelease --title "Atlas library packs" --notes "Subject packs for the Atlas app (Settings > Offline Library). Built automatically from free, public sources."
gh release edit atlas-library --prerelease || true

pack:
needs: release
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 355
strategy:
fail-fast: false
max-parallel: 4
matrix:
include:
- only: 01_Medical
- only: 06_Survival_Navigation,09_Visual_Atlases
- only: 02_Water_Sanitation
- only: 03_Food_Agriculture
- only: 04_Engineering_Repair
- only: 07_Civilization_Crafts
ocr: '40'
- only: 05_Science_Measurement,08_General_Reference
- only: 90_Human_Read_Only
ocr: '40'
steps:
- uses: actions/checkout@v5
- name: Free disk space
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL || true
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install converter
run: |
pip install --quiet --only-binary=:all: pymupdf==1.26.4 pymupdf4llm==0.0.27 rapidocr-onnxruntime==1.4.4 numpy==2.1.3
- name: Download sources
env:
ATLAS_ONLY: ${{ matrix.only }}
run: python atlas/atlas_all.py "$RUNNER_TEMP/lib" 2
- name: Convert to text and make packs
env:
ATLAS_ONLY: ${{ matrix.only }}
OCR_MAX_PAGES: ${{ matrix.ocr || '120' }}
run: python atlas/atlas_all.py "$RUNNER_TEMP/lib" 3
- name: Upload the list of failed downloads
if: always()
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release view atlas-build-reports >/dev/null 2>&1 || gh release create atlas-build-reports --prerelease --target "$GITHUB_SHA" --title "Atlas build reports" --notes "Lists of sources the library builder could not download (for fixing links)."
f="$RUNNER_TEMP/lib/00_MANIFESTS/FAILED_WHY.txt"
[ -e "$f" ] || exit 0
name="failed-$(echo '${{ matrix.only }}' | tr ',/' '__').txt"
cp "$f" "$name"
gh release upload atlas-build-reports "$name" --clobber
- name: Upload packs to the release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
ls -la "$RUNNER_TEMP/lib/ATLAS_for_OffGrid/Packs" || exit 0
for f in "$RUNNER_TEMP"/lib/ATLAS_for_OffGrid/Packs/*.zip; do
[ -e "$f" ] || continue
[ "$(basename "$f")" = "00_Atlas_Cards.zip" ] && continue
echo "::notice title=Pack uploaded::$(basename "$f") $(du -h "$f" | cut -f1)"
gh release upload atlas-library "$f" --clobber
done
38 changes: 38 additions & 0 deletions .github/workflows/atlas-voices.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build Atlas voices

# Repackages free natural-voice models (Kokoro, Piper; from the sherpa-onnx project) as plain
# .zip files on the "atlas-voices" release, so the app can download and unpack them easily.
on:
workflow_dispatch:
push:
branches: [atlas-voice]
paths: ['.github/workflows/atlas-voices.yml']

permissions:
contents: write

jobs:
voices:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Repackage voices
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
set -e
gh release view atlas-voices >/dev/null 2>&1 || gh release create atlas-voices --prerelease --target "$GITHUB_SHA" \
--title "Atlas voices" --notes "Natural offline voices for the Atlas app (Settings > Models > Voice). Kokoro (Apache-2.0) and Piper voices, packaged from the sherpa-onnx project."
gh release edit atlas-voices --prerelease || true
mkdir -p work && cd work
for pair in kokoro-en:kokoro-int8-en-v0_19 piper-amy:vits-piper-en_US-amy-medium piper-ryan:vits-piper-en_US-ryan-medium \
piper-lessac:vits-piper-en_US-lessac-medium piper-joe:vits-piper-en_US-joe-medium piper-hfc:vits-piper-en_US-hfc_female-medium; do
id=${pair%%:*}; src=${pair#*:}
curl --fail --silent --show-error --location --retry 3 --proto '=https' --proto-redir '=https' -o "$src.tar.bz2" "https://github.com/k2-fsa/sherpa-onnx/releases/download/tts-models/$src.tar.bz2"
tar -xjf "$src.tar.bz2" && rm "$src.tar.bz2"
(cd "$src" && zip -q -r -1 "../$id.zip" .)
rm -rf "$src"
echo "::notice title=Voice $id::$(du -h $id.zip | cut -f1)"
gh release upload atlas-voices "$id.zip" --clobber
rm "$id.zip"
done
Loading