Cache the compilation result
Yamakaky opened this issue · 15 comments
Did you find a way to cache the compilation of aseprite? It lasts quite some time and become a bottleneck in my pipeline. Maybe with https://github.com/actions/cache?
BTW, you are saving me, I was ready to ragequit on having aseprite in Actions ^^
Oh wow, somebody is using something I made!
I will look into that, thanks! I hope it's working well for you!
Ahah, yes I do, but the build of aseprite lasts 10min ^^
Looks like the caching works everywhere but windows-2016, where it doesn't block builds, but doesn't cache, due to what looks like an internal fault in the step. I'll be releasing 1.0.1 later today which should include this fix.
Ah, hit a bit of snag in that composite steps don't support using steps - just running scripts. Didn't realize.
Update on this - we're still waiting for actions/runner#646.
How about publishing a docker image with a pre-compiled binary while waiting? The feature you mention doesn't seem to solve itself in the near future.
Yeah it's quite disappointing. I'll have to look when I'm a bit less swamped, sorry about that.
GitHub have finally enabled this functionality!
Unfortunately they haven't yet enabled if
so we can't skip the build step if the cache is hit.
Just running a quick test with the cache check inside a script...
@Yamakaky Give v1.0.2 a try!
I didn't get the problem why you can't upload the cache or artifact?
I did it with a .NET project and before GitHub introduced that actions, I used AppVeyor.
Ok, I just saw the problem: https://www.aseprite.org/faq/#can-i-redistribute-aseprite
I used this script now in a private repo, but aseprite seems only to be startable in console, not UI:
on: [push]
jobs:
example:
runs-on: windows-2019
steps:
# Load your repository.
- uses: actions/checkout@v2
# Install MSVC - only needed on Windows.
- uses: ilammy/msvc-dev-cmd@v1
# Install this github action.
- uses: neomura/setup-aseprite-cli-action@v1.0.2
# Output dir for debugging reasons
# - run: Get-ChildItem -Path .\ -Force -Recurse
# working-directory: ${{ github.workspace }}
# Aseprite is now available on the path.
- run: aseprite --help
shell: bash
- run: remove-item D:\a\_actions\neomura\setup-aseprite-cli-action\v1.0.2/build/bin/* -include *.pdb, *.ilk
- name: Upload a Build Artifact
uses: actions/upload-artifact@v2.2.4
with:
# Artifact name
name: Ase # optional, default is artifact
# A file, directory or wildcard pattern that describes what to upload
path: D:\a\_actions\neomura\setup-aseprite-cli-action\v1.0.2/build/bin
retention-days: 1
# - name: Upload another Build Artifact
# uses: actions/upload-artifact@v2.2.4
# with:
# # Artifact name
# name: Ase2 # optional, default is artifact
# # A file, directory or wildcard pattern that describes what to upload
# path: ${{ github.workspace }}/
# retention-days: 1
I'm not sure I understand the question, but to clear up:
- I can't redistribute Aseprite binaries due to its license agreement, but the developer has expressed approval for building it from source in CI for use in a CI environment only (https://community.aseprite.org/t/integrating-aseprite-with-travis-ci/1351).
- GitHub Actions only recently gained the ability to use other actions within actions, which was necessary to cache the build results without rewriting the cache action from scratch. That's now in and you should be seeing cache following the first build hopefully bringing the setup time down from 20-30 minutes to seconds.
I wouldn't expect the UI to work, this was put together specifically to allow use of the CLI in actions.
Ok, got it! Thanks for the clarification.
(Nevertheless, I would like to see it building with GUI. I wonder it could be build without.)