ci:remove macos llvm download when release
This commit is contained in:
36
.github/workflows/release-build.yml
vendored
36
.github/workflows/release-build.yml
vendored
@@ -15,7 +15,6 @@ jobs:
|
||||
setup:
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
darwin-cache-key: ${{ steps.cache-keys.outputs.darwin-key }}
|
||||
linux-cache-key: ${{ steps.cache-keys.outputs.linux-key }}
|
||||
steps:
|
||||
- name: Check out code
|
||||
@@ -23,36 +22,8 @@ jobs:
|
||||
- name: Calculate cache keys
|
||||
id: cache-keys
|
||||
run: |
|
||||
DARWIN_KEY="darwin-sysroot-${{ hashFiles('.github/workflows/populate_darwin_sysroot.sh', '.github/workflows/release-build.yml') }}-v1.0.0"
|
||||
LINUX_KEY="linux-sysroot-${{ hashFiles('.github/workflows/populate_linux_sysroot.sh', '.github/workflows/release-build.yml') }}-v1.0.0"
|
||||
echo "darwin-key=$DARWIN_KEY" >> $GITHUB_OUTPUT
|
||||
echo "linux-key=$LINUX_KEY" >> $GITHUB_OUTPUT
|
||||
populate-darwin-sysroot:
|
||||
runs-on: macos-latest
|
||||
timeout-minutes: 30
|
||||
needs: setup
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v5
|
||||
- name: Check Darwin sysroot cache
|
||||
id: cache-darwin-sysroot
|
||||
uses: actions/cache/restore@v4
|
||||
with:
|
||||
path: .sysroot/darwin.tar.gz
|
||||
key: ${{ needs.setup.outputs.darwin-cache-key }}
|
||||
lookup-only: true
|
||||
- name: Populate Darwin sysroot
|
||||
if: steps.cache-darwin-sysroot.outputs.cache-hit != 'true'
|
||||
run: bash .github/workflows/populate_darwin_sysroot.sh
|
||||
- name: Create Darwin sysroot tarball
|
||||
if: steps.cache-darwin-sysroot.outputs.cache-hit != 'true'
|
||||
run: tar -czvf .sysroot/darwin.tar.gz -C .sysroot darwin
|
||||
- name: Save Darwin sysroot cache
|
||||
if: steps.cache-darwin-sysroot.outputs.cache-hit != 'true'
|
||||
uses: actions/cache/save@v4
|
||||
with:
|
||||
path: .sysroot/darwin.tar.gz
|
||||
key: ${{ needs.setup.outputs.darwin-cache-key }}
|
||||
populate-linux-sysroot:
|
||||
runs-on: ubuntu-latest
|
||||
needs: setup
|
||||
@@ -86,14 +57,13 @@ jobs:
|
||||
key: ${{ needs.setup.outputs.linux-cache-key }}
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [setup, populate-darwin-sysroot, populate-linux-sysroot]
|
||||
needs: [setup, populate-linux-sysroot]
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v5
|
||||
- name: Set up Release
|
||||
uses: ./.github/actions/setup-goreleaser
|
||||
with:
|
||||
darwin-cache-key: ${{ needs.setup.outputs.darwin-cache-key }}
|
||||
linux-cache-key: ${{ needs.setup.outputs.linux-cache-key }}
|
||||
- name: Run GoReleaser (Build & Test)
|
||||
env:
|
||||
@@ -206,8 +176,7 @@ jobs:
|
||||
mod-version: ${{ matrix.go-mod-version }}
|
||||
|
||||
release:
|
||||
needs:
|
||||
[setup, test-artifacts, populate-darwin-sysroot, populate-linux-sysroot]
|
||||
needs: [setup, test-artifacts, populate-linux-sysroot]
|
||||
runs-on: ubuntu-latest
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
steps:
|
||||
@@ -218,7 +187,6 @@ jobs:
|
||||
- name: Set up Release
|
||||
uses: ./.github/actions/setup-goreleaser
|
||||
with:
|
||||
darwin-cache-key: ${{ needs.setup.outputs.darwin-cache-key }}
|
||||
linux-cache-key: ${{ needs.setup.outputs.linux-cache-key }}
|
||||
- name: Run GoReleaser (Release)
|
||||
env:
|
||||
|
||||
Reference in New Issue
Block a user