From b6c755a611b2e6df7d344d7f24627c140a329437 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Mon, 19 Dec 2022 18:04:45 +1100 Subject: [PATCH 1/3] Install protoc from apt where possible --- .github/workflows/cache-factory.yml | 4 ++-- .github/workflows/ci.yml | 25 ++++++++++--------------- 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/cache-factory.yml b/.github/workflows/cache-factory.yml index d332a547d62..2ee2b1883fa 100644 --- a/.github/workflows/cache-factory.yml +++ b/.github/workflows/cache-factory.yml @@ -34,7 +34,7 @@ jobs: rust: ${{ fromJSON(needs.gather_msrv_versions.outputs.versions) }} steps: - name: Install Protoc - uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2 + run: sudo apt-get install protobuf-compiler - uses: actions/checkout@v3 @@ -57,7 +57,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Protoc - uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2 + run: sudo apt-get install protobuf-compiler - uses: actions/checkout@v3 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55ba1b7cfa6..f0a93fc67ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,9 +21,7 @@ jobs: crate: ${{ fromJSON(needs.gather_published_crates.outputs.members) }} steps: - name: Install Protoc - uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + run: sudo apt-get install protobuf-compiler - uses: actions/checkout@v3 @@ -101,10 +99,15 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Install Protoc + if: matrix.os != "ubuntu-latest" uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Install Protoc + if: matrix.os == "ubuntu-latest" + run: sudo apt-get install protobuf-compiler + - uses: actions/checkout@v3 - uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1.0.7 @@ -130,9 +133,7 @@ jobs: - features: "mdns tcp dns async-std" steps: - name: Install Protoc - uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + run: sudo apt-get install protobuf-compiler - uses: actions/checkout@v3 @@ -153,9 +154,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Protoc - uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + run: sudo apt-get install protobuf-compiler - uses: actions/checkout@v3 @@ -183,9 +182,7 @@ jobs: ] steps: - name: Install Protoc - uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + run: sudo apt-get install protobuf-compiler - uses: actions/checkout@v3 @@ -210,9 +207,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Install Protoc - uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + run: sudo apt-get install protobuf-compiler - uses: actions/checkout@v3 From 555b41e296682b63a4f34dc5913fabfac2bdd596 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Mon, 19 Dec 2022 18:06:58 +1100 Subject: [PATCH 2/3] Fix syntax --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0a93fc67ba..0934385fd86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,13 +99,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Install Protoc - if: matrix.os != "ubuntu-latest" + if: ${{ matrix.os != "ubuntu-latest" }} uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Install Protoc - if: matrix.os == "ubuntu-latest" + if: ${{ matrix.os == "ubuntu-latest" }} run: sudo apt-get install protobuf-compiler - uses: actions/checkout@v3 From 4b8d02553a08a8c106b027a28785107d69f55d66 Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Mon, 19 Dec 2022 18:09:04 +1100 Subject: [PATCH 3/3] Github doesn't like double quotes --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0934385fd86..076249cf075 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -99,13 +99,13 @@ jobs: runs-on: ${{ matrix.os }} steps: - name: Install Protoc - if: ${{ matrix.os != "ubuntu-latest" }} + if: ${{ matrix.os != 'ubuntu-latest' }} uses: arduino/setup-protoc@64c0c85d18e984422218383b81c52f8b077404d3 # v1.1.2 with: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Install Protoc - if: ${{ matrix.os == "ubuntu-latest" }} + if: ${{ matrix.os == 'ubuntu-latest' }} run: sudo apt-get install protobuf-compiler - uses: actions/checkout@v3