Skip to content

Commit

Permalink
Update most GH Actions versions used and refactor conda setup
Browse files Browse the repository at this point in the history
Update to Node.js-20-based actions, except for release.yaml's artifacts
actions which will require recoding as uploads are no longer merged by v4.

Do more of the conda setup via conda-incubator/setup-miniconda's options,
including using an environment file for the initial packages, and update
this build to use Python 3.10 rather than the obsolete 3.7.
  • Loading branch information
jmarshall committed Apr 23, 2024
1 parent 7907822 commit 93f0fed
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 15 deletions.
23 changes: 10 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -110,7 +110,7 @@ jobs:

- name: Upload sdist tarball
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: sdist
path: dist/pysam-*.tar.gz
Expand All @@ -123,28 +123,25 @@ jobs:
strategy:
matrix:
os: [ubuntu]
python-version: ['3.7']
python-version: ['3.10']
defaults:
run:
shell: bash -l {0} # needed for conda activation
shell: bash -el {0} # needed for conda activation
env:
HTSLIB_CONFIGURE_OPTIONS: "--disable-libcurl"

steps:
- name: Checkout pysam
uses: actions/checkout@v4

- uses: conda-incubator/setup-miniconda@v2
- name: Set up Conda and Python ${{ matrix.python-version }}
uses: conda-incubator/setup-miniconda@v3
with:
channels: conda-forge,bioconda
channel-priority: strict
activate-environment: testenv
python-version: ${{ matrix.python-version }}
environment-file: devtools/environment-dev.yaml
auto-activate-base: false
use-only-tar-bz2: true

- name: Set up Conda and Python ${{ matrix.python-version }}
run: |
conda config --add channels bioconda --add channels conda-forge
conda install python=${{ matrix.python-version }} cython

- name: Build (directly from checkout)
run: python setup.py install
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
uses: actions/checkout@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
uses: pypa/cibuildwheel@v2.17.0
env:
CIBW_BUILD: ${{ matrix.build }}
CIBW_SKIP: "*musllinux*"
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
6 changes: 6 additions & 0 deletions devtools/environment-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
channels:
- conda-forge
- bioconda
dependencies:
- cython
- setuptools

0 comments on commit 93f0fed

Please sign in to comment.