Skip to content

Commit 7a479b1

Browse files
author
Stephan Dilly
committed
reduce git2 features and add musl build step
fix tabs integrate linux musl builds in CD pipeline
1 parent e50f15f commit 7a479b1

File tree

5 files changed

+28
-43
lines changed

5 files changed

+28
-43
lines changed

.github/workflows/cd.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,19 @@ jobs:
2323
run: make test
2424
- name: Run clippy
2525
run: make clippy
26+
27+
- name: Setup MUSL
28+
if: matrix.os == 'ubuntu-latest'
29+
run: |
30+
rustup target add x86_64-unknown-linux-musl
31+
sudo apt-get -qq install musl-tools
2632
2733
- name: Build Release Mac
2834
if: matrix.os == 'macos-latest'
2935
run: make release-mac
3036
- name: Build Release Linux
3137
if: matrix.os == 'ubuntu-latest'
32-
run: make release-linux
38+
run: make release-linux-musl
3339

3440
- name: Set SHA
3541
if: matrix.os == 'macos-latest'
@@ -44,6 +50,7 @@ jobs:
4450
prerelease: true
4551
files: |
4652
./release/*.tar.gz
53+
./release/*.zip
4754
env:
4855
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4956

.github/workflows/ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,20 @@ jobs:
2828
- name: Build Release
2929
run: make build-release
3030

31+
build-linux-musl:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- name: Setup MUSL
36+
run: |
37+
rustup target add x86_64-unknown-linux-musl
38+
sudo apt-get -qq install musl-tools
39+
- name: Build Debug
40+
run: cargo build --target=x86_64-unknown-linux-musl
41+
- name: Build Release
42+
run: |
43+
cargo build --release --target=x86_64-unknown-linux-musl
44+
3145
rustfmt:
3246
name: Rustfmt
3347
runs-on: ubuntu-latest

Cargo.lock

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

Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
.PHONY: test
2+
.PHONY: debug build-release release-linux-musl test clippy clippy-pedantic install install-debug
33

44
debug:
55
GITUI_LOGGING=true cargo run --features=timing
@@ -12,10 +12,11 @@ release-mac: build-release
1212
mkdir -p release
1313
tar -C ./target/release/ -czvf ./release/gitui-mac.tar.gz ./gitui
1414

15-
release-linux: build-release
16-
strip target/release/gitui
15+
release-linux-musl:
16+
cargo build --release --target=x86_64-unknown-linux-musl
17+
strip target/x86_64-unknown-linux-musl/release/gitui
1718
mkdir -p release
18-
tar -C ./target/release/ -czvf ./release/gitui-linux.tar.gz ./gitui
19+
tar -C ./target/x86_64-unknown-linux-musl/release/ -czvf ./release/gitui-linux-musl.tar.gz ./gitui
1920

2021
test:
2122
cargo test --workspace

asyncgit/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ license = "MIT"
1010
categories = ["concurrency","asynchronous"]
1111

1212
[dependencies]
13-
git2 = "0.13.2"
13+
git2 = { version = "0.13.2", default-features = false }
1414
rayon-core = "1.7"
1515
crossbeam-channel = "0.4"
1616
log = "0.4"

0 commit comments

Comments
 (0)