Exclude builds based on APPVEYOR_REPO_TAG

sethg's Avatar

sethg

17 Jun, 2020 01:34 PM

I've setup Appveyor to build Python Wheels and deploy on a new tag.
I have several Python versions set up in a matrix of environment variables:

environment:

  matrix:
  - platform: x86
    PYTHON_EXECUTABLE: c:/python27/python.exe
    SWIG_VER: swigwin-3.0.12
  - platform: x64
    PYTHON_EXECUTABLE: c:/python27-x64/python.exe
    SWIG_VER: swigwin-4.0.1

Etc.

I'd like to add a couple more Python versions to the build process but there is no need to run these unless the build is triggered by a commit. I was hoping to do something like:

matrix:
  fast_finish: true
  exclude:
    - platform: x86
      PYTHON_EXECUTABLE: c:/python27/python.exe
      SWIG_VER: swigwin-3.0.12
      APPVEYOR_REPO_TAG: false

However, APPVEYOR_REPO_TAG is ignored. Is it possible to exclude using an Appveyor environment variable, or would I need to add custom commands to achieve this?

Full file at: https://github.com/mapserver/mapserver/blob/master/appveyor.yml

  1. Support Staff 1 Posted by Feodor Fitsner on 17 Jun, 2020 06:52 PM

    Feodor Fitsner's Avatar

    Right, you cannot filter matrix jobs based on "dynamic" variable. However, you can add a simple script check for that variable on init phase of each job and then forcibly terminate build with success from script with appveyor exit cmd command or Exit-AppVeyorBuild PS command. Hope that helps.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac