Skip to content

Commit

Permalink
Don't even try to run MacOS Arm jobs on forks
Browse files Browse the repository at this point in the history
  • Loading branch information
s0undt3ch committed May 2, 2024
1 parent 7d4a339 commit b8294ae
Show file tree
Hide file tree
Showing 18 changed files with 407 additions and 1,423 deletions.
48 changes: 35 additions & 13 deletions .github/workflows/build-deps-ci-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,36 @@ env:

jobs:

generate-matrix:
name: Generate Matrix
runs-on: ubuntu-latest
outputs:
matrix-include: ${{ steps.generate-matrix.outputs.matrix }}
steps:

- name: "Throttle Builds"
shell: bash
run: |
t=$(shuf -i 1-30 -n 1); echo "Sleeping $t seconds"; sleep "$t"
- name: Checkout Source Code
uses: actions/checkout@v4

- name: Setup Python Tools Scripts
uses: ./.github/actions/setup-python-tools-scripts
with:
cache-prefix: ${{ inputs.cache-prefix }}

- name: Generate Test Matrix
id: generate-matrix
run: |
tools ci deps-matrix
linux-dependencies:
name: Linux
needs:
- generate-matrix
runs-on:
- self-hosted
- linux
Expand All @@ -59,11 +87,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- distro-slug: centos-7
arch: x86_64
- distro-slug: centos-7-arm64
arch: arm64
include: ${{ fromJSON(needs.generate-matrix.outputs.matrix-include)['linux'] }}
steps:

- name: "Throttle Builds"
Expand Down Expand Up @@ -163,16 +187,14 @@ jobs:

macos-dependencies:
name: MacOS
needs:
- generate-matrix
runs-on: ${{ matrix.distro-slug == 'macos-13-arm64' && 'macos-13-xlarge' || matrix.distro-slug }}
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
include:
- distro-slug: macos-12
arch: x86_64
- distro-slug: macos-13-arm64
arch: arm64
include: ${{ fromJSON(needs.generate-matrix.outputs.matrix-include)['macos'] }}
steps:

- name: "Throttle Builds"
Expand Down Expand Up @@ -250,6 +272,8 @@ jobs:
path: nox.macos.${{ matrix.arch }}.tar.*

windows-dependencies:
needs:
- generate-matrix
name: Windows
runs-on:
- self-hosted
Expand All @@ -261,9 +285,7 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- distro-slug: windows-2022
arch: amd64
include: ${{ fromJSON(needs.generate-matrix.outputs.matrix-include)['windows'] }}
steps:

- name: "Throttle Builds"
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/build-deps-onedir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ jobs:
fail-fast: false
max-parallel: 2
matrix:
arch:
- x86_64
- arm64
arch: ${{ github.event.repository.fork && fromJSON('["x86_64"]') || fromJSON('["x86_64", "arm64"]') }}
runs-on:
- ${{ matrix.arch == 'arm64' && 'macos-13-xlarge' || 'macos-12' }}
env:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,7 @@ jobs:
strategy:
fail-fast: false
matrix:
arch:
- x86_64
- arm64
arch: ${{ github.event.repository.fork && fromJSON('["x86_64"]') || fromJSON('["x86_64", "arm64"]') }}
source:
- ${{ inputs.source }}

Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/build-salt-onedir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,7 @@ jobs:
fail-fast: false
max-parallel: 2
matrix:
arch:
- x86_64
- arm64
arch: ${{ github.event.repository.fork && fromJSON('["x86_64"]') || fromJSON('["x86_64", "arm64"]') }}
runs-on:
- ${{ matrix.arch == 'arm64' && 'macos-13-xlarge' || 'macos-12' }}

Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2525,6 +2525,7 @@ jobs:
path: artifacts/pkgs/incoming

- name: Download macOS Arch64 Packages
if: ${{ ! github.event.repository.fork }}
uses: actions/download-artifact@v4
with:
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-arm64-macos
Expand Down Expand Up @@ -2629,6 +2630,7 @@ jobs:
path: artifacts/pkgs/incoming

- name: Download macOS arm64 Onedir Archive
if: ${{ ! github.event.repository.fork }}
uses: actions/download-artifact@v4
with:
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-arm64.tar.xz
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2367,6 +2367,7 @@ jobs:
path: artifacts/pkgs/incoming

- name: Download macOS Arch64 Packages
if: ${{ ! github.event.repository.fork }}
uses: actions/download-artifact@v4
with:
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-arm64-macos
Expand Down Expand Up @@ -2471,6 +2472,7 @@ jobs:
path: artifacts/pkgs/incoming

- name: Download macOS arm64 Onedir Archive
if: ${{ ! github.event.repository.fork }}
uses: actions/download-artifact@v4
with:
name: salt-${{ needs.prepare-workflow.outputs.salt-version }}-onedir-macos-arm64.tar.xz
Expand Down
Loading

0 comments on commit b8294ae

Please sign in to comment.