Skip to content

[ECO-780] Sanitize event type address #35

[ECO-780] Sanitize event type address

[ECO-780] Sanitize event type address #35

Workflow file for this run

# This workflow exists to make sure that we know when the protos and the generated code
# are out of sync. In this workflow we generate code from the protos and make sure it
# matches what is checked in.
name: "Check Protos"
on:
pull_request:
push:
branches:
- main
# Cancel redundant builds.
concurrency:
# For push and workflow_dispatch events we use `github.sha` in the concurrency group and don't really cancel each other out/limit concurrency.
# For pull_request events newer jobs cancel earlier jobs to save on CI etc.
group: ${{ github.workflow }}-${{ github.event_name }}-${{ (github.event_name == 'push' || github.event_name == 'workflow_dispatch') && github.sha || github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
Check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Install buf, which we use to generate code from the protos for Rust and TS.
- name: Install buf
uses: bufbuild/[email protected]
# Install protoc itself.
- name: Install Protoc
uses: arduino/setup-protoc@v2
# Install the plugins we need for generating Rust code.
- uses: ./.github/actions/rust-setup
- name: Install Rust deps for generating code from protos
run: |
cargo install protoc-gen-prost
cargo install protoc-gen-prost-serde
cargo install protoc-gen-prost-crate
cargo install protoc-gen-tonic
# Install the plugins we need for generating TS code.
- name: Install TS deps for generating code from protos
uses: pnpm/action-setup@v2
with:
version: 8.6.2
- run: pnpm install -g protoc-gen-ts
# Setup the environment for the aptos-indexer-protos package in Python, in which
# we generate Python code from the protos using the Python protoc toolchain
# rather than using buf.
- name: Install Python deps for generating code from protos
uses: ./.github/actions/python-setup
with:
pyproject_directory: python/aptos-indexer-protos
# Finally, generate code based on the protos.
- run: ./scripts/build_protos.sh
# Confirm that nothing has changed.
- run: git diff --exit-code