Skip to content

Commit

Permalink
ci: Fix LLVM caching
Browse files Browse the repository at this point in the history
- Cache the object folder as well as the archive.
- Delete the build folder before caching to reduce disk usage.
  • Loading branch information
trungnt2910 committed Jul 21, 2023
1 parent 23eff13 commit 39ab281
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ jobs:
- name: Fetch cached LLVM build
uses: actions/cache@v3
with:
path: external/CppSharp/build/llvm/*.tar.xz
path: external/CppSharp/build/llvm/**
key: ${{ steps.llvm-build-id.outputs.id }}

- name: Build and install workload
Expand All @@ -87,6 +87,11 @@ jobs:
dotnet nuget add source --username ${{ github.repository_owner }} --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json"
dotnet nuget push out/nuget/** --api-key ${{ secrets.GITHUB_TOKEN }} --source "github"
# Clean up unnecessary files to prevent them from being cached
- name: Clean up LLVM
run: |
rm -rf external/CppSharp/build/llvm/llvm-project
# - name: Publish dev
# if: github.ref == 'refs/heads/master'
# run: nuget push .nupkgs\** -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}
Expand Down

0 comments on commit 39ab281

Please sign in to comment.