idris-lang / Idris2

A purely functional programming language with first class types
https://idris-lang.org/
Other
2.52k stars 374 forks source link

Add conditional CI for gambit #1159

Open gallais opened 3 years ago

gallais commented 3 years ago

The gambit test is really, really slow (re #1033)

I know we should be able to set up a conditional CI for gambit so that we only run the test if e.g. there are changes to the specific backend, the shared compiler code, or if it is required by the committer e.g. with a ci:gambit command in the message.

benhormann commented 3 years ago

A quick look at the workflow contexts suggests the source branch name is easily accessible:

- name: Test gambit
  if: contains(github.head_ref, 'gambit')

In theory github.event contains a pull_request property, so with a bit of luck .title or .body is what you want:

- name: Test gambit
  if: >
    ${{ contains(github.event.pull_request.title, 'gambit') ||
    contains(github.event.pull_request.body, 'ci:gambit') ||
    contains(github.event.pull_request.labels.*.name, 'Release the 🐉!') }}

* You'd have to remember to label it before clicking 'Create'.