Преглед на файлове

CI: Configure ccache before modifying its contents (if any)

If there is a cache miss while downloading the ccache from GitHub/Azure,
the .ccache directory won't exist when we try to update the modification
time of its contents. Configure the ccache size first, which will create
the .ccache directory if it doesn't exist.
Timothy Flynn преди 1 година
родител
ревизия
90fcfca6f6
променени са 2 файла, в които са добавени 9 реда и са изтрити 3 реда
  1. 3 1
      .github/workflows/cmake.yml
  2. 6 2
      Meta/Azure/Caches.yml

+ 3 - 1
.github/workflows/cmake.yml

@@ -156,9 +156,11 @@ jobs:
 
 
       - name: Show ccache stats before build and configure
       - name: Show ccache stats before build and configure
         run: |
         run: |
+          ccache -M 0
+
           # Reset all ccache modification dates to a known epoch. This provides a baseline that we can prune against.
           # Reset all ccache modification dates to a known epoch. This provides a baseline that we can prune against.
           find ${{ github.workspace }}/.ccache | tac | xargs touch -a -m -d "2018-10-10T09:53:07Z"
           find ${{ github.workspace }}/.ccache | tac | xargs touch -a -m -d "2018-10-10T09:53:07Z"
-          ccache -M 0
+
           ccache -s
           ccache -s
           ccache -z
           ccache -z
 
 

+ 6 - 2
Meta/Azure/Caches.yml

@@ -38,9 +38,11 @@ steps:
         displayName: 'Toolchain Compiler Cache'
         displayName: 'Toolchain Compiler Cache'
 
 
       - script: |
       - script: |
+          CCACHE_DIR=${{ parameters.toolchain_ccache_path }} ccache -M 0
+
           # Reset all ccache modification dates to a known epoch. This provides a baseline that we can prune against.
           # Reset all ccache modification dates to a known epoch. This provides a baseline that we can prune against.
           find ${{ parameters.toolchain_ccache_path }} | tac | xargs touch -a -m -d "2018-10-10T09:53:07Z"
           find ${{ parameters.toolchain_ccache_path }} | tac | xargs touch -a -m -d "2018-10-10T09:53:07Z"
-          CCACHE_DIR=${{ parameters.toolchain_ccache_path }} ccache -M 0
+
           CCACHE_DIR=${{ parameters.toolchain_ccache_path }} ccache -s
           CCACHE_DIR=${{ parameters.toolchain_ccache_path }} ccache -s
           CCACHE_DIR=${{ parameters.toolchain_ccache_path }} ccache -z
           CCACHE_DIR=${{ parameters.toolchain_ccache_path }} ccache -z
         displayName: 'Configure Toolchain ccache'
         displayName: 'Configure Toolchain ccache'
@@ -55,9 +57,11 @@ steps:
       displayName: 'Serenity Compiler Cache'
       displayName: 'Serenity Compiler Cache'
 
 
     - script: |
     - script: |
+        CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -M 0
+
         # Reset all ccache modification dates to a known epoch. This provides a baseline that we can prune against.
         # Reset all ccache modification dates to a known epoch. This provides a baseline that we can prune against.
         find ${{ parameters.serenity_ccache_path }} | tac | xargs touch -a -m -d "2018-10-10T09:53:07Z"
         find ${{ parameters.serenity_ccache_path }} | tac | xargs touch -a -m -d "2018-10-10T09:53:07Z"
-        CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -M 0
+
         CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -s
         CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -s
         CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -z
         CCACHE_DIR=${{ parameters.serenity_ccache_path }} ccache -z
       displayName: 'Configure Serenity ccache'
       displayName: 'Configure Serenity ccache'