Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

APPVEYOR_SAVE_CACHE_ON_ERROR=true not working (no caching on failed builds on MacOS) #3941

Open
GitMensch opened this issue Dec 10, 2024 · 0 comments

Comments

@GitMensch
Copy link
Contributor

That should be reproducible in any definition, but find a reproducer attached.
The global setting of APPVEYOR_SAVE_CACHE_ON_ERROR does not work, the (expected) local export didn't work either.

A failing build does trigger the artifacts, but not the caching.
The main issue in this environment is that it is ultra slow, with the brew part taking over one hour, so the idea was to split it (manually installing the dependencies) and update the cache with multiple iterations - to get to the real build (which takes 10-20 minutes with all testing).

Apart from the issue that the cache - even with this setting - is only updated on finished builds: isn't there a command to tell appveyor to "update the cache now"? This would solve the issue (and even allow me to put this in several places for the initial cache building).

version: 3.3-dev.{build}-macos

image:

- macOS

- macOS-Monterey

environment:


  HOMEBREW_NO_INSTALL_CLEANUP: 1

  HOMEBREW_CACHE: /Users/appveyor/projects/brew_cache

  HOMEBREW_CURLRC: 1

  APPVEYOR_SAVE_CACHE_ON_ERROR: true

  matrix:

  - CONFIGURE_FLAGS: --with-curses=ncurses

  - CC: gcc-9

  - CC: gcc-11

install:

- sh: >-

    # MacOS worker setup for appveyor script
    export COMPlus_EnableDiagnostics=0

    echo "installing missing/outdated packages"
    mkdir -p $HOMEBREW_CACHE
    if test "$APPVEYOR_BUILD_WORKER_IMAGE" = "macOS-Monterey"; then
       brew update && brew upgrade
    fi

    brew install pkg-config jq
    if test "$CC" != ""; then
      brew install gmp cjson
    fi
    brew install berkeley-db

    if test "x$CC" = "x"; then
     CC=gcc
    # disabled to making the build fail
    # else
    # brew install $(echo $CC | tr - @)
    fi

    # work around bugs in this environment
    export TMPDIR=$PREFIX/tmp

    ./autogen.sh install

cache:

- $HOMEBREW_CACHE

build_script:

- sh: "export APPVEYOR_SAVE_CACHE_ON_ERROR=true\n\nconfigure $CONFIGURE_FLAGS\n\nmake check"


artifacts:

- path: tests/testsuite.log

  name: testsuite results

- path: config.log

  name: configuration for this build

on_failure:

- sh: >-

    appveyor PushArtifact config.log

on_finish:

- sh: >-

    appveyor PushArtifact tests/testsuite.log
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

No branches or pull requests

1 participant