Skip to content

🎉 arista-9.0.2, aws-9.0.2, azure-9.0.2, core-9.0.1, equinix-9.0.1, gc… #4104

🎉 arista-9.0.2, aws-9.0.2, azure-9.0.2, core-9.0.1, equinix-9.0.1, gc…

🎉 arista-9.0.2, aws-9.0.2, azure-9.0.2, core-9.0.1, equinix-9.0.1, gc… #4104

name: Generated Code Test
## Only trigger tests if source is changing
on:
push:
paths:
- '**.proto'
- '**.lr'
- '**.go'
env:
GO_VERSION: ">=1.21.0"
PROTO_VERSION: "21.7"
jobs:
# Check if there is any dirty change for generated files
generated-files:
runs-on: self-hosted
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
cache: false
# We do not permit sudo on self-hosted runners
- name: "Ensure GCC is installed"
run: |
if gcc --version; then
echo "Good to go";
else
echo "Install GCC on the runner.";
fi
# Note we do not use apt install -y protobuf-compiler` since it is too old
- name: Check generated files
run: |
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
curl -LO $PB_REL/download/v${PROTO_VERSION}/protoc-${PROTO_VERSION}-linux-x86_64.zip
mkdir tools
unzip protoc-${PROTO_VERSION}-linux-x86_64.zip -d ./tools
rm protoc-${PROTO_VERSION}-linux-x86_64.zip
export PATH="$PATH:$(pwd)/tools/bin"
protoc --version
make prep
make cnquery/generate
git diff --exit-code *.go
git diff --exit-code resources/packs/**/*.lr.json