Skip to content

Commit 16a23b9

Browse files
committed
add missing tools into cli
1 parent 71f1b8b commit 16a23b9

File tree

11 files changed

+1354
-503
lines changed

11 files changed

+1354
-503
lines changed

.github/workflows/release.yml

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ env:
1212

1313
jobs:
1414
build:
15-
name: Build ${{ matrix.target }}
15+
name: Build ${{ matrix.asset_name }}
1616
runs-on: ${{ matrix.os }}
1717
strategy:
1818
fail-fast: false
@@ -29,12 +29,33 @@ jobs:
2929
artifact_name: ash
3030
asset_name: ash-macos-aarch64
3131
use_cross: false
32-
# Linux
32+
# Linux - latest (Ubuntu 24.04)
3333
- target: x86_64-unknown-linux-gnu
3434
os: ubuntu-latest
3535
artifact_name: ash
3636
asset_name: ash-linux-x86_64
3737
use_cross: false
38+
# Linux - Ubuntu 22.04
39+
- target: x86_64-unknown-linux-gnu
40+
os: ubuntu-22.04
41+
artifact_name: ash
42+
asset_name: ash-linux-x86_64-ubuntu2204
43+
use_cross: false
44+
# Linux - Ubuntu 20.04 (via Docker, runner no longer available)
45+
- target: x86_64-unknown-linux-gnu
46+
os: ubuntu-latest
47+
artifact_name: ash
48+
asset_name: ash-linux-x86_64-ubuntu2004
49+
use_cross: false
50+
docker_image: ubuntu:20.04
51+
# Linux - Ubuntu 18.04 (via Docker, runner no longer available)
52+
- target: x86_64-unknown-linux-gnu
53+
os: ubuntu-latest
54+
artifact_name: ash
55+
asset_name: ash-linux-x86_64-ubuntu1804
56+
use_cross: false
57+
docker_image: ubuntu:18.04
58+
# Linux aarch64
3859
- target: aarch64-unknown-linux-gnu
3960
os: ubuntu-latest
4061
artifact_name: ash
@@ -46,6 +67,7 @@ jobs:
4667
uses: actions/checkout@v4
4768

4869
- name: Install Rust toolchain
70+
if: ${{ !matrix.docker_image }}
4971
uses: dtolnay/rust-toolchain@stable
5072
with:
5173
targets: ${{ matrix.target }}
@@ -55,24 +77,50 @@ jobs:
5577
run: cargo install cross --git https://github.com/cross-rs/cross
5678

5779
- name: Build (native)
58-
if: ${{ !matrix.use_cross }}
80+
if: ${{ !matrix.use_cross && !matrix.docker_image }}
5981
run: cargo build --release --target ${{ matrix.target }}
6082

6183
- name: Build (cross)
6284
if: matrix.use_cross
6385
run: cross build --release --target ${{ matrix.target }}
6486

87+
- name: Build (Docker - older Ubuntu)
88+
if: ${{ matrix.docker_image }}
89+
run: |
90+
docker run --rm \
91+
-v "${{ github.workspace }}:/workspace" \
92+
-w /workspace \
93+
-e CARGO_TERM_COLOR=always \
94+
${{ matrix.docker_image }} bash -c '
95+
set -e
96+
97+
# Fix apt sources for EOL releases
98+
apt-get update 2>/dev/null || {
99+
sed -i "s|archive.ubuntu.com|old-releases.ubuntu.com|g" /etc/apt/sources.list
100+
sed -i "s|security.ubuntu.com|old-releases.ubuntu.com|g" /etc/apt/sources.list
101+
apt-get update
102+
}
103+
104+
apt-get install -y curl build-essential pkg-config perl ca-certificates
105+
106+
# Install Rust
107+
curl --proto "=https" --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
108+
. "$HOME/.cargo/env"
109+
110+
cargo build --release --target ${{ matrix.target }}
111+
'
112+
65113
- name: Package artifacts
66114
run: |
67115
mkdir -p dist
68116
cp target/${{ matrix.target }}/release/ash dist/${{ matrix.asset_name }}
69117
cp target/${{ matrix.target }}/release/ash-mcp dist/${{ matrix.asset_name }}-mcp
70118
chmod +x dist/*
71-
119+
72120
# Create tarball
73121
cd dist
74122
tar -czvf ${{ matrix.asset_name }}.tar.gz ${{ matrix.asset_name }} ${{ matrix.asset_name }}-mcp
75-
123+
76124
# Create sha256
77125
shasum -a 256 ${{ matrix.asset_name }}.tar.gz > ${{ matrix.asset_name }}.tar.gz.sha256
78126

0 commit comments

Comments
 (0)