Skip to content

Commit

Permalink
ci: parameterize runs-on in reusable workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
abathur authored and mkenigs committed May 27, 2024
1 parent 29fc989 commit 2e15a2b
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 5 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/build-aarch64-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ on:
type: string
required: false
default: aarch64-darwin-artifacts-${{ github.sha }}
runs-on:
type: string
required: true
default: macos-latest-xlarge

jobs:
build-aarch64-darwin:
name: Build aarch64 Darwin
runs-on: macos-latest-xlarge
runs-on: ${{ inputs.runs-on }}
concurrency: ${{ inputs.cache-key }}
permissions:
id-token: "write"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-aarch64-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ on:
type: string
required: false
default: aarch64-linux-artifacts-${{ github.sha }}
runs-on:
type: string
required: true
default: namespace-profile-default-arm64

jobs:
build-aarch64-linux:
name: Build aarch64 Linux (static)
runs-on: namespace-profile-default-arm64
runs-on: ${{ inputs.runs-on }}
concurrency: ${{ inputs.cache-key }}
permissions:
id-token: "write"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-i686-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ on:
type: string
required: false
default: i686-linux-artifacts-${{ github.sha }}
runs-on:
type: string
required: true
default: UbuntuLatest32Cores128G

jobs:
build-i686-linux:
name: Build i686 Linux (static)
runs-on: UbuntuLatest32Cores128G
runs-on: ${{ inputs.runs-on }}
concurrency: ${{ inputs.cache-key }}
permissions:
id-token: "write"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-x86_64-darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ on:
type: string
required: false
default: x86_64-darwin-artifacts-${{ github.sha }}
runs-on:
type: string
required: true
default: macos-13-large

jobs:
build-x86_64-darwin:
name: Build x86_64 Darwin
runs-on: macos-13-large
runs-on: ${{ inputs.runs-on }}
concurrency: ${{ inputs.cache-key }}
permissions:
id-token: "write"
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build-x86_64-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ on:
type: string
required: false
default: x86_64-linux-artifacts-${{ github.sha }}
runs-on:
type: string
required: true
default: UbuntuLatest32Cores128G

jobs:
build-x86_64-linux:
name: Build x86_64 Linux (static)
runs-on: UbuntuLatest32Cores128G
runs-on: ${{ inputs.runs-on }}
concurrency: ${{ inputs.cache-key }}
permissions:
id-token: "write"
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ permissions:
jobs:
build-x86_64-linux:
uses: ./.github/workflows/build-x86_64-linux.yml
with:
runs-on: ubuntu-latest

build-x86_64-darwin:
uses: ./.github/workflows/build-x86_64-darwin.yml
with:
runs-on: macos-latest

lints:
name: Lints
Expand Down

0 comments on commit 2e15a2b

Please sign in to comment.