Uploading built package outside of the VM, or caching it somehow

andrey.fedorov's Avatar

andrey.fedorov

Feb 29, 2016 @ 01:33 AM

Hi,

my C++ project takes over 60 min to build. As a workaround, I would like to build 2 individual components, stash those somewhere (upload to some public location), and during the subsequent builds just cache the built package, or download and install it as part of the script. Is something like this possible?

Thank you!

AF

  1. Support Staff 1 Posted by Feodor Fitsner on Feb 29, 2016 @ 01:49 AM

    Feodor Fitsner's Avatar

    I think it's possible, why not, however AppVeyor doesn't provide such an external storage.

  2. 2 Posted by andrey.fedorov on Feb 29, 2016 @ 01:55 AM

    andrey.fedorov's Avatar

    But it doesn't restrict outside connection, so I can package and drop that package to an external public FTP server or something, right?

  3. Support Staff 3 Posted by Feodor Fitsner on Feb 29, 2016 @ 02:00 AM

    Feodor Fitsner's Avatar

    Yes, sure.

  4. 4 Posted by andrey.fedorov on Feb 29, 2016 @ 02:16 AM

    andrey.fedorov's Avatar

    Excellent! Thank you!!

  5. 5 Posted by andrey.fedorov on Feb 29, 2016 @ 09:44 PM

    andrey.fedorov's Avatar

    Feodor, so I am learning how to create and deploy an artifact (I learn as I go!), and I ran into a problem configuring and deploying artifacts. Here's the relevant piece from my appveyor.yml:

    artifacts:
      - path: dcmqi-build\ITK-build
        name: ITK-dcmqi-bin
        type: zip
      - path: dcmqi-build\DCMTK-build
        name: DCMTK-dcmqi-bin
        type: zip
    deploy:
        release: itkdcmqi-v$(appveyor_build_version)
        provider: GitHub
        description: 'Test upload package of ITK-dcmqi-build zipped folder'
        artifact: ITK-dcmqi-bin
        auth_token:
          secure: ffHRHxe8buygkDl6kRw4vaNaH/ikYGoDn3TXfZ42cFXq7986houCT7/7qB8o5Vvf
    

    But I do not see any artifacts in the web view, and my build fails to find the artifacts to deploy:

    Discovering tests...OK
    Packaging artifacts...OK
    Deploying using GitHub provider
    Creating "itkdcmqi-v0.0.37" release for repository "fedorov/dcmqi" tag "itkdcmqi-v0.0.37" commit "5b1225e7ed3a5de3543208739707264a0e80640b"...OK
    No artifacts were published. Make sure you have specified correct artifacts filter.
    Updating build cache
    All cache items are up to date.
    Build success
    

    Here's my build: https://ci.appveyor.com/project/fedorov/dcmqi/build/0.0.37
    Do you know what is wrong?

  6. Support Staff 6 Posted by Feodor Fitsner on Feb 29, 2016 @ 11:29 PM

    Feodor Fitsner's Avatar

    I see no artifacts were packaged so far. Make sure those two folders exist by adding "dir" command.

    -Feodor

        _____________________________

  7. 7 Posted by andrey.fedorov on Mar 01, 2016 @ 03:22 PM

    andrey.fedorov's Avatar

    Feodor, the directory I am requesting to package, dcmqi-build\ITK-build exists and is not empty (I added dir as you suggested), but it is not packaged. Please see build details here: https://ci.appveyor.com/project/fedorov/dcmqi/build/0.0.51

  8. Support Staff 8 Posted by Feodor Fitsner on Mar 01, 2016 @ 07:20 PM

    Feodor Fitsner's Avatar

    Oh, well. Those paths under "artifacts" section must be relative to a build folder which is C:\dcmqi in your case while C:\dcmqi-build\ITK-build is not inside a build folder.

    You can use script though to create an archive and upload it to artifacts:

    7z a ITK-build.zip C:\dcmqi-build\ITK-build\*.*
    appveyor PushArtifact ITK-build.zip
    
  9. 9 Posted by andrey.fedorov on Mar 01, 2016 @ 09:36 PM

    andrey.fedorov's Avatar

    Feodor, thanks a lot - that was it. I mis-read the documentation and thought the path should be relative to the disk root (C:). My fault. Thank you for your patience!

    As a suggestion, it would be nice to be able to specify build_dir, the same way as it is currently possible to set clone_dir in the settings. With cmake projects, it is not the common practice to configure and build in the source tree.

  10. Support Staff 10 Posted by Feodor Fitsner on Mar 01, 2016 @ 09:41 PM

    Feodor Fitsner's Avatar

    Cool, thanks for the update!

    -Feodor

  11. 11 Posted by andrey.fedorov on Mar 03, 2016 @ 02:13 AM

    andrey.fedorov's Avatar

    Feodor, two more follow up questions:

    1) why does it not work to specify paths relative to the clone tree like this: ..\zlib-build?

    Here's my config file, and you can see from the console that the artifact directory exists.

    2) if I use the approach you suggested earlier with appveyor PushArtifact, this does not seem to push it to GitHub - how can I manually do this?

  12. Support Staff 12 Posted by Feodor Fitsner on Mar 03, 2016 @ 04:57 AM

    Feodor Fitsner's Avatar

    If artifact setting on GitHub deployment provider is not specified it pushes all artifacts as release assets. Just make sure appveyor PushArtifact command uploads that artifact and you can see it on "Artifacts" tab of build results page.

  13. andrey.fedorov closed this discussion on Mar 06, 2016 @ 03:39 AM.

Comments are currently closed for this discussion. You can start a new one.

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