Merge branch 'issue-11-console-tests-r060-stack' into release/0.6.0 #130
Workflow file for this run
This file contains hidden or 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: CI | |
| on: | |
| push: | |
| branches: [main, dev, release/*, feature/*] | |
| pull_request: | |
| branches: [main, dev, release/*] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| rust: | |
| name: Rust ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| id: setup-python | |
| with: | |
| python-version: '3.11' | |
| - name: Set Python environment variables | |
| shell: bash | |
| run: | | |
| echo "PYO3_PYTHON=${{ steps.setup-python.outputs.python-path }}" >> $GITHUB_ENV | |
| echo "PYTHON_SYS_EXECUTABLE=${{ steps.setup-python.outputs.python-path }}" >> $GITHUB_ENV | |
| - name: Debug Python environment | |
| shell: bash | |
| run: | | |
| echo "=== Python location and architecture ===" | |
| which python3 | |
| python3 --version | |
| python3 -c 'import platform,sys; print("Architecture:", platform.machine(), "Executable:", sys.executable)' | |
| echo "=== Python library info ===" | |
| python3 -c 'import sysconfig; print("LIBDIR:", sysconfig.get_config_var("LIBDIR")); print("LDLIBRARY:", sysconfig.get_config_var("LDLIBRARY"))' | |
| - name: Set macOS linker flags | |
| if: runner.os == 'macOS' | |
| shell: bash | |
| run: echo "RUSTFLAGS=-C link-arg=-undefined -C link-arg=dynamic_lookup" >> $GITHUB_ENV | |
| - name: Set macOS linker flags | |
| if: runner.os == 'macOS' | |
| run: echo "RUSTFLAGS=-C link-arg=-undefined -C link-arg=dynamic_lookup" >> $GITHUB_ENV | |
| - name: Install Rust | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Run clippy | |
| run: cargo clippy --workspace --all-targets --all-features -- -D warnings | |
| - name: Build workspace | |
| run: cargo build --workspace --all-features | |
| - name: Run tests | |
| run: cargo test --workspace --all-features | |
| integration: | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| needs: [rust] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| id: setup-python | |
| with: | |
| python-version: '3.11' | |
| - name: Set Python environment variables | |
| shell: bash | |
| run: | | |
| echo "PYO3_PYTHON=${{ steps.setup-python.outputs.python-path }}" >> $GITHUB_ENV | |
| echo "PYTHON_SYS_EXECUTABLE=${{ steps.setup-python.outputs.python-path }}" >> $GITHUB_ENV | |
| - name: Debug Python environment | |
| shell: bash | |
| run: | | |
| echo "=== Python location and architecture ===" | |
| which python3 | |
| python3 --version | |
| python3 -c 'import platform,sys; print("Architecture:", platform.machine(), "Executable:", sys.executable)' | |
| echo "=== Python library info ===" | |
| python3 -c 'import sysconfig; print("LIBDIR:", sysconfig.get_config_var("LIBDIR")); print("LDLIBRARY:", sysconfig.get_config_var("LDLIBRARY"))' | |
| - name: Install Rust | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Run integration tests | |
| run: cargo test --workspace --all-features --test '*' | |
| - name: Run doc tests | |
| run: cargo test --workspace --doc |