Skip to content

Commit

Permalink
build on different ubuntu versions
Browse files Browse the repository at this point in the history
  • Loading branch information
m42e committed Jul 5, 2024
1 parent 712e7a8 commit d73823e
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 8 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ jobs:
- run: cargo fmt -- --check

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

steps:
- name: Checkout
Expand All @@ -40,7 +43,21 @@ jobs:
run: |
sudo apt-get update \
&& sudo apt-get install -y \
libdbus-1-dev
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: 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
- name: Build
run: cargo build --all --release && strip target/release/zsh-histdb-skim target/release/zsh-histdb-skim

Expand All @@ -49,7 +66,7 @@ jobs:
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/zsh-histdb-skim
asset_name: zsh-histdb-skim-linux-x64
asset_name: zsh-histdb-skim-linux-x64-${{ matrix.os }}
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.1"
version = "0.9.2"
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.1");
println!("v0.9.2");
std::process::exit(1);
}

Expand Down
7 changes: 4 additions & 3 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.1"
HISTB_SKIM_VERSION="v0.9.2"

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

Expand Down

0 comments on commit d73823e

Please sign in to comment.