name: Examples
on:
pull_request:
branches: ["main"]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-latest]
toolchain:
- stable
- beta
- nightly
precision: ["", "f32"]
example:
- entanglement
- grovers_search
steps:
- uses: actions/checkout@v3
- name: Update
run:
rustup update ${{ matrix.toolchain }} && rustup default ${{
matrix.toolchain }}
- name: Update Git Submodules
run: |
git submodule update --init --remote --recursive
- name: Run example ${{ matrix.example }}
run: |
cargo run --example ${{ matrix.example }} --features=${{ matrix.precision }}
- name: Run example ${{ matrix.example }} (release)
run: |
cargo run --release --example ${{ matrix.example }} --features=${{ matrix.precision }}