mirror of
https://github.com/ossf/scorecard.git
synced 2024-09-17 11:57:12 +03:00
🌱 Fix the protobuf GitHub runner issue (#801)
Fixes the protobuf GitHub runner issue by cloning the repository and installing it locally. Source https://lukasjoswiak.com/github-actions-protobuf/
This commit is contained in:
parent
6718939a08
commit
91d3d82348
50
.github/workflows/main.yml
vendored
50
.github/workflows/main.yml
vendored
@ -18,24 +18,42 @@ jobs:
|
||||
validate:
|
||||
name: Validate
|
||||
runs-on: ubuntu-latest
|
||||
# Pull requests from the same repository won't trigger this checks as they were already triggered by the push
|
||||
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
|
||||
steps:
|
||||
- name: Clone the code
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||
with:
|
||||
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
|
||||
- name: Cache protobuf library.
|
||||
id: cache-protobuf
|
||||
uses: actions/cache@d9747005de0f7240e5d35a68dca96b3f41b8b340
|
||||
with:
|
||||
path: protobuf
|
||||
key: ${{ runner.os }}-protobuf
|
||||
- name: Build protobuf library.
|
||||
if: steps.cache-protobuf.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
git clone https://github.com/protocolbuffers/protobuf.git
|
||||
cd protobuf
|
||||
git submodule update --init --recursive
|
||||
./autogen.sh
|
||||
./autogen.sh # see https://github.com/protocolbuffers/protobuf/issues/149
|
||||
./configure
|
||||
make
|
||||
make check
|
||||
- name: Install protobuf library
|
||||
run: |
|
||||
cd protobuf
|
||||
sudo make install
|
||||
sudo ldconfig
|
||||
- name: Clone the code
|
||||
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8 # v2.1.3
|
||||
with:
|
||||
go-version: '^1.16'
|
||||
- name: Run presubmit tests
|
||||
run: |
|
||||
go env -w GOFLAGS=-mod=mod
|
||||
make all
|
||||
- uses: codecov/codecov-action@29386c70ef20e286228c72b668a06fd0e8399192 # v1.5.0
|
||||
with:
|
||||
files: e2e/e2e.coverprofile,pkg/pkg.coverprofile,checks/checks.coverprofile
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@37335c7bb261b353407cff977110895fa0b4f7d8 # v2.1.3
|
||||
with:
|
||||
go-version: '^1.16'
|
||||
- name: Run presubmit tests
|
||||
run: |
|
||||
go env -w GOFLAGS=-mod=mod
|
||||
make all
|
||||
license-check:
|
||||
name: license boilerplate check
|
||||
runs-on: ubuntu-latest
|
||||
|
Loading…
Reference in New Issue
Block a user