Merge 1.1 into 2.0 #3892
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: Python bindings checks | |
on: | |
push: | |
branches: [develop, production, 2.0] | |
paths: | |
- ".github/actions/**" | |
- "**.rs" # Include all rust files | |
- "**Cargo.toml" # Include all Cargo.toml files | |
- "**Cargo.lock" # Include all Cargo.lock files | |
- "!**/examples/**" # Exclude all examples | |
- "!**/tests/**" # Exclude all tests | |
- "!cli/**" # Exclude CLI | |
- "!**/bindings/**" # Exclude all bindings | |
- "bindings/python/**" | |
- ".github/workflows/bindings-python.yml" | |
pull_request: | |
branches: [develop, production, 2.0] | |
paths: | |
- ".github/actions/**" | |
- "**.rs" # Include all rust files | |
- "**Cargo.toml" # Include all Cargo.toml files | |
- "**Cargo.lock" # Include all Cargo.lock files | |
- "!**/examples/**" # Exclude all examples | |
- "!**/tests/**" # Exclude all tests | |
- "!cli/**" # Exclude CLI | |
- "!**/bindings/**" # Exclude all bindings | |
- "bindings/python/**" | |
- ".github/workflows/bindings-python.yml" | |
schedule: | |
- cron: "0 1 * * *" | |
workflow_dispatch: | |
env: | |
CARGO_INCREMENTAL: 0 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
name: Python PEP8 format | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- name: Checkout the Source Code | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} and Pip Cache | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: bindings/python/requirements-dev.txt | |
- name: Install Dependencies for Python Binding Lint | |
run: | | |
python3 -m pip install --upgrade setuptools pip wheel | |
python3 -m pip install tox-gh-actions | |
- name: Run tox format check | |
working-directory: bindings/python | |
run: tox -e format | |
test: | |
name: Linter & Tests | |
needs: lint | |
if: ${{ ! github.event.schedule }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
# os: [windows-latest, macos-latest, ubuntu-latest] | |
os: [windows-latest, ubuntu-latest] | |
python-version: ["3.10"] | |
steps: | |
- name: Checkout the Source Code | |
uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: ./.github/actions/setup-rust | |
with: | |
cache-root: bindings/python | |
- name: Set Up Python ${{ matrix.python-version }} and Pip Cache | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: pip | |
cache-dependency-path: bindings/python/requirements-dev.txt | |
# This step is required for bindgen to work on Windows. | |
- name: Set Up Clang/LLVM (Windows) | |
if: ${{ startsWith(matrix.os, 'windows') }} | |
uses: ./.github/actions/setup-clang | |
- name: Install Dependencies for Python Binding Tests | |
run: | | |
python3 -m pip install --upgrade setuptools pip wheel | |
python3 -m pip install tox-gh-actions | |
- name: Install required packages (Ubuntu) | |
if: ${{ startsWith(matrix.os, 'ubuntu') }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install libudev-dev libusb-1.0-0-dev | |
- name: Run linter for examples | |
if: ${{ startsWith(matrix.os, 'ubuntu-latest') }} | |
working-directory: bindings/python | |
run: tox -e lint-examples | |
# TODO temporarily disabled https://github.com/iotaledger/iota-sdk/issues/647 | |
# - name: Run tests | |
# working-directory: bindings/python | |
# run: tox | |