Skip to content
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

add report-python-information #93

Draft
wants to merge 3 commits into
base: main
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
172 changes: 172 additions & 0 deletions .github/workflows/test-report-python-information.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
name: test-report-python-information

on:
push:
branches:
- main
tags:
- '**'
pull_request:
branches:
- '**'

concurrency:
# SHA is added to the end if on `main` to let all main workflows run
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}-${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/') || startsWith(github.ref, 'refs/heads/long_lived/')) && github.sha || '' }}
cancel-in-progress: true

jobs:
test:
name: ${{ matrix.os.name }} ${{ matrix.arch.name }} ${{ matrix.python.name }}
runs-on: ${{ matrix.os.runs-on[matrix.arch.matrix] }}
container: ${{ matrix.os.container[matrix.python.matrix] }}
strategy:
fail-fast: false
matrix:
os:
- name: macOS
matrix: macos
native-python: false
runs-on:
arm: [macOS, ARM64]
intel: [macos-latest]
- name: Ubuntu
matrix: ubuntu
native-python: false
runs-on:
arm: [Linux, ARM64]
intel: [ubuntu-latest]
- name: Docker Debian
matrix: docker-debian
native-python: true
runs-on:
arm: [Linux, ARM64]
intel: [ubuntu-latest]
container:
'py3.7': docker://python:3.7-bullseye
'py3.8': docker://python:3.8-bullseye
'py3.9': docker://python:3.9-bullseye
'py3.10': docker://python:3.10-bullseye
'py3.11': docker://python:3.11-bullseye
- name: Windows
matrix: windows
native-python: false
runs-on:
intel: [windows-latest]
python:
- name: '3.7'
action: '3.7'
check: '3.7'
matrix: 'py3.7'
- name: '3.8'
action: '3.8'
check: '3.8'
matrix: 'py3.8'
- name: '3.9'
action: '3.9'
check: '3.9'
matrix: 'py3.9'
- name: '3.10'
action: '3.10'
check: '3.10'
matrix: 'py3.10'
- name: '3.11'
action: '3.11'
check: '3.11'
matrix: 'py3.11'
arch:
- name: ARM
matrix: arm
- name: Intel
matrix: intel
include:
- os:
name: Chia Network Ubuntu Intel Builder
matrix: docker-chia-network-ubuntu-intel-builder
native-python: true
runs-on:
intel: [ubuntu-latest]
container:
'3.8': chianetwork/ubuntu-18.04-builder:latest
python:
name: '3.8'
check: '3.8'
matrix: '3.8'
arch:
name: Intel
matrix: intel
- os:
name: Chia Network Ubuntu ARM Builder
matrix: docker-chia-network-ubuntu-arm-builder
native-python: true
runs-on:
arm: [Linux, ARM64]
container:
'3.8': chianetwork/ubuntu-18.04-builder:latest
python:
name: '3.8'
check: '3.8'
matrix: '3.8'
arch:
name: ARM
matrix: arm
- os:
name: Chia Network CentOS Intel Builder
matrix: docker-chia-network-centos-intel-builder
native-python: true
runs-on:
intel: [ubuntu-latest]
container:
'3.9': chianetwork/centos7-builder:latest
python:
name: '3.9'
check: '3.9'
matrix: '3.9'
arch:
name: Intel
matrix: intel
exclude:
# Only partial entries are required here by GitHub Actions so generally I
# only specify the `matrix:` entry. The super linter complains so for now
# all entries are included to avoid that. Reported at
# https://github.com/rhysd/actionlint/issues/249
- os:
name: Windows
matrix: windows
native-python: false
runs-on:
intel: [windows-latest]
arch:
name: ARM
matrix: arm
- os:
name: macOS
matrix: macos
native-python: false
runs-on:
arm: [macOS, ARM64]
intel: [macos-latest]
python:
name: '3.7'
action: '3.7'
check: '3.7'
matrix: 'py3.7'
arch:
name: ARM
matrix: arm

steps:
- uses: actions/checkout@v3
with:
path: repo

- name: Set up ${{ matrix.python.name }}
if: ${{ ! matrix.os.native-python }}
uses: ./repo/setup-python
with:
python-version: ${{ matrix.python.action }}

- name: Run the action
uses: ./repo/report-python-information

# even just not failing is a useful check
34 changes: 34 additions & 0 deletions report-python-information/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Report Python information"

description: "Reports various Python build and library information including SQLite and OpenSSL versions."

runs:
using: "composite"
steps:
- name: Python
shell: sh
run: |
python --version --version

- name: SQLite
shell: sh
run: |
python -c 'import sqlite3; print(f"sqlite3.sqlite_version: {sqlite3.sqlite_version}")'

- name: OpenSSL
shell: sh
run: |
python -c 'import ssl; print(f"ssl.OPENSSL_VERSION: {ssl.OPENSSL_VERSION}")'
python -c 'import ssl; print(f"ssl.OPENSSL_VERSION_NUMBER: {ssl.OPENSSL_VERSION_NUMBER}")'

- name: Installed packages
shell: sh
run: |
python -m pip --version
python -m pip freeze

- name: Python sysconfig
shell: sh
run: |
python -m sysconfig

8 changes: 8 additions & 0 deletions report-python-information/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Report Python information

Reports various Python build and library information including SQLite and OpenSSL versions.
Consider making sure the env you want to check is activated first, if needed.

```yaml
- uses: Chia-Network/actions/report-python-information@main
```