From 99fb12910fca48f793137dab6219c8ecdca4f91c Mon Sep 17 00:00:00 2001 From: Adam Wick Date: Fri, 7 Apr 2023 10:37:43 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A4=96=20=20Make=20Github=20Actions=20wor?= =?UTF-8?q?k=20(#1)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/rust.yml | 33 +++++++++++++++++++++++++++++++++ src/bin/ngri.rs | 1 + 2 files changed, 34 insertions(+) create mode 100644 .github/workflows/rust.yml diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..49785b2 --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,33 @@ +name: Rust + +on: + push: + branches: [ "develop", "ci" ] + pull_request: + branches: [ "develop" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + rust: [stable] + + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: Install toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.rust }} + default: true + override: true + - name: Build + run: cargo build + - name: Format Check + run: cargo fmt --check + - name: Run tests + run: cargo test diff --git a/src/bin/ngri.rs b/src/bin/ngri.rs index 772016b..c78179f 100644 --- a/src/bin/ngri.rs +++ b/src/bin/ngri.rs @@ -141,6 +141,7 @@ fn main() -> Result<(), BackendError> { } Err(ReadlineError::Eof) => break, Err(ReadlineError::Interrupted) => break, + #[cfg(not(windows))] Err(ReadlineError::Errno(e)) => { eprintln!("Unknown syscall error: {}", e); break;