Skip to content

Commit

Permalink
Setup CI for cargo msrv.
Browse files Browse the repository at this point in the history
  • Loading branch information
orium committed Jul 31, 2023
1 parent 13b3e8f commit 8a5c756
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 11 deletions.
33 changes: 28 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@ env:

jobs:
check:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest]
runs-on: ubuntu-latest

steps:
- name: Install dependencies
Expand All @@ -44,3 +40,30 @@ jobs:

- name: Check everything
run: bash ./tools/check.sh

msrv:
runs-on: ubuntu-latest

steps:
- name: Install dependencies
run: |
sudo apt-get install -y libpango1.0-dev libgraphene-1.0-dev libgtk-4-dev
- name: Install rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
default: true

- name: Install cargo plugins
run: |
cargo install cargo-msrv
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 2

- name: Check the minimum supported rust version
run: cargo msrv verify
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version = "0.1.3-pre"
authors = ["Diogo Sousa <[email protected]>"]

edition = "2021"
rust-version = "1.64.0"
rust-version = "1.71.0"

homepage = "https://github.com/orium/shrug"
repository = "https://github.com/orium/shrug"
Expand Down
9 changes: 4 additions & 5 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ use config::Alias;
use config::Config;
use gdk::Key;
use gdk4 as gdk;
use gdk4::glib::Type;
use gio::prelude::*;
use gtk4::Inhibit;
use glib::{ControlFlow, Priority};
use gtk::prelude::*;
use gtk4 as gtk;
use gtk4::Inhibit;
use rayon::prelude::*;
use std::os::unix::net::{UnixListener, UnixStream};
use std::path::{Path, PathBuf};
use std::sync::Arc;
use sublime_fuzzy::FuzzySearch;
use gdk4::glib::Type;
use glib::{ControlFlow, Priority};

fn paste_and_hide(
window: &gtk::Window,
Expand Down Expand Up @@ -114,8 +114,7 @@ fn build_ui(app: &gtk::Application, config: Config, show_listener: Arc<UnixListe
tree_view.append_column(&column);
}

let store: gtk::TreeStore =
gtk::TreeStore::new(&[Type::STRING, Type::STRING, Type::I64]);
let store: gtk::TreeStore = gtk::TreeStore::new(&[Type::STRING, Type::STRING, Type::I64]);

for alias in config.aliases() {
store.set(&store.append(None), &[(0, &alias.key), (1, &alias.value), (2, &0i64)]);
Expand Down

0 comments on commit 8a5c756

Please sign in to comment.