Skip to content

Commit

Permalink
use musl build
Browse files Browse the repository at this point in the history
  • Loading branch information
m42e committed Jul 5, 2024
1 parent d73823e commit 510c751
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 28 deletions.
30 changes: 8 additions & 22 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ jobs:
- run: cargo fmt -- --check

build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
runs-on: ubuntu-latest

steps:
- name: Checkout
Expand All @@ -39,34 +36,23 @@ jobs:
toolchain: beta
default: true
override: true
- name: Install system dependencies
run: |
sudo apt-get update \
&& sudo apt-get install -y \
libdbus-1-dev libsqlite3-dev libssl-dev pkg-config
- name: Install dependencies
if: matrix.os == 'ubuntu-20.04'
run: |
sudo apt-get update \
&& sudo apt-get install -y \
libdbus-1-dev libsqlite3-dev libssl-dev pkg-config libc6
- name: Target
run: rustup target add x86_64-unknown-linux-musl

- name: Install dependencies
if: matrix.os != 'ubuntu-20.04'
- name: Install system dependencies
run: |
sudo apt-get update \
&& sudo apt-get install -y \
libdbus-1-dev libsqlite3-dev libssl-dev pkg-config
libdbus-1-dev
- name: Build
run: cargo build --all --release && strip target/release/zsh-histdb-skim target/release/zsh-histdb-skim
run: cargo build --all --release --target x86_64-unknown-linux-musl && strip target/x86_64-unknown-linux-musl/release/zsh-histdb-skim

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/zsh-histdb-skim
asset_name: zsh-histdb-skim-linux-x64-${{ matrix.os }}
file: target/x86_64-unknown-linux-musl/release/zsh-histdb-skim
asset_name: zsh-histdb-skim-linux-x64
tag: ${{ github.ref }}
overwrite: true

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "zsh-histdb-skim"
version = "0.9.2"
version = "0.9.3"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ fn main() -> Result<()> {
}(args);

if query == "--version" {
println!("v0.9.2");
println!("v0.9.3");
std::process::exit(1);
}

Expand Down
7 changes: 3 additions & 4 deletions zsh-histdb-skim.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ XDG_BIN_PATH=${XDG_DATA_HOME:-$HOME/.local/share}/zsh-histdb-skim/
BIN_DIR=${HISTDB_SKIM_PATH:-${XDG_BIN_PATH}}
BIN_PATH=${BIN_DIR}/zsh-histdb-skim

HISTB_SKIM_VERSION="v0.9.2"
HISTB_SKIM_VERSION="v0.9.3"

histdb-skim-get-os(){
UNAME_STR=`uname -a`
Expand All @@ -12,9 +12,8 @@ histdb-skim-get-os(){
if [[ ( $UNAME_STR =~ '.*Darwin.*' ) && ( $UNAME_STR =~ '.*arm64.*') ]]; then
echo -n "darwin-arm"
fi
if [ -f /etc/lsb-release ]; then
VERSION=$(lsb_release -rs)
echo -n "linux-x64-ubuntu-${VERSION}"
if [[ ( $UNAME_STR =~ '.*Linux.*' ) && ( $UNAME_STR =~ '.*x86_64.*') ]]; then
echo -n "linux-x64"
fi
}

Expand Down

0 comments on commit 510c751

Please sign in to comment.