Skip to content

Commit 1b2a45d

Browse files
authored
Add support for x86 64 alpine linux musl (#22)
* Add configuration wizard and update dependencies * Add x86_64-alpine target to CD workflow jobs * Enable trigger on pull_request in cd workflow * Remove wizard functionality and dialoguer dependency * Remove tiktoken-rs dependency from Cargo.toml * Remove obsolete configuration wizard module * Update README with precompiled binary installation steps * Update target from alpine to unknown in workflow config * Fix YAML syntax alignment in CD workflow file * Add openssl-sys dependency; update CD workflow for musl target
1 parent 0ba27ab commit 1b2a45d

File tree

4 files changed

+38
-1
lines changed

4 files changed

+38
-1
lines changed

.github/workflows/cd.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- main
7+
pull_request:
78

89
concurrency:
910
group: ${{ github.workflow }}-${{ github.ref }}
@@ -28,6 +29,8 @@ jobs:
2829
target: x86_64-unknown-linux-gnu
2930
- os: macos-latest
3031
target: aarch64-apple-darwin
32+
- os: ubuntu-latest
33+
target: x86_64-unknown-linux-musl
3134
runs-on: ${{ matrix.os }}
3235
continue-on-error: false
3336
steps:
@@ -49,6 +52,21 @@ jobs:
4952
override: true
5053
profile: minimal
5154

55+
- name: Add Specific Targets
56+
run: |
57+
if [[ "${{ matrix.target }}" == "x86_64-unknown-linux-musl" ]]; then
58+
rustup target add x86_64-unknown-linux-musl
59+
sudo apt-get update && sudo apt-get install -y musl-tools
60+
elif [[ "${{ matrix.target }}" == "wasm32-unknown-unknown" ]]; then
61+
rustup target add wasm32-unknown-unknown
62+
fi
63+
64+
- name: Install Dependencies for musl Target
65+
if: matrix.target == 'x86_64-unknown-linux-musl'
66+
run: |
67+
sudo apt-get update
68+
sudo apt-get install -y pkg-config libssl-dev
69+
5270
- name: Ensure no changes
5371
run: git diff --exit-code --quiet && cargo check
5472

@@ -80,6 +98,7 @@ jobs:
8098
release:
8199
needs: build
82100
runs-on: ubuntu-latest
101+
if: github.ref == 'refs/heads/main'
83102
steps:
84103
- uses: actions/checkout@v4
85104
- name: Setup Rust

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ structopt = "0.3.26"
4747
thiserror = "1.0.61"
4848
tokio = { version = "1.38.0", features = ["rt-multi-thread"] }
4949
tiktoken-rs = { version = "0.5.9" }
50+
openssl-sys = { version = "0.9.102", features = ["vendored"] }
5051

5152
[dev-dependencies]
5253
tempfile = "3.10.1"

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,15 @@
1111
## Quick Start
1212

1313
```bash
14-
# Install Git AI
14+
# Install Git AI from source
1515
cargo install git-ai
1616

17+
# alternatively, install a precompiled binary with cargo-binstall
18+
cargo install cargo-binstall
19+
20+
# install the precompiled binary
21+
cargo binstall git-ai
22+
1723
# Set your OpenAI API key
1824
git-ai config set openai-api-key <your key>
1925

0 commit comments

Comments
 (0)