Skip to content

sparse streams

sparse streams #351

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.ref == 'refs/heads/master' && github.run_id || github.head_ref || github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-24.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun lint
- run: bun test
- run: bun run build
benchmark:
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun link
- name: install sparse image tool
run: sudo apt-get update && sudo apt-get install -y android-sdk-libsparse-utils
- name: download system image
run: |
url=$(curl https://raw.githubusercontent.com/commaai/openpilot/master/system/hardware/tici/agnos.json | jq -r ".[] | select(.name == \"system\") | .url")
curl -L $url | unxz > system.img
- name: generate raw system image
run: simg2img system.img system-raw.img
- name: run sparse benchmark
run: timeout 15s simg2img.js system.img /tmp/system-raw.img
- name: check output matches
run: cmp system-raw.img /tmp/system-raw.img
demo:
runs-on: ubuntu-24.04
timeout-minutes: 1
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- run: bun install
- run: bun link
- run: cd demo; bun install
- run: cd demo; bun check
- run: cd demo; bun run build
- name: Upload artifact
if: github.ref == 'refs/heads/master'
uses: actions/upload-pages-artifact@v3
with:
path: ./demo/dist
deploy:
if: github.ref == 'refs/heads/master'
needs:
- demo
- test
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-24.04
timeout-minutes: 1
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4