Skip to content

runs

runs #19

Workflow file for this run

name: Rust Checks
on:
push:
branches:
- master
pull_request:
branches:
- master
types:
- opened
- reopened
- synchronize
- ready_for_review
concurrency:
group: tests-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
run-base-tests:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Cache apt packages
uses: actions/cache@v3
id: apt-cache
with:
path: |
/var/lib/apt/lists
/var/cache/apt/archives
key: ${{ runner.os }}-apt-${{ hashFiles('Makefile') }}-v1
restore-keys: |
${{ runner.os }}-apt-${{ hashFiles('Makefile') }}-
${{ runner.os }}-apt-
- name: Cache protoc
uses: actions/cache@v3
id: protoc-cache
with:
path: /usr/local/bin/protoc
key: ${{ runner.os }}-protoc-29.3-v1
- name: Install Protoc
if: steps.protoc-cache.outputs.cache-hit != 'true'
run: |
PROTOC_VERSION="29.3"
PROTOC_ZIP="protoc-${PROTOC_VERSION}-linux-x86_64.zip"
curl -OL "https://github.com/protocolbuffers/protobuf/releases/download/v${PROTOC_VERSION}/${PROTOC_ZIP}"
sudo unzip -o ${PROTOC_ZIP} -d /usr/local bin/protoc
sudo unzip -o ${PROTOC_ZIP} -d /usr/local 'include/*'
rm -f ${PROTOC_ZIP}
protoc --version
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install dependencies
if: steps.apt-cache.outputs.cache-hit != 'true'
run: make deps
- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-v1
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-
${{ runner.os }}-cargo-
- name: Check
run: make check
- name: Build
run: make build