`add_artifact!` fails because of a checksum test, while the tarball was made with `Tar.jl`

If you look at the Compression section of the Tar.jl Readme:

It is typical to compress tarballs when saving or transferring them. In the UNIX tradition of doing one thing and doing it well, the Tar package does not do any kind of compression and instead makes it easy to compose its API with external compression tools.

Translation: when you call Tar.create above, you’re actually creating just a .tar file, even though you’ve given it a .tar.gz extension. The Readme then goes on to give suggestions about how to create a compressed tarball.

You can adapt the “Creating a tarball with the gzip command” code, to use whichever compression tool you have available on Windows.
Or you can use the TranscodingStreams based idea suggested after that.

The difference is that Tar.extract expects a .tar file i.e. a basic tarball, whereas add_artifact! expects a compressed tarball (even though its documentation doesn’t clearly say this and should be updated).

1 Like