Skip to content

Commit

Permalink
github: remove universal build from push events
Browse files Browse the repository at this point in the history
  • Loading branch information
osy committed Feb 23, 2021
1 parent a30a89a commit 9d885c2
Showing 1 changed file with 5 additions and 29 deletions.
34 changes: 5 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,55 +69,31 @@ jobs:
name: Build UTM (macOS Universal)
runs-on: macos-latest
needs: build
if: github.event_name == 'release'
steps:
- name: Checkout
uses: actions/checkout@v1
with:
submodules: recursive
- name: Cache Sysroot
id: cache-sysroot
uses: actions/cache@v1
with:
path: sysroot-macOS-arm64_x86_64
key: macos-universal-${{ hashFiles('scripts/build_dependencies.sh') }}-${{ hashFiles('patches/**') }}
- name: Download Sysroot (arm64) from cache
if: steps.cache-sysroot.outputs.cache-hit != 'true'
id: cache-sysroot-arm64
uses: actions/cache@v1
with:
path: sysroot-macOS-arm64
key: macos-arm64-${{ hashFiles('scripts/build_dependencies.sh') }}-${{ hashFiles('patches/**') }}
- name: Download Sysroot (arm64) from artifact
if: steps.cache-sysroot.outputs.cache-hit != 'true' && steps.cache-sysroot-arm64.outputs.cache-hit != 'true'
- name: Download Sysroot (arm64)
uses: actions/download-artifact@v1
with:
name: Sysroot-macos-arm64
- name: Download Sysroot (x86_64) from cache
if: steps.cache-sysroot.outputs.cache-hit != 'true'
id: cache-sysroot-x86_64
uses: actions/cache@v1
with:
path: sysroot-macOS-x86_64
key: macos-x86_64-${{ hashFiles('scripts/build_dependencies.sh') }}-${{ hashFiles('patches/**') }}
- name: Download Sysroot (x86_64) from artifact
if: steps.cache-sysroot.outputs.cache-hit != 'true' && steps.cache-sysroot-x86_64.outputs.cache-hit != 'true'
- name: Download Sysroot (x86_64)
uses: actions/download-artifact@v1
with:
name: Sysroot-macos-x86_64
- name: Pack Universal Sysroot
if: steps.cache-sysroot.outputs.cache-hit != 'true'
run: |
tar xf Sysroot-macos-arm64/sysroot.tgz || true
tar xf Sysroot-macos-x86_64/sysroot.tgz || true
tar xf Sysroot-macos-arm64/sysroot.tgz
tar xf Sysroot-macos-x86_64/sysroot.tgz
./scripts/pack_dependencies.sh . macos arm64 x86_64
- name: Compress Sysroot
if: steps.cache-sysroot.outputs.cache-hit != 'true'
run: |
rm -rf sysroot_tar
mkdir sysroot_tar
tar cf sysroot_tar/sysroot.tgz sysroot-macOS-arm64_x86_64
- name: Upload Sysroot
if: steps.cache-sysroot.outputs.cache-hit != 'true'
uses: actions/upload-artifact@v1
with:
name: Sysroot-macos-universal
Expand Down

0 comments on commit 9d885c2

Please sign in to comment.