Skip to content

build(deps): bump h2 from 0.3.24 to 0.3.26 in /rust #210

build(deps): bump h2 from 0.3.24 to 0.3.26 in /rust

build(deps): bump h2 from 0.3.24 to 0.3.26 in /rust #210

Workflow file for this run

name: Build
on:
workflow_call:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
matrix:
runs-on: ubuntu-22.04
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v2
- id: set-matrix
run: echo "::set-output name=matrix::$(cat proto.json | jq -c .)"
build-typescript:
runs-on: ubuntu-22.04
needs: matrix
strategy:
matrix:
proto: ${{ fromJson(needs.matrix.outputs.matrix) }}
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Configure buf
uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ github.token }}
- name: Generate proto
run: |
buf generate --template buf.gen.ts.yaml ${{ matrix.proto.buf }} -o ${{ matrix.proto.directory.ts }}
- name: Setup node environment (for building)
uses: actions/setup-node@v4
with:
node-version: 16.19.0
- name: Fetch dependencies
run: yarn --cwd ${{ matrix.proto.directory.ts }}
- name: Build
run: yarn --cwd ${{ matrix.proto.directory.ts }} build
build-rust:
runs-on: ubuntu-22.04
needs: matrix
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
~/.cargo/bin
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Setup rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.71
default: true
override: true
- name: Install cargo make
uses: davidB/rust-cargo-make@v1
- name: Configure buf
uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ github.token }}
- name: Generate proto
run: |
jq -c '.[]' proto.json | while read i; do
BUF=$(echo $i | jq -cr '.buf')
BUF_YAML=$(grep -q "cosmos/cosmos-sdk" <<< "$BUF" && echo "buf.gen.rust.cosmos.yaml" || echo "buf.gen.rust.yaml")
DIRECTORY=$(echo $i | jq -cr '.directory.rust')
buf generate --template $BUF_YAML $BUF -o $DIRECTORY
done
- name: Build rust
working-directory: ./rust
run: |
cargo make build
build-python:
runs-on: ubuntu-22.04
needs: matrix
strategy:
matrix:
proto: ${{ fromJson(needs.matrix.outputs.matrix) }}
steps:
- name: Check out repository
uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install Python Poetry
uses: abatilo/actions-poetry@v2.4.0
with:
poetry-version: 1.4.1
- name: Configure buf
uses: bufbuild/buf-setup-action@v1
with:
github_token: ${{ github.token }}
- name: Generate proto
run: |
buf generate --template buf.gen.python.yaml ${{ matrix.proto.buf }} -o ${{ matrix.proto.directory.python }}
- name: Install project dependencies
working-directory: ./${{ matrix.proto.directory.python }}/../
run: |
poetry install
- name: Build project
working-directory: ./${{ matrix.proto.directory.python }}/../
run: |
poetry build