Skip to content

Commit

Permalink
CI pixi env
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewSZhang committed Jun 30, 2024
1 parent 8f12423 commit e91259e
Show file tree
Hide file tree
Showing 3 changed files with 2,906 additions and 385 deletions.
52 changes: 9 additions & 43 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,64 +13,30 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
# Window 64 bit
- os: windows-latest
python: "3.10"
platform_id: win_amd64
- os: windows-latest
python: "3.11"
platform_id: win_amd64
- os: windows-latest
python: "3.12"
platform_id: win_amd64
os: [windows-latest, macos-12, macos-14]
environment: [py310, py311, py312]

# MacOS x86_64
- os: macos-12
python: "3.10"
platform_id: macosx_x86_64
- os: macos-12
python: "3.11"
platform_id: macosx_x86_64
- os: macos-12
python: "3.12"
platform_id: macosx_x86_64

# MacOS arm64
- os: macos-14
python: "3.10"
platform_id: macosx_arm64
- os: macos-14
python: "3.11"
platform_id: macosx_arm64
- os: macos-14
python: "3.12"
platform_id: macosx_arm64
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v3
- uses: prefix-dev/[email protected]
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
cargo install --locked --git https://github.com/prefix-dev/pixi.git
pixi install -a
environments: ${{ matrix.environment }}

- name: Lint with ruff
run: |
pixi run lint
pixi run -e ${{ matrix.environment }} lint
- name: Test with pytest
run: |
pixi run test
pixi run -e ${{ matrix.environment }} test
- name: Test with doctest
shell: bash
run: |
CMD=doctest pixi run doc
CMD=doctest pixi run -e ${{ matrix.environment }} doc
- name: Build package
run: |
pixi run build-wheel
pixi run -e ${{ matrix.environment }} build-wheel
- name: Upload package
uses: actions/upload-artifact@v4
with:
Expand Down
Loading

0 comments on commit e91259e

Please sign in to comment.