Skip to content

Commit

Permalink
Added install protoc to git workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
tmrlvi committed Aug 23, 2022
1 parent be15be5 commit 107d012
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 33 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install Protoc
uses: arduino/setup-protoc@v1

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -63,6 +66,9 @@ jobs:
if: runner.os == 'Windows'
run: git config --global core.autocrlf false

- name: Install Protoc
uses: arduino/setup-protoc@v1

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -150,6 +156,9 @@ jobs:
if: runner.os == 'Windows'
run: git config --global core.autocrlf false

- name: Install Protoc
uses: arduino/setup-protoc@v1

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -213,13 +222,17 @@ jobs:
with:
command: test
args: --release -p kaspaopencl

lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install Protoc
uses: arduino/setup-protoc@v1

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ jobs:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Install Protoc
uses: arduino/setup-protoc@v1

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
Expand Down Expand Up @@ -120,6 +123,9 @@ jobs:
- name: Check out code into the module directory
uses: actions/checkout@v2

- name: Install Protoc
uses: arduino/setup-protoc@v1

- name: Setup Rust
uses: actions-rs/toolchain@v1
with:
Expand Down
35 changes: 6 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ include = [
[dependencies]
tonic = "0.8"
tokio = { version = "1.17", features = ["macros", "rt-multi-thread"] }
prost = "0.10"
prost = "0.11"
futures-util = "0.3"
tokio-stream = {version = "0.1", features = ["net"]}
once_cell = "1"
Expand Down Expand Up @@ -68,7 +68,6 @@ codegen-units = 1

[build-dependencies]
tonic-build = { version = "0.8", default-features = false, features = ["prost", "transport"] }
#protobuf-src = "1.0"
cc = "1"
time = { version = "0.3", features = ["formatting"] }

Expand Down
2 changes: 0 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ use std::env;
use time::{format_description, OffsetDateTime};

fn main() -> Result<(), Box<dyn std::error::Error>> {
//std::env::set_var("PROTOC", protobuf_src::protoc());

let format = format_description::parse("[year repr:last_two][month][day][hour][minute]")?;
let dt = OffsetDateTime::now_utc().format(&format)?;
//env::set_var("PACKAGE_COMPILE_TIME", dt);
println!("cargo:rustc-env=PACKAGE_COMPILE_TIME={}", dt);

println!("cargo:rerun-if-changed=proto");
Expand Down

0 comments on commit 107d012

Please sign in to comment.