reduce git2 features and add musl build step

fix tabs

integrate linux musl builds in CD pipeline
This commit is contained in:
Stephan Dilly 2020-04-16 13:03:55 +02:00
parent e50f15f72b
commit 7a479b1896
5 changed files with 28 additions and 43 deletions

View File

@ -23,13 +23,19 @@ jobs:
run: make test
- name: Run clippy
run: make clippy
- name: Setup MUSL
if: matrix.os == 'ubuntu-latest'
run: |
rustup target add x86_64-unknown-linux-musl
sudo apt-get -qq install musl-tools
- name: Build Release Mac
if: matrix.os == 'macos-latest'
run: make release-mac
- name: Build Release Linux
if: matrix.os == 'ubuntu-latest'
run: make release-linux
run: make release-linux-musl
- name: Set SHA
if: matrix.os == 'macos-latest'
@ -44,6 +50,7 @@ jobs:
prerelease: true
files: |
./release/*.tar.gz
./release/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -28,6 +28,20 @@ jobs:
- name: Build Release
run: make build-release
build-linux-musl:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup MUSL
run: |
rustup target add x86_64-unknown-linux-musl
sudo apt-get -qq install musl-tools
- name: Build Debug
run: cargo build --target=x86_64-unknown-linux-musl
- name: Build Release
run: |
cargo build --release --target=x86_64-unknown-linux-musl
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest

37
Cargo.lock generated
View File

@ -276,8 +276,6 @@ dependencies = [
"libc",
"libgit2-sys",
"log",
"openssl-probe",
"openssl-sys",
"url",
]
@ -386,26 +384,10 @@ checksum = "7637dc15e7f05a16011723e0448655081fc01a374bcd368e2c9b9c7f5c5ab3ea"
dependencies = [
"cc",
"libc",
"libssh2-sys",
"libz-sys",
"openssl-sys",
"pkg-config",
]
[[package]]
name = "libssh2-sys"
version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7bb70f29dc7c31d32c97577f13f41221af981b31248083e347b7f2c39225a6bc"
dependencies = [
"cc",
"libc",
"libz-sys",
"openssl-sys",
"pkg-config",
"vcpkg",
]
[[package]]
name = "libz-sys"
version = "1.0.25"
@ -528,25 +510,6 @@ dependencies = [
"libc",
]
[[package]]
name = "openssl-probe"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
[[package]]
name = "openssl-sys"
version = "0.9.54"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1024c0a59774200a555087a6da3f253a9095a5f344e353b212ac4c8b8e450986"
dependencies = [
"autocfg",
"cc",
"libc",
"pkg-config",
"vcpkg",
]
[[package]]
name = "parking_lot"
version = "0.10.0"

View File

@ -1,5 +1,5 @@
.PHONY: test
.PHONY: debug build-release release-linux-musl test clippy clippy-pedantic install install-debug
debug:
GITUI_LOGGING=true cargo run --features=timing
@ -12,10 +12,11 @@ release-mac: build-release
mkdir -p release
tar -C ./target/release/ -czvf ./release/gitui-mac.tar.gz ./gitui
release-linux: build-release
strip target/release/gitui
release-linux-musl:
cargo build --release --target=x86_64-unknown-linux-musl
strip target/x86_64-unknown-linux-musl/release/gitui
mkdir -p release
tar -C ./target/release/ -czvf ./release/gitui-linux.tar.gz ./gitui
tar -C ./target/x86_64-unknown-linux-musl/release/ -czvf ./release/gitui-linux-musl.tar.gz ./gitui
test:
cargo test --workspace

View File

@ -10,7 +10,7 @@ license = "MIT"
categories = ["concurrency","asynchronous"]
[dependencies]
git2 = "0.13.2"
git2 = { version = "0.13.2", default-features = false }
rayon-core = "1.7"
crossbeam-channel = "0.4"
log = "0.4"