You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by li...@apache.org on 2022/11/08 09:36:44 UTC

[dubbo-rust] branch main updated: fix ci, set protoc (#56)

This is an automated email from the ASF dual-hosted git repository.

liujun pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/dubbo-rust.git


The following commit(s) were added to refs/heads/main by this push:
     new c73cd33  fix ci, set protoc (#56)
c73cd33 is described below

commit c73cd33867139eea357cf04491b03d57b05da2b7
Author: Robert LU <ro...@alibaba-inc.com>
AuthorDate: Tue Nov 8 17:36:38 2022 +0800

    fix ci, set protoc (#56)
---
 .github/workflows/github-actions.yml | 42 +++++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 20 deletions(-)

diff --git a/.github/workflows/github-actions.yml b/.github/workflows/github-actions.yml
index 2bd7ad1..e69ee90 100644
--- a/.github/workflows/github-actions.yml
+++ b/.github/workflows/github-actions.yml
@@ -13,11 +13,7 @@ on:
 jobs:
   check:
     name: check dubbo-rust project
-    runs-on: ${{ matrix.os }}
-    strategy:
-      matrix:
-        os: [ubuntu-latest, macOS-latest, windows-latest]
-        rust: [stable]
+    runs-on: ubuntu-latest
 
     env:
       RUSTFLAGS: "-D warnings"
@@ -26,26 +22,27 @@ jobs:
       - uses: actions/checkout@main
       - uses: actions-rs/toolchain@v1
         with:
-          toolchain: ${{ matrix.rust }}
-      - name: Install Protoc
-        uses: arduino/setup-protoc@v1
-        with:
-          repo-token: ${{ secrets.GITHUB_TOKEN }}
+          toolchain: stable
+      - name: setup protoc
+        run: |
+          mkdir $HOME/protoc/ -p &&
+          cd $HOME/protoc/ &&
+          curl --location --silent --output /tmp/protoc-21.9-linux-x86_64.zip \
+          https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-linux-x86_64.zip &&
+          unzip /tmp/protoc-21.9-linux-x86_64.zip &&
+          echo "$HOME/protoc/bin" >> $GITHUB_PATH
+        shell: bash
       - run: cargo check
 
   fmt:
     name: Rustfmt
-    runs-on: ${{ matrix.os }}
-    strategy:
-      matrix:
-        os: [ubuntu-latest, macOS-latest, windows-latest]
-        rust: [stable]
+    runs-on: ubuntu-latest
 
     steps:
       - uses: actions/checkout@main
       - uses: actions-rs/toolchain@v1
         with:
-          toolchain: ${{ matrix.rust }}
+          toolchain: stable
       - run: rustup component add rustfmt
       - run: cargo fmt --all -- --check
 
@@ -57,10 +54,15 @@ jobs:
       - uses: actions-rs/toolchain@v1
         with:
           toolchain: stable
-      - name: Install Protoc
-        uses: arduino/setup-protoc@v1
-        with:
-          repo-token: ${{ secrets.GITHUB_TOKEN }}
+      - name: setup protoc
+        run: |
+          mkdir $HOME/protoc/ -p &&
+          cd $HOME/protoc/ &&
+          curl --location --silent --output /tmp/protoc-21.9-linux-x86_64.zip \
+          https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-linux-x86_64.zip &&
+          unzip /tmp/protoc-21.9-linux-x86_64.zip &&
+          echo "$HOME/protoc/bin" >> $GITHUB_PATH
+        shell: bash
       - name: Set up cargo cache
         uses: actions/cache@v3
         continue-on-error: false