Skip to content

Conversation

Copy link

Copilot AI commented Dec 11, 2025

The C/C++ workflow runs ./configure unconditionally on all commits, failing when only Python files change (example failure). This adds Python-specific CI and restricts C/C++ CI to relevant file changes.

Changes

New workflow: .github/workflows/python-package.yml

  • Triggers only on trinity_wallet_py/** changes
  • Python 3.11, pip caching, pytest execution on test_wallet.py

Updated workflow: .github/workflows/c-cpp.yml

  • Added path filters: src/**, Makefile, trinity-qt.pro, contrib/**, doc/**, .github/workflows/c-cpp.yml
  • Guarded configure execution: checks if ./configure exists before running

Result

Python-only PRs trigger Python CI only. C/C++ PRs trigger C/C++ CI only. No cross-triggering.

Reference: Original C/C++ workflow at ref a0c716d.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/Action-Committee/Trinity_py/commits/adcc86ec2e285e5eb1c6c2c4062e45372027ec76/check-runs
    • Triggering command: /usr/bin/curl curl -s -H Accept: application/vnd.github+json REDACTED (http block)
  • https://api.github.com/repos/Action-Committee/Trinity_py/commits/adcc86ec2e285e5eb1c6c2c4062e45372027ec76/status
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Create a pull request that adds a Python-specific CI workflow for trinity_wallet_py and restricts the existing C/C++ workflow so it only runs for C/C++-related changes. Do not modify any other files.

Context and rationale:

Requested changes (apply in a single branch named ci/add-python-workflow-and-guard-cpp):

  1. Add new file: .github/workflows/python-package.yml

Contents (exact, verbatim):

name: Python package CI

on:
push:
branches: [ "master" ]
paths:
- "trinity_wallet_py/"
pull_request:
branches: [ "master" ]
paths:
- "trinity_wallet_py/
"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('trinity_wallet_py/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f trinity_wallet_py/requirements.txt ]; then
pip install -r trinity_wallet_py/requirements.txt
fi
- name: Run tests
run: |
python -m pip install pytest || true
pytest -q trinity_wallet_py/test_wallet.py

  1. Replace the existing file: .github/workflows/c-cpp.yml with the following content (exact, verbatim):

name: C/C++ CI

on:
push:
branches: [ "master" ]
paths:
- 'src/'
- 'Makefile'
- 'trinity-qt.pro'
- 'contrib/
'
- 'doc/'
- '.github/workflows/c-cpp.yml'
pull_request:
branches: [ "master" ]
paths:
- 'src/
'
- 'Makefile'
- 'trinity-qt.pro'
- 'contrib/'
- 'doc/
'
- '.github/workflows/c-cpp.yml'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: configure
run: |
if [ -x ./configure ]; then
./configure
else
echo "No configure script found; skipping configure step."
fi
- name: make
run: make
- name: make check
run: make check
- name: make distcheck
run: make distcheck

Commit and PR details:

Merge strategy: create PR and merge into master (merge commit). Delete branch after merge.

Do NOT modify any other files. Please open the PR, wait for checks to complete, then merge and delete the branch. Ensure the PR runs CI and merges if checks pass.

This pull request was created as a result of the following prompt from Copilot chat.

Create a pull request that adds a Python-specific CI workflow for trinity_wallet_py and restricts the existing C/C++ workflow so it only runs for C/C++-related changes. Do not modify any other files.

Context and rationale:

Requested changes (apply in a single branch named ci/add-python-workflow-and-guard-cpp):

  1. Add new file: .github/workflows/python-package.yml

Contents (exact, verbatim):

name: Python package CI

on:
push:
branches: [ "master" ]
paths:
- "trinity_wallet_py/"
pull_request:
branches: [ "master" ]
paths:
- "trinity_wallet_py/
"

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('trinity_wallet_py/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f trinity_wallet_py/requirements.txt ]; then
pip install -r trinity_wallet_py/requirements.txt
fi
- name: Run tests
run: |
python -m pip install pytest || true
pytest -q trinity_wallet_py/test_wallet.py

  1. Replace the existing file: .github/workflows/c-cpp.yml with the following content (exact, verbatim):

name: C/C++ CI

on:
push:
branches: [ "master" ]
paths:
- 'src/'
- 'Makefile'
- 'trinity-qt.pro'
- 'contrib/
'
- 'doc/'
- '.github/workflows/c-cpp.yml'
pull_request:
branches: [ "master" ]
paths:
- 'src/
'
- 'Makefile'
- 'trinity-qt.pro'
- 'contrib/'
- 'doc/
'
- '.github/workflows/c-cpp.yml'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: configure
run: |
if [ -x ./configure ]; then
./configure
else
echo "No configure script found; skipping configure step."
fi
- name: make
run: make
- name: make check
run: make check
- name: make distcheck
run: make distcheck

Commit and PR details:

Merge strategy: create PR and merge into master (merge commit). Delete branch after merge.

Do NOT modify any other files. Please open the PR, wait for checks to complete, then merge and delete the branch. Ensure the PR runs CI and merges if checks pass.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: 5mil <4460242+5mil@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Python CI workflow and restrict C/C++ workflow ci: add Python CI workflow for trinity_wallet_py and restrict C/C++ workflow Dec 11, 2025
Copilot AI requested a review from 5mil December 11, 2025 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants