From 6577893af819e0f2f90ed0ce7dc8993827dea42c Mon Sep 17 00:00:00 2001 From: Adam Wick Date: Fri, 7 Apr 2023 10:17:05 -0700 Subject: [PATCH 1/4] Create .github/workflows/rust.yml --- .github/workflows/rust.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 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..a59b657 --- /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: ${{ rust }} + default: true + override: true + - name: Build + run: cargo build --verbose + - name: Format Check + run: cargo fmt --check + - name: Run tests + run: cargo test --verbose -- 2.53.0 From d045a75676fdf30b7fa27d5f126b57d0adff288b Mon Sep 17 00:00:00 2001 From: Adam Wick Date: Fri, 7 Apr 2023 10:18:32 -0700 Subject: [PATCH 2/4] Forgot matrix. --- .github/workflows/rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index a59b657..fba4dd7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -22,7 +22,7 @@ jobs: - name: Install toolchain uses: actions-rs/toolchain@v1 with: - toolchain: ${{ rust }} + toolchain: ${{ matrix.rust }} default: true override: true - name: Build -- 2.53.0 From 90133df005a972267e6c464e51b1152c36c6d0fd Mon Sep 17 00:00:00 2001 From: Adam Wick Date: Fri, 7 Apr 2023 10:27:22 -0700 Subject: [PATCH 3/4] Don't be as verbose. --- .github/workflows/rust.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index fba4dd7..49785b2 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -26,8 +26,8 @@ jobs: default: true override: true - name: Build - run: cargo build --verbose + run: cargo build - name: Format Check run: cargo fmt --check - name: Run tests - run: cargo test --verbose + run: cargo test -- 2.53.0 From 546c4762f234a6746051a6c739563b6b4c9fdafd Mon Sep 17 00:00:00 2001 From: Adam Wick Date: Fri, 7 Apr 2023 10:30:44 -0700 Subject: [PATCH 4/4] Try to fix Windows build case. --- src/bin/ngri.rs | 1 + 1 file changed, 1 insertion(+) 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; -- 2.53.0