Skip to content

Commit

Permalink
ci: build, install and format
Browse files Browse the repository at this point in the history
  • Loading branch information
kkharji committed Jun 19, 2022
1 parent c28a0ef commit 05a05a4
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: CI
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
push:
branches:
- 'master'
jobs:
build:
name: Build & Install
env:
CARGO_INCREMENTAL: 1
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: x86_64-apple-darwin
override: true
- name: Cache Dependencies
uses: actions/cache@v2
env:
cache-name: cache-dependencies
with:
path: |
~/.cargo/.crates.toml
~/.cargo/.crates2.json
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
target
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
- name: Install
run: |
make install
# TODO(ci): test opening and closing xcodeproj in neovim and the resulting behavior
rustfmt:
name: Rustfmt
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
override: true
- run: cargo fmt -- --check
2 changes: 1 addition & 1 deletion daemon/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use log::Level;
use tap::Pipe;
use tokio::fs::{metadata, read_to_string, remove_file, write};
use tokio::io::AsyncReadExt;
use tokio::net::UnixListener;
use log::Level;
use xbase_daemon::util::pid;
use xbase_daemon::Result;
use xbase_daemon::{constants::*, RequestHandler};
Expand Down
2 changes: 1 addition & 1 deletion daemon/src/watch/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ use crate::compile::ensure_server_support;
use crate::error::EnsureOptional;
use crate::{constants::DAEMON_STATE, state::State, Result};
use async_trait::async_trait;
use log::{debug, error, info, trace};
use notify::{Config, RecommendedWatcher, RecursiveMode::Recursive, Watcher};
use std::collections::HashMap;
use std::path::PathBuf;
use std::sync::{Arc, Mutex};
use std::time::SystemTime;
use tokio::sync::mpsc::channel;
use tokio::{sync::MutexGuard, task::JoinHandle};
use log::{debug, error, info, trace};
use xbase_proto::Client;

#[derive(derive_deref_rs::Deref)]
Expand Down

0 comments on commit 05a05a4

Please sign in to comment.