It is because AppVeyor starts every CMD command as a new process and it does not "remember" location saved by pushd. Something like pushd adir && cd && popd should work, or you can wrap it into the batch file. If you prefer commands line-by-line in AppVeyor build configuration, you can also use PowerShell (which runs in the same session) Pop-Location and Push-Location commands.
Hello Ilya and thanks for the reply here. Could you help me understand this behavior? What is the rationale behind spinning a new cmd for every line and not having the build process, say, make a temp batch file? What are the implications for environment vars?