From e4d4e8e291d8b36c149fe1085561bb3ec7743942 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?qwerty=E5=90=83=E5=B0=8F=E5=BA=84?= Date: Sun, 15 Feb 2026 13:06:55 +0800 Subject: [PATCH] test: absoulte path for cache folder --- .github/workflows/test.yml | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index cd74b9e..cbd5436 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -22,16 +22,36 @@ jobs: with: xmake-version: ${{ matrix.version }} actions-cache-folder: '.xmake-cache' - actions-cache-key: ${{ matrix.version }} + actions-cache-key: ${{ matrix.version }}-relative build-cache: true - build-cache-key: ${{ matrix.version }} + build-cache-key: ${{ matrix.version }}-relative package-cache: true - package-cache-key: ${{ matrix.version }} + package-cache-key: ${{ matrix.version }}-relative project-path: 'tests/sample' - - name: Run tests + - name: Run tests with relative cache path run: | xmake --version cd tests/sample xmake -y -vD xmake run + xmake clean + + - uses: xmake-io/github-action-setup-xmake@master + with: + xmake-version: ${{ matrix.version }} + actions-cache-folder: '${{ runner.temp }}/xmake-cache' + actions-cache-key: ${{ matrix.version }}-absolute + build-cache: true + build-cache-key: ${{ matrix.version }}-absolute + package-cache: true + package-cache-key: ${{ matrix.version }}-absolute + project-path: 'tests/sample' + + - name: Run tests with absolute cache path + run: | + xmake --version + cd tests/sample + xmake -y -vD + xmake run + xmake clean