灵符lingfu

ling-station

↓ 0 downloads

LingStationX: a DAW in Ling with a piano roll, arranger, performance view, theory-aware score fixing, Qwen instrument choice, Prism / Growl / Synth X / Membrane instruments and Ling-design-system effect windows

Windows · x86-64Linux · x86-64LingOS · x86-64LingOS · Pi 5 ARM64Web · WASM
Keywords daw, music, midi, synth, sequencer, ling
lingfu install ling-station
LicenseApache-2.0 OR MIT
Authorsling-lin
READMECode / FilesVersionsDependency GraphDependentsSecurityBuildsSettings

Code / Files (907)

.github/workflows/build.yml
# Builds and publishes every LingStationX distributable with tools/build.py: Windows, Linux, macOS (Apple Silicon and Intel) on their
# own runners (macOS has no cross-compile path), the WebAssembly bundle, and the LingOS x86_64 ISO + Raspberry Pi 5 image.
# Pushing a tag "v*" builds everything and attaches the archives and images to a GitHub release of that tag; "Run workflow" builds
# without releasing. The Ling compiler and LingOS are checked out next to this repo, as the script expects (../ling, ../LingOS):
# the branches named below must be pushed to GitHub with the engine changes this LingStationX needs, and the LingOS job also needs
# taellinglin/bring-browser, horizon-browser and ling-messenger (the kernel's sibling crates) on GitHub.
name: Build LingStationX

on:
  workflow_dispatch:
    inputs:
      ling_ref: { description: "branch / tag of taellinglin/ling to build with", default: "lingstationx" }
      lingos_ref: { description: "branch / tag of taellinglin/LingOS", default: "master" }
  push:
    tags: ["v*"]

env:
  CARGO_TERM_COLOR: always
  LING_REF: ${{ inputs.ling_ref || 'lingstationx' }}
  LINGOS_REF: ${{ inputs.lingos_ref || 'master' }}

permissions:
  contents: write

