Skip to content

Commit

Permalink
Add Rust workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
alecandido committed Jan 22, 2024
1 parent 17d0a26 commit 1999b67
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/rustapi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Test Qibolab C API
name: C API

on:
push:
workflow_dispatch:

jobs:
tests:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Prepare virtual environment
run: |
python -m venv env
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Check and lint
working-directory: crate
run: |
cargo check
cargo clippy --all-targets
- name: Build & run example
working-directory: crate
run: |
cargo run --example example

0 comments on commit 1999b67

Please sign in to comment.