diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6f48910..595bb34 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,7 +37,7 @@ on: jobs: rust-build: - name: ${{ matrix.name }} + name: Rust on ${{ matrix.name }} runs-on: ${{ matrix.os }} @@ -144,7 +144,7 @@ jobs: uses: codecov/codecov-action@v3 python-build: - name: ${{ matrix.name }} + name: Python ${{ matrix.python-version }} on ${{ matrix.name }} runs-on: ${{ matrix.os }} @@ -171,12 +171,30 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + cache: 'pip' + + - name: Create virtual environment for Maturin + run: python3 -m venv .venv + + - name: Activate virtual environment on Linux and MacOS #source .venv/bin/activate + if: ${{ matrix.os != 'windows-latest' }} + run: echo ".venv/bin" >> $GITHUB_PATH + + - name: Activate virtual environment on Windows #.venv\Scripts\activate.bat + if: ${{ matrix.os == 'windows-latest' }} + run: echo ".venv\Scripts" >> Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + + - name: Install Maturin + run: pip install maturin - name: Build Python extension and install pytest - uses: PyO3/maturin-action@v1 - with: - command: develop - args: --extras=test + run: maturin develop --extras=test + + #- name: Build Python extension and install pytest + # uses: PyO3/maturin-action@v1 + # with: + # command: develop + # args: --extras=test - name: Run Python unit tests run: pytest tests/python/test_grex.py