jobs:
  desktop:
    strategy:
      fail-fast: false
      matrix:
        include:
          - { os: windows-latest, target: win }
          - { os: ubuntu-latest, target: lin }
          - { os: macos-latest, target: mac }   # Apple Silicon
          - { os: macos-13, target: mac }       # Intel
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/checkout@v4
        with: { path: LingStationX }
      - uses: actions/checkout@v4
        with: { repository: taellinglin/ling, ref: "${{ env.LING_REF }}", path: ling }
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
        with: { workspaces: "ling -> target" }
      - name: Linux packages (minifb wants X11 / Wayland headers, cpal ALSA, ling-mic udev)
        if: runner.os == 'Linux'
        run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libasound2-dev libudev-dev libxkbcommon-dev libwayland-dev xorg-dev
      # the ling-kernel workspace member needs LingOS-only sibling crates (bring-browser, horizon-browser, ling-messenger) that the
      # desktop and web builds never use: without them cargo cannot load the workspace, so the member is left out here
      - name: Workspace without the LingOS kernel crate
        shell: bash
        run: perl -i -ne 'print unless /"crates\/ling-kernel",/' ling/Cargo.toml
      - name: Build the Ling compiler
        run: cargo build --release --bin ling --bin lingc
        working-directory: ling
      # llm: the in-process language model, Whisper and the native RVC engine on the CPU (CUDA needs the toolkit on the machine)
      - name: Build LingStationX (${{ matrix.target }})
        run: python tools/build.py ${{ matrix.target }} --features llm
        working-directory: LingStationX
      - uses: actions/upload-artifact@v4
        with:
          name: LingStationX-${{ matrix.target }}-${{ matrix.os }}
          path: |
            LingStationX/dist/LingStationX-*.zip
            LingStationX/dist/LingStationX-*.tar.gz

  web:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { path: LingStationX }
      - uses: actions/checkout@v4
        with: { repository: taellinglin/ling, ref: "${{ env.LING_REF }}", path: ling }
      - uses: dtolnay/rust-toolchain@stable
        with: { targets: wasm32-unknown-unknown }
      - uses: Swatinem/rust-cache@v2
        with: { workspaces: "ling -> target" }
      - run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libasound2-dev libudev-dev libxkbcommon-dev libwayland-dev xorg-dev
      - run: cargo install wasm-pack
      # the ling-kernel workspace member needs LingOS-only sibling crates (bring-browser, horizon-browser, ling-messenger) that the
      # desktop and web builds never use: without them cargo cannot load the workspace, so the member is left out here
      - name: Workspace without the LingOS kernel crate
        shell: bash
        run: perl -i -ne 'print unless /"crates\/ling-kernel",/' ling/Cargo.toml
      - run: cargo build --release --bin ling --bin lingc
        working-directory: ling
      - run: python tools/build.py web
        working-directory: LingStationX
      - uses: actions/upload-artifact@v4
        with: { name: LingStationX-web, path: LingStationX/dist/web }

  lingos:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { path: LingStationX }
      - uses: actions/checkout@v4
        with: { repository: taellinglin/ling, ref: "${{ env.LING_REF }}", path: ling }
      - uses: actions/checkout@v4
        with: { repository: taellinglin/LingOS, ref: "${{ env.LINGOS_REF }}", path: LingOS }
      # the kernel's own crates outside the Ling repo (ling/crates/ling-kernel reads them at ../../../<name>)
      - uses: actions/checkout@v4
        with: { repository: taellinglin/bring-browser, path: bring-browser }
      - uses: actions/checkout@v4
        with: { repository: taellinglin/horizon-browser, path: horizon-browser }
      - uses: actions/checkout@v4
        with: { repository: taellinglin/ling-messenger, path: ling-messenger }
      - uses: dtolnay/rust-toolchain@stable
      # the kernels are no_std builds on nightly with build-std (ling build --platform kernel / rpi runs cargo +nightly)
      - uses: dtolnay/rust-toolchain@nightly
        with: { components: rust-src, targets: "x86_64-unknown-none, aarch64-unknown-none" }
      - uses: Swatinem/rust-cache@v2
        with: { workspaces: "ling -> target" }
      - name: Packages (grub-mkrescue, xorriso, mtools, nasm for the images; LLVM for kernel8.img)
        run: sudo apt-get update && sudo apt-get install -y --no-install-recommends grub-pc-bin grub-common xorriso mtools nasm llvm libasound2-dev libudev-dev libxkbcommon-dev libwayland-dev xorg-dev
      - run: cargo +stable build --release --bin ling --bin lingc
        working-directory: ling
      - run: python tools/build.py lingos-x86 lingos-pi5
        working-directory: LingStationX
      - uses: actions/upload-artifact@v4
        with:
          name: LingStationX-lingos
          path: |
            LingStationX/dist/lingos-x86_64
            LingStationX/dist/lingos-pi5

  # a tag: one release with everything
  release:
    # the web bundle is a preview (no DAW engine in wasm yet): it is attached when it built, and never holds the release back
    if: always() && startsWith(github.ref, 'refs/tags/v') && needs.desktop.result == 'success' && needs.lingos.result == 'success'
    needs: [desktop, web, lingos]
    runs-on: ubuntu-latest
    steps:
      - uses: actions/download-artifact@v4
        with: { path: artifacts }
      - name: Collect the files to publish
        run: |
          mkdir -p publish
          find artifacts -type f \( -name '*.zip' -o -name '*.tar.gz' -o -name '*.iso' -o -name '*-boot.img' -o -name 'kernel8.img' -o -name 'config.txt' \) -exec cp {} publish/ \;
          if [ -d artifacts/LingStationX-web ]; then (cd artifacts/LingStationX-web && zip -qr "../../publish/LingStationX-${GITHUB_REF_NAME#v}-web-preview.zip" .); fi
          ls -la publish
      - uses: softprops/action-gh-release@v2
        with:
          files: publish/*
          generate_release_notes: true

← Back to index