Skip to content

Commit

Permalink
Merge pull request #3070 from benjeffery/update-actions-2412
Browse files Browse the repository at this point in the history
Update GitHub Actions to latest major versions
  • Loading branch information
benjeffery authored Dec 11, 2024
2 parents d1d5bb7 + 6c5f497 commit 214f1cd
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 37 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ jobs:
with:
access_token: ${{ github.token }}

- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.2

- name: Setup Conda
uses: conda-incubator/setup-miniconda@v3
uses: conda-incubator/setup-miniconda@v3.1.0
with:
miniforge-version: latest
activate-environment: tskit-docs-env

- name: Cache Conda env
uses: actions/cache@v4
uses: actions/cache@v4.2.0
with:
path: ${{ env.CONDA }}/envs
key: conda-${{ runner.os }}--${{ runner.arch }}--${{ hashFiles(env.REQUIREMENTS) }}-${{ env.CACHE_NUMBER }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5.3.0
with:
python-version: '3.12'
- name: Install dependencies and set up venv
Expand All @@ -39,7 +39,7 @@ jobs:
run:
echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3)
- name: C Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2.2.0
if: startsWith(github.ref, 'refs/tags/') && contains(github.event.ref, 'C_')
with:
name: C API ${{ steps.get_version.outputs.VERSION }}
Expand All @@ -48,7 +48,7 @@ jobs:
fail_on_unmatched_files: True
files: build-gcc/meson-dist/*
- name: Python Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2.2.0
if: startsWith(github.ref, 'refs/tags/') && !contains(github.event.ref, 'C_')
with:
name: Python ${{ steps.get_version.outputs.VERSION }}
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v4.2.2
- uses: actions/setup-python@v5.3.0
with:
python-version: '3.10'
- name: install clang-format
Expand All @@ -24,16 +24,16 @@ jobs:
python -m venv env
source env/bin/activate
pip install clang-format==6.0.1
- uses: pre-commit/[email protected].0
- uses: pre-commit/[email protected].1

benchmark:
name: Benchmark
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- uses: actions/checkout@v4.2.2
- uses: actions/setup-python@v5.3.0
with:
python-version: '3.11'
cache: 'pip'
Expand All @@ -50,7 +50,7 @@ jobs:
pip uninstall -y tskit
python run.py
- name: Upload Results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.3
with:
name: benchmark-results
path: python/benchmark
Expand All @@ -73,7 +73,7 @@ jobs:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4.2.2

- name: Install OSX libs
if: matrix.os == 'macos-latest'
Expand All @@ -82,13 +82,13 @@ jobs:
- name: Cache conda and dependencies
id: cache
uses: actions/cache@v4
uses: actions/cache@v4.2.0
with:
path: ${{ env.CONDA }}/envs
key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.python}}-conda-v1-${{ hashFiles('python/requirements/CI-tests-conda/requirements.txt') }}-${{ hashFiles('python/requirements/CI-tests-pip/requirements.txt') }}

- name: Install Conda
uses: conda-incubator/setup-miniconda@v3
uses: conda-incubator/setup-miniconda@v3.1.0
if: steps.cache.outputs.cache-hit != 'true'
with:
activate-environment: anaconda-client-env
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
python -m pytest -x --cov=tskit --cov-report=xml --cov-branch -n2 --durations=20 tests
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5.1.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
working-directory: python
Expand All @@ -168,10 +168,10 @@ jobs:
access_token: ${{ github.token }}

- name: 'Checkout'
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2

- name: Setup MSYS2 ${{matrix.sys}}
uses: msys2/setup-msys2@v2
uses: msys2/setup-msys2@v2.26.0
with:
msystem: ${{matrix.sys}}
update: true
Expand Down
36 changes: 18 additions & 18 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
python: [3.9, "3.10", 3.11, 3.12]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
uses: actions/setup-python@v5.3.0
with:
python-version: ${{ matrix.python }}
- name: Install deps
Expand All @@ -36,7 +36,7 @@ jobs:
pip install delocate
delocate-wheel -v dist/*.whl
- name: Upload Wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.3
with:
name: osx-wheel-${{ matrix.python }}
path: python/dist
Expand All @@ -49,7 +49,7 @@ jobs:
wordsize: [64]
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
- name: Install deps
env:
PYTHON: "py -${{ matrix.python }}-${{ matrix.wordsize }}"
Expand All @@ -74,7 +74,7 @@ jobs:
cp ../c/tskit.h lib/.
${PYTHON} -m build --wheel
- name: Upload Wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.3
with:
name: win-wheel-${{ matrix.python }}-${{ matrix.wordsize }}
path: python/dist
Expand All @@ -83,10 +83,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2

- name: Set up Python 3.9
uses: actions/setup-python@v5
uses: actions/setup-python@v5.3.0
with:
python-version: 3.9

Expand All @@ -98,7 +98,7 @@ jobs:
python -m build --sdist
- name: Upload sdist
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.3
with:
name: sdist
path: python/dist
Expand All @@ -109,7 +109,7 @@ jobs:
docker run --rm -v `pwd`:/project -w /project quay.io/pypa/manylinux2014_x86_64 bash .github/workflows/docker/buildwheel.sh
- name: Upload Wheels
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.3
with:
name: linux-wheels
path: python/dist/wheelhouse
Expand All @@ -122,11 +122,11 @@ jobs:
python: [3.9, "3.10", 3.11, 3.12]
steps:
- name: Download wheels
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.1.8
with:
name: osx-wheel-${{ matrix.python }}
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
uses: actions/setup-python@v5.3.0
with:
python-version: ${{ matrix.python }}
- name: Install wheel and test
Expand All @@ -145,11 +145,11 @@ jobs:
wordsize: [64]
steps:
- name: Download wheels
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.1.8
with:
name: win-wheel-${{ matrix.python }}-${{ matrix.wordsize }}
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v5
uses: actions/setup-python@v5.3.0
with:
python-version: ${{ matrix.python }}
- name: Install wheel and test
Expand Down Expand Up @@ -178,11 +178,11 @@ jobs:
wheel: cp312
steps:
- name: Download wheels
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.1.8
with:
name: linux-wheels
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5.3.0
with:
python-version: ${{ matrix.python }}
- name: Install wheel and test
Expand All @@ -201,16 +201,16 @@ jobs:
id-token: write
steps:
- name: Download all
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.1.8
- name: Move to dist
run: |
mkdir dist
cp */*.{whl,gz} dist/.
- name: Publish distribution to Test PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') && !contains(github.event.ref, 'C_')
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@v1.12.3
with:
repository_url: https://test.pypi.org/legacy/
- name: Publish distribution to PRODUCTION PyPI
if: github.event_name == 'release' && !startsWith(github.event.release.tag_name, 'C_')
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@v1.12.3

0 comments on commit 214f1cd

Please sign in to comment.