Skip to content

Commit

Permalink
Use 3 or 4 cores, as appropriate, on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
pcolby committed Jan 10, 2025
1 parent f68e51d commit ff6f702
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ on: [ push, pull_request ]
permissions:
contents: read

env:
# Currently, GitHub-hosted runners for public repos specify 4 cores, except macOS 14+
# See https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/
# about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
CMAKE_BUILD_PARALLEL_LEVEL: 4 # Default only; overridden where appriopriate, such as on macOS 14+ below.

jobs:
linux:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -150,6 +156,8 @@ jobs:

mac:
runs-on: ${{ matrix.os }}
env:
CMAKE_BUILD_PARALLEL_LEVEL: ${{ matrix.os == 'macos-13' && 4 || 3 }}
timeout-minutes: 15
strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ permissions:
contents: read

env:
CMAKE_BUILD_PARALLEL_LEVEL: 4
DOXYGEN_VERSION: 1.13.1

jobs:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/lupdate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on: [ push, pull_request ]
permissions:
contents: read

env:
CMAKE_BUILD_PARALLEL_LEVEL: 4

jobs:
lupdate:
runs-on: ubuntu-24.04
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/sonar.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ on:
permissions:
contents: read

env:
CMAKE_BUILD_PARALLEL_LEVEL: 4

jobs:
build-and-scan:
runs-on: ubuntu-24.04
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/static.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on: [ push, pull_request ]
permissions:
contents: read

env:
CMAKE_BUILD_PARALLEL_LEVEL: 4

jobs:
CodeQL:
permissions:
Expand Down

0 comments on commit ff6f702

Please sign in to comment.