overdub

setup-fm1-toolchain

DimmKirr/setup-fm1-toolchain · ★ 1

GitHub Action that installs the JieLi AC79 SDK and Linux toolchain for FM-1 firmware builds, mirroring both as release assets.

README from GitHub, MIT

setup-fm1-toolchain

GitHub Action that installs the JieLi AC79 SDK and Linux toolchain for FM1 firmware builds.

SDK and toolchain binaries are mirrored as separate pre-release assets on this repo (published automatically by the vendor-sync workflow). The action downloads them from the mirror, with a fallback to the upstream sources if a mirror release doesn't exist yet.

Usage

jobs:
  build:
    runs-on: ubuntu-24.04
    steps:
      - uses: actions/checkout@v4
      - uses: dimmkirr/setup-fm1-toolchain@v1
      - run: make firmware

Inputs

InputDefaultDescription
sdk-version1.2.14_2026-10-13SDK version to install (gitee tag is derived as AC79NN_SDK_V + version)
toolchain-version20260730.1Toolchain version to install
sdk-urlhttps://gitee.com/Jieli-Tech/fw-AC79_AIoT_SDKUpstream SDK repo URL (used only for fallback)
toolchain-urlhttps://pkgman.jieliapp.com/s/linux-toolchainUpstream toolchain URL (used only for fallback)
github-token${{ github.token }}Token for downloading release assets

Outputs

OutputDescription
sdk-versionSDK version installed
toolchain-versionToolchain version installed
toolchain-pathAbsolute path to the toolchain
sdk-pathAbsolute path to the SDK
cache-hitWhether the toolchain was restored from cache

Environment variables

The action sets:

  • JIELI_TOOLCHAIN — path to the JieLi Linux toolchain root
  • AC79_SDK — path to the AC79 SDK
  • Adds $JIELI_TOOLCHAIN/pi32v2/bin to PATH

Local usage (Taskfile)

The included Taskfile.yml is a local equivalent of the GitHub Action. Import it into your firmware project:

# Taskfile.yml (your project)
version: '3'

includes:
  fm1-platform:
    taskfile: https://raw.githubusercontent.com/DimmKirr/setup-fm1-toolchain/v1/Taskfile.yml

tasks:
  build:
    deps: [fm1-platform:download]
    cmds:
      - make firmware
    env:
      JIELI_TOOLCHAIN: '{{.HOME}}/.fm1-toolchain/toolchain'
      AC79_SDK: '{{.HOME}}/.fm1-toolchain/AC79_SDK'

Commands:

CommandDescription
task fm1-platform:downloadDownload SDK, toolchain, and build deps
task fm1-platform:download:sdkSDK only
task fm1-platform:download:toolchainToolchain only
task fm1-platform:download:depsBuild dependencies only
task fm1-platform:removeRemove ~/.fm1-toolchain

Installs to ~/.fm1-toolchain/ (same location as the GitHub Action). Downloads from the GitHub mirror first, falls back to upstream if the mirror release doesn't exist.

How it works

  1. vendor-sync.yml runs weekly (and on manual dispatch) to check upstream for new SDK tags and toolchain versions. New versions are downloaded, repackaged as .tar.xz, and published as pre-release mirror releases (sdk-<ver>, toolchain-<ver>) with SHA256 checksums and build provenance attestation.
  2. action.yml restores from actions/cache or downloads the SDK and toolchain from their respective mirror releases, verifies checksums, and sets environment variables. Falls back to upstream sources with a warning if a mirror release is missing.
  3. release.yml (Release workflow) tests the action against a version matrix, then creates a GitHub Release on tag push and updates the v1 major tag.

License

MIT