Skip to content

Testing 'n' fixes (#94) #166

Testing 'n' fixes (#94)

Testing 'n' fixes (#94) #166

Workflow file for this run

name: build
on:
workflow_dispatch:
pull_request:
branches: [ master ]
push:
branches:
- master
paths:
- 'Cargo.toml'
- 'benches/**'
- 'src/**'
env:
CI: true
jobs:
build:
name: build
strategy:
matrix:
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: true
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rust-src, rustfmt
- uses: Swatinem/rust-cache@v2
- name: check formatting
shell: bash
run: |
cargo fmt --check
- name: set up codegen dependencies
shell: bash
run: |
mkdir proto
(
cd proto
wget "https://github.com/protocolbuffers/protobuf/releases/download/v27.2/protoc-27.2-linux-x86_64.zip" -O protoc.zip
unzip protoc.zip
chmod +x bin/protoc
mv bin/protoc /usr/local/bin/
)
protoc --version
mkdir flatbuffers
(
cd flatbuffers
wget "https://github.com/google/flatbuffers/releases/download/v24.3.25/Linux.flatc.binary.clang++-15.zip" -O flatbuffers.zip
unzip flatbuffers.zip
chmod +x ./flatc
mv ./flatc /usr/local/bin
)
flatc --version
wget "https://capnproto.org/capnproto-c++-1.0.2.tar.gz" -O capnproto.tar.gz
tar zxf capnproto.tar.gz
(
cd capnproto-c++-1.0.2
./configure
sudo make -j install
)
capnp --version
- name: build
shell: bash
run: |
cargo build --benches --features regenerate
- name: check generated code
shell: bash
run: |
git diff --exit-code && echo 'ok!' || (echo 'committed generated code is not up to date!'; exit 1)
# build and test in dev mode with debug assertions enabled (and slow, uninteresting code
# disabled; only the encoders, and not the compression). this should quickly sanity check
# broken benchmarks, failing debug assertions, etc.
- name: test benches
shell: bash
run: |
cargo test --benches --no-default-features --features default-encoding-set