diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b489a2f49..cfe703727 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -28,7 +28,12 @@ jobs: if: "!contains(github.event.head_commit.message, 'coverage skip')" steps: - - uses: actions/checkout@v2 + - name: Get current date as package key + id: pkg_key + run: echo "::set-output name=key::$(date +'%w')" + + - name: Checkout repository + uses: actions/checkout@v3 # Install system dependencies - name: Install system dependencies (Linux) @@ -67,15 +72,15 @@ jobs: uses: actions/cache@v3 with: path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages - key: Linux-${{ matrix.config.arch }}-debug-${{ steps.dep_hash.outputs.hash }}-$(date +'%w') + key: Linux-${{ matrix.config.arch }}-debug-${{ steps.dep_hash.outputs.hash }}-${{ steps.pkg_key.outputs.key }} # Cache xmake dependencies - name: Retrieve cached xmake dependencies (Windows) if: runner.os == 'Windows' uses: actions/cache@v3 with: - path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages - key: MSVC-${{ matrix.config.arch }}-releasedbg-${{ steps.dep_hash.outputs.hash }}-$(date +'%w') + path: ${{ env.XMAKE_GLOBALDIR }}\.xmake\packages + key: MSVC-${{ matrix.config.arch }}-releasedbg-${{ steps.dep_hash.outputs.hash }}-${{ steps.pkg_key.outputs.key }} # Setup compilation mode and install project dependencies - name: Configure xmake and install dependencies diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 58e8dd4cd..c4f299179 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -27,7 +27,12 @@ jobs: if: "!contains(github.event.head_commit.message, 'ci skip')" steps: - - uses: actions/checkout@v2 + - name: Get current date as package key + id: pkg_key + run: echo "::set-output name=key::$(date +'%w')" + + - name: Checkout repository + uses: actions/checkout@v3 # Install system dependencies - name: Install system dependencies @@ -59,7 +64,7 @@ jobs: uses: actions/cache@v3 with: path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages - key: Linux-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-$(date +'%w') + key: Linux-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-${{ steps.pkg_key.outputs.key }} # Setup compilation mode and install project dependencies - name: Configure xmake and install dependencies diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml index a5e41bfde..c448fc5ac 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -27,7 +27,12 @@ jobs: if: "!contains(github.event.head_commit.message, 'ci skip')" steps: - - uses: actions/checkout@v2 + - name: Get current date as package key + id: pkg_key + run: echo "::set-output name=key::$(date +'%w')" + + - name: Checkout repository + uses: actions/checkout@v3 # Force xmake to a specific folder (for cache) - name: Set xmake env @@ -53,7 +58,7 @@ jobs: uses: actions/cache@v3 with: path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages - key: macOS-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-$(date +'%w') + key: macOS-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-${{ steps.pkg_key.outputs.key }} # Setup compilation mode and install project dependencies - name: Configure xmake and install dependencies diff --git a/.github/workflows/msys2-build.yml b/.github/workflows/msys2-build.yml index 6a8b1e59d..de5ecfb9d 100644 --- a/.github/workflows/msys2-build.yml +++ b/.github/workflows/msys2-build.yml @@ -32,7 +32,12 @@ jobs: shell: msys2 {0} steps: - - uses: actions/checkout@v2 + - name: Get current date as package key + id: pkg_key + run: echo "::set-output name=key::$(date +'%w')" + + - name: Checkout repository + uses: actions/checkout@v3 # Setup MSYS2 - uses: msys2/setup-msys2@v2 @@ -51,7 +56,7 @@ jobs: id: xmake_cache with: path: ${{ github.workspace }}/xmake_git - key: MinGW-XMake-$(date +'%w') + key: MinGW-XMake-${{ steps.pkg_key.outputs.key }} # Build xmake - name: Setup xmake @@ -82,7 +87,7 @@ jobs: uses: actions/cache@v3 with: path: ${{ env.XMAKE_GLOBALDIR }}/.xmake/packages - key: MinGW-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-$(date +'%w') + key: MinGW-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-${{ steps.pkg_key.outputs.key }} # Setup compilation mode and install project dependencies - name: Configure xmake and install dependencies diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml index 03eafd201..8155b6643 100644 --- a/.github/workflows/windows-build.yml +++ b/.github/workflows/windows-build.yml @@ -27,7 +27,12 @@ jobs: if: "!contains(github.event.head_commit.message, 'ci skip')" steps: - - uses: actions/checkout@v2 + - name: Get current date as package key + id: pkg_key + run: echo "::set-output name=key::$(date +'%w')" + + - name: Checkout repository + uses: actions/checkout@v3 # Force xmake to a specific folder (for cache) - name: Set xmake env @@ -53,7 +58,7 @@ jobs: uses: actions/cache@v3 with: path: ${{ env.XMAKE_GLOBALDIR }}\.xmake\packages - key: MSVC-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-$(date +'%w') + key: MSVC-${{ matrix.arch }}-${{ matrix.mode }}-${{ steps.dep_hash.outputs.hash }}-${{ steps.pkg_key.outputs.key }} # Setup compilation mode and install project dependencies - name: Configure xmake and install dependencies