tezos-encoding + derive: keep track of lifetime in NomReader #124
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
jobs: | |
test: | |
name: Test Suite | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.sanitizer == 'address' }} | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest] | |
sanitizer: [none] | |
include: | |
- os: ubuntu-latest | |
sanitizer: address | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Rust (regular) | |
if: matrix.sanitizer != 'address' | |
uses: dtolnay/rust-toolchain@1.61.0 | |
with: | |
target: wasm32-unknown-unknown | |
- name: Setup Rust (for sanitizer) | |
if: matrix.sanitizer == 'address' | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: nightly-2022-07-20 | |
- name: Settings for cargo in Linux | |
if: matrix.sanitizer == 'address' | |
run: | | |
echo '[build]' >> ~/.cargo/config | |
echo 'rustflags = ["-Z", "sanitizer=address"]' >> ~/.cargo/config | |
echo 'rustdocflags = ["-Z", "sanitizer=address"]' >> ~/.cargo/config | |
echo 'target = "x86_64-unknown-linux-gnu"' >> ~/.cargo/config | |
- name: Settings for cargo in OSX | |
if: runner.os == 'macOS' | |
run: | | |
echo '[build]' >> ~/.cargo/config | |
echo 'rustflags = ["-C", "link-args=-Wl,-undefined,dynamic_lookup"]' >> ~/.cargo/config | |
- name: APT dependencies | |
if: runner.os == 'Linux' | |
run: | | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo add-apt-repository "deb https://apt.llvm.org/trusty/ llvm-toolchain-trusty main" | |
sudo apt-get update -y | |
sudo apt-get install libhidapi-dev libev4 clang libclang-dev llvm-dev g++ | |
- name: OSX dependencies | |
if: runner.os == 'macOS' | |
run: brew install pkg-config gmp libev hidapi libffi llvm | |
- name: cargo check (default features) | |
run: cargo check | |
- name: cargo check (no default features) | |
run: cargo check --no-default-features | |
- name: cargo test | |
run: cargo test | |
- name: cargo build - wasm32 (OSX) | |
if: runner.os == 'macOS' | |
run: | | |
export PATH=/usr/local/opt/llvm/bin:$PATH | |
cargo check --target wasm32-unknown-unknown --no-default-features | |
- name: cargo build - wasm32 (Linux) | |
if: runner.os == 'linux' && matrix.sanitizer != 'address' | |
run: cargo build --target wasm32-unknown-unknown --no-default-features |