[feature] Basic Build runs twice on every push to a branch with an open PR

Aperta
#175 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

@djkees ci sta già lavorando.

Dal 16/11/2026.

  • #188 di @djkees — aperta

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
github-actions, yaml
Ambito
ci-cd, devops

Direzione di ricerca

The trigger is the on: block in .github/workflows/basic_build.yml; compare it with publish_wheels.yml, which only listens to pull_request, tag pushes and workflow_dispatch. Confirm the duplicate runs on a PR branch, then decide whether push should be restricted to main, since the issue's trade-off needs a maintainer's answer. Done means a PR branch produces one set of runs and a branch without a PR still builds on demand via workflow_dispatch. The concurrency block is a separate change.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Problem / use case

.github/workflows/basic_build.yml triggers on push: with no branch filter, and on pull_request:. For a branch with an open PR in the same repository, each push fires both events on the same commit, so the whole build matrix runs twice. The workflow has no concurrency block either, so older runs of a branch also keep running after a newer push.

Proposed solution

Limit push to main:

on:
  push:
    branches: [main]
  pull_request:
  workflow_dispatch:

The trade-off is that a branch without an open PR no longer builds on push. workflow_dispatch is still available for that case. A concurrency group with cancel-in-progress would cover the stale-run part, and could be a separate change.

Additional context

publish_wheels.yml does not have this problem. It only listens to pull_request, tag pushes and workflow_dispatch.

Drafted with Claude's assistance.

  • Confirmed the on: block and the absence of any concurrency setting in .github/workflows on current upstream/main by reading the files.
  • I saw the duplicate runs earlier on a fork PR (two run IDs for the same job and commit); I did not re-check them for this draft.
  • Searched nasa/cea issues for an existing report and found none.
Lingua principale
Fortran
Stelle
233
Fork
48
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nasa/cea

Tutte le issue di nasa/cea

Issue simili

Altre issue su DevOps

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.