From 1999b67ad7149cbb7b22e16cc623eb407ba24edf Mon Sep 17 00:00:00 2001 From: Alessandro Candido Date: Mon, 22 Jan 2024 19:00:15 +0100 Subject: [PATCH] Add Rust workflow --- .github/workflows/rustapi.yml | 36 +++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/rustapi.yml diff --git a/.github/workflows/rustapi.yml b/.github/workflows/rustapi.yml new file mode 100644 index 000000000..a335c0cb6 --- /dev/null +++ b/.github/workflows/rustapi.yml @@ -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