How to fail a scheduled job without running it?

I have a job that always fails. But it fails in a bad way. The compiler is buggy and generates bad code, so I get an endless stream of application assertions on a certain test. The application uses a custom assert in debug builds that raises a SIGTRAP and not a SIGKILL, so the app does not die.

After about 50 minutes Travis kills the job.

I would like to mark the job as failed before it is run. Something like the following in .travis.yml (notice fail: yes):

    - os: linux
      name: Debug build, Clang, Linux, s390x
      arch: s390x
      compiler: clang
      dist: bionic
      fail: yes
      env:
        - BUILD_OS=linux
        - BUILD_MODE=debug

Or maybe:

jobs:
  ...
  fail_start:
    -name: name: Debug build, Clang, Linux, s390x

I don’t want to delete the job because I want the record of the problem platform.

Is there a way to fail a job before it is run?

It’s impossible to set the job’s status as “failed” if it’s still running because “running” is also a job status thus mutually exclusive with others.

You likely want to use allow_failures: and fast_finish: true so that your build is marked as passed (or not, if something else fails) before the slow faulty job finishes.

If you want to temporarily delete the faulty job instead without deleting its code, you can either comment it out (if it’s a manually added job) or exclude it from matrix with jobs: exclude: (if it’s generated by matrix expansion).

Imprint