Skip to content

Temporary CI to test epicscorelibs PR #191

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 91 additions & 86 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,48 +13,48 @@ on:
- cron: '0 8 * * MON'

jobs:
lint:
runs-on: "ubuntu-latest"
steps:
- name: Checkout Source
uses: actions/checkout@v4

- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Install Python Dependencies
run: pip install flake8

- name: Lint
run: flake8

sdist:
runs-on: "ubuntu-latest"
steps:
- name: Checkout Source
uses: actions/checkout@v4
with:
# require history to get back to last tag for version number of branches
fetch-depth: 0
submodules: true

- name: Build Sdist
run: pipx run build --sdist .

- name: Upload Sdist
uses: actions/upload-artifact@v4
with:
name: dist
path: dist/*
# lint:
# runs-on: "ubuntu-latest"
# steps:
# - name: Checkout Source
# uses: actions/checkout@v4

# - name: Install Python
# uses: actions/setup-python@v4
# with:
# python-version: "3.12"

# - name: Install Python Dependencies
# run: pip install flake8

# - name: Lint
# run: flake8

# sdist:
# runs-on: "ubuntu-latest"
# steps:
# - name: Checkout Source
# uses: actions/checkout@v4
# with:
# # require history to get back to last tag for version number of branches
# fetch-depth: 0
# submodules: true

# - name: Build Sdist
# run: pipx run build --sdist .

# - name: Upload Sdist
# uses: actions/upload-artifact@v4
# with:
# name: dist
# path: dist/*

build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python: [cp37, cp38, cp39, cp310, cp311, cp312]
python: [cp37, cp38, cp39, cp310, cp311, cp312, cp313]


include:
Expand Down Expand Up @@ -123,59 +123,66 @@ jobs:
name: ${{ matrix.os }}/${{ matrix.python }}
directory: dist

test-sdist:
needs: [sdist]
# test-sdist:
# needs: [sdist]
# strategy:
# fail-fast: false
# matrix:
# os: [ubuntu-latest, windows-latest, macos-13]
# python: [cp37, cp38, cp39, cp310, cp311, cp312]

# runs-on: ${{ matrix.os }}

# steps:
# - uses: actions/download-artifact@v4
# with:
# name: dist
# path: dist

# - name: Install sdist in a venv and check cli works
# run: pipx run --spec dist/*.tar.gz pythonSoftIOC --version
# shell: bash

# release:
# needs: [build, sdist]
# runs-on: ubuntu-latest
# # upload to PyPI and make a release on every tag
# if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
# steps:
# - uses: actions/download-artifact@v4
# with:
# pattern: dist*
# path: dist
# merge-multiple: true

# - name: Github Release
# # We pin to the SHA, not the tag, for security reasons.
# # https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
# uses: softprops/action-gh-release@2d72d869af3bf23602f9593a1e3fd739b80ac1eb # v0.1.12
# with:
# files: dist/*
# body: See [Changelog](CHANGELOG.rst) for more details
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# - name: Publish to PyPI
# env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.pypi_token }}
# run: pipx run twine upload dist/*

# Check that the master branches of various upstream dependencies are
# still compatible when used together
master_branch_test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13]
python: [cp37, cp38, cp39, cp310, cp311, cp312]
python: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]

name: build/${{ matrix.os }}/${{ matrix.python }}
runs-on: ${{ matrix.os }}

steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Install sdist in a venv and check cli works
run: pipx run --spec dist/*.tar.gz pythonSoftIOC --version
shell: bash

release:
needs: [build, sdist]
runs-on: ubuntu-latest
# upload to PyPI and make a release on every tag
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v4
with:
pattern: dist*
path: dist
merge-multiple: true

- name: Github Release
# We pin to the SHA, not the tag, for security reasons.
# https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
uses: softprops/action-gh-release@2d72d869af3bf23602f9593a1e3fd739b80ac1eb # v0.1.12
with:
files: dist/*
body: See [Changelog](CHANGELOG.rst) for more details
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_token }}
run: pipx run twine upload dist/*

# Check that the master branches of various upstream dependencies are
# still compatible when used together
master_branch_test:
if: ${{ github.event_name == 'schedule' }}
runs-on: "ubuntu-latest"
steps:
- name: Checkout Source
uses: actions/checkout@v4
Expand All @@ -187,13 +194,11 @@ jobs:
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
python-version: ${{ matrix.python }}

- name: Install master versions
run: |
pip install git+https://github.com/epics-base/p4p.git git+https://github.com/epics-base/pvxs.git git+https://github.com/epics-base/epicscorelibs.git
pip install git+https://github.com/DiamondLightSource/aioca git+https://github.com/DiamondLightSource/cothread
pip install -e .[dev]
pip install --pre -e .[dev]
pip freeze

- name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
requires = ["setuptools", "wheel", "setuptools_dso>=2.1", "epicscorelibs>=7.0.7.99.1.1a3"]
requires = ["setuptools", "wheel", "setuptools_dso>=2.1", "epicscorelibs>=7.0.7.99.1.2a2"]
build-backend = "setuptools.build_meta:__legacy__"
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ dev =
sphinx-rtd-theme ==1.0.0
sphinx-rtd-theme-github-versions ==1.1
pytest-asyncio
aioca >=1.6
aioca >=2.0a3
cothread; sys_platform != "win32"
p4p>=4.2.0a2
p4p>=4.2.1a1

[flake8]
max-line-length = 80
Expand Down