Merge pull request #29 from demml/update/py13 #108
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: Lints-Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - master | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| env: | |
| RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down | |
| jobs: | |
| test-python: | |
| name: test ${{ matrix.os }}-${{ matrix.python-version }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu, macos] | |
| python-version: ["3.10", "3.11", "3.12"] | |
| runs-on: ${{ matrix.os }}-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: install rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: cache rust | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| key: ${{ matrix.os }}-${{ matrix.python-version }}-v1 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| enable-cache: true | |
| - name: set up python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Create virtual environment | |
| working-directory: ./py-logger | |
| run: make setup.project | |
| - name: Lints | |
| working-directory: ./py-logger | |
| run: make lints.ci | |
| - name: Run tests and report coverage | |
| working-directory: ./py-logger | |
| run: make test.unit | |
| test-build: | |
| needs: [test-python] | |
| name: build - ubuntu - ${{ matrix.manylinux }} - ${{ matrix.target }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| target: [x86_64, x86] | |
| manylinux: [auto] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: set up python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - run: pip install -U twine 'black>=22.3.0,<23' typing_extensions | |
| - name: build wheels | |
| uses: PyO3/maturin-action@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| manylinux: ${{ matrix.manylinux }} | |
| args: --release --out dist --interpreter 3.11 | |
| rust-toolchain: stable | |
| docker-options: -e CI | |
| working-directory: ./py-logger | |
| - run: ls -lh ./py-logger/dist/ | |
| - run: twine check --strict ./py-logger/dist/* |