瀏覽代碼

ci: install protoc binary

appflowy 3 年之前
父節點
當前提交
1ab3f42477
共有 2 個文件被更改,包括 5 次插入0 次删除
  1. 2 0
      .github/workflows/ci.yaml
  2. 3 0
      shared-lib/lib-infra/src/pb_gen.rs

+ 2 - 0
.github/workflows/ci.yaml

@@ -31,6 +31,7 @@ jobs:
         run: |
           cargo install --force cargo-make
           cargo install --force duckscript_cli
+          brew install protobuf
           cargo make flowy_dev
       - name: Build
         working-directory: frontend
@@ -71,6 +72,7 @@ jobs:
         run: |
           cargo install --force cargo-make
           cargo install --force duckscript_cli
+          sudo apt-get install protobuf-compiler
           cargo make flowy_dev
       - name: Build
         working-directory: frontend

+ 3 - 0
shared-lib/lib-infra/src/pb_gen.rs

@@ -1,8 +1,10 @@
 #![allow(unused_imports)]
+#![allow(unused_attributes)]
 use std::fs::File;
 use std::io::Write;
 use walkdir::WalkDir;
 
+#[allow(dead_code)]
 pub fn gen(name: &str, root: &str) {
     let mut paths = vec![];
     let mut file_names = vec![];
@@ -31,6 +33,7 @@ pub fn gen(name: &str, root: &str) {
 }
 
 #[cfg(feature = "dart")]
+#[allow(dead_code)]
 fn gen_pb_for_dart(name: &str, root: &str, paths: &Vec<String>, file_names: &Vec<String>) {
     let output = format!(
         "{}/{}/{}",