-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (70 loc) · 2.27 KB
/
Copy pathlinux.yml
File metadata and controls
81 lines (70 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Linux Build & Test
on:
workflow_call:
inputs:
upload_release:
type: boolean
default: false
description: 'Upload to GitHub Release'
workflow_dispatch:
jobs:
build-linux:
name: Linux ${{ matrix.name }} Build & Test
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- arch: x64
name: x86_64
runner: ubuntu-24.04
target: x86_64-unknown-linux-gnu
artifact: echolet-linux-x64
- arch: arm64
name: ARM64
runner: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
artifact: echolet-linux-arm64
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install Linux system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev pkg-config zstd jq curl
- name: Cache Cargo dependencies and build cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ matrix.arch }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.arch }}-cargo-
- name: Cache Echolet Base Model Archive
uses: actions/cache@v4
with:
path: |
dist/model-*.tar.zst
key: echolet-base-model-${{ hashFiles('models/base-model.lock.json') }}
- name: Acquire native runtime and frozen base model
run: |
./scripts/download-official-assets.sh ${{ matrix.arch }}
- name: Run automated test suite
run: |
cargo test --release -- --nocapture
- name: Build and verify Linux release bundle
run: |
./scripts/linux/build-release.sh ${{ matrix.arch }}
- name: Publish to GitHub Release
if: ${{ inputs.upload_release }}
uses: softprops/action-gh-release@v2
with:
files: dist/${{ matrix.artifact }}.tar.gz