ci(release test):cache macos

This commit is contained in:
luoliwoshang
2025-09-03 22:14:33 +08:00
parent 23b5e77dcc
commit 002a68009e

View File

@@ -13,19 +13,17 @@ jobs:
steps: steps:
- name: Check out code - name: Check out code
uses: actions/checkout@v5 uses: actions/checkout@v5
# - name: Restore Darwin sysroot cache - name: Restore Darwin sysroot cache
# id: cache-darwin-sysroot id: cache-darwin-sysroot
# uses: actions/cache/restore@v4 uses: actions/cache/restore@v4
# with: with:
# path: .sysroot/darwin.tar.gz path: .sysroot/darwin.tar.gz
# key: darwin-sysroot-${{ hashFiles('.github/workflows/populate_darwin_sysroot.sh') }} key: darwin-sysroot-${{ hashFiles('.github/workflows/populate_darwin_sysroot.sh') }}-0.0.5
# - name: Populate Darwin sysroot
# if: steps.cache-darwin-sysroot.outputs.cache-hit != 'true'
# run: bash .github/workflows/populate_darwin_sysroot.sh
- name: Populate Darwin sysroot - name: Populate Darwin sysroot
if: steps.cache-darwin-sysroot.outputs.cache-hit != 'true'
run: bash .github/workflows/populate_darwin_sysroot.sh run: bash .github/workflows/populate_darwin_sysroot.sh
- name: Create Darwin sysroot tarball - name: Create Darwin sysroot tarball
# if: steps.cache-darwin-sysroot.outputs.cache-hit != 'true' if: steps.cache-darwin-sysroot.outputs.cache-hit != 'true'
run: tar -czvf .sysroot/darwin.tar.gz -C .sysroot darwin run: tar -czvf .sysroot/darwin.tar.gz -C .sysroot darwin
- name: Save Darwin sysroot cache - name: Save Darwin sysroot cache
# if: steps.cache-darwin-sysroot.outputs.cache-hit != 'true' # if: steps.cache-darwin-sysroot.outputs.cache-hit != 'true'
@@ -33,12 +31,6 @@ jobs:
with: with:
path: .sysroot/darwin.tar.gz path: .sysroot/darwin.tar.gz
key: darwin-sysroot-${{ hashFiles('.github/workflows/populate_darwin_sysroot.sh') }}-0.0.5 key: darwin-sysroot-${{ hashFiles('.github/workflows/populate_darwin_sysroot.sh') }}-0.0.5
# - name: Upload Darwin sysroot tarball
# uses: actions/upload-artifact@v4
# with:
# name: darwin-sysroot-tarball
# path: .sysroot/darwin.tar.gz
# compression-level: 0
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
needs: populate-darwin-sysroot needs: populate-darwin-sysroot
@@ -55,11 +47,6 @@ jobs:
uses: docker/setup-qemu-action@v3 uses: docker/setup-qemu-action@v3
with: with:
image: tonistiigi/binfmt:qemu-v7.0.0-28 image: tonistiigi/binfmt:qemu-v7.0.0-28
# - name: Download Darwin sysroot tarball
# uses: actions/download-artifact@v5
# with:
# name: darwin-sysroot-tarball
# path: .sysroot
- name: Restore Darwin sysroot cache - name: Restore Darwin sysroot cache
id: cache-darwin-sysroot id: cache-darwin-sysroot
uses: actions/cache/restore@v4 uses: actions/cache/restore@v4
@@ -70,19 +57,6 @@ jobs:
run: tar -xzvf .sysroot/darwin.tar.gz -C .sysroot run: tar -xzvf .sysroot/darwin.tar.gz -C .sysroot
- name: Populate Linux sysroot - name: Populate Linux sysroot
run: bash .github/workflows/populate_linux_sysroot.sh run: bash .github/workflows/populate_linux_sysroot.sh
# - name: Restore Linux sysroot cache
# id: cache-linux-sysroot
# uses: actions/cache/restore@v4
# with:
# path: .sysroot
# key: linux-sysroot-${{ hashFiles('.github/workflows/populate_linux_sysroot.sh') }}
# - name: Save Linux sysroot cache
# if: steps.cache-linux-sysroot.outputs.cache-hit != 'true'
# uses: actions/cache/save@v4
# with:
# path: .sysroot
# key: ${{ steps.cache-linux-sysroot.outputs.cache-primary-key }}
- name: Check file - name: Check file
run: tree .sysroot run: tree .sysroot
- name: Run GoReleaser (Build & Test) - name: Run GoReleaser (Build & Test)