Skip to content

Commit b521258

Browse files
committed
Choose different defaults for -j in ci/build depending on the runner
Signed-off-by: Nick Avramoussis <[email protected]>
1 parent f302d78 commit b521258

File tree

3 files changed

+22
-20
lines changed

3 files changed

+22
-20
lines changed

.github/workflows/ax.yml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,11 @@ jobs:
6161
matrix:
6262
config:
6363
# Unified
64-
- { image: '2021-clang10', cxx: 'clang++', build: 'Release', j: '8', components: 'core,python,bin,axcore,axbin,axtest' }
65-
- { image: '2021-clang10', cxx: 'g++', build: 'Release', j: '8', components: 'core,python,bin,axcore,axbin,axtest' }
66-
- { image: '2022-clang11', cxx: 'clang++', build: 'Debug', j: '8', components: 'core,python,bin,axcore,axbin,axtest' }
67-
- { image: '2022-clang11', cxx: 'clang++', build: 'Release', j: '8', components: 'core,python,bin,axcore,axbin,axtest' }
68-
- { image: '2022-clang11', cxx: 'g++', build: 'Release', j: '8', components: 'core,python,bin,axcore,axbin,axtest' }
64+
- { image: '2021-clang10', cxx: 'clang++', build: 'Release', components: 'core,python,bin,axcore,axbin,axtest' }
65+
- { image: '2021-clang10', cxx: 'g++', build: 'Release', components: 'core,python,bin,axcore,axbin,axtest' }
66+
- { image: '2022-clang11', cxx: 'clang++', build: 'Debug', components: 'core,python,bin,axcore,axbin,axtest' }
67+
- { image: '2022-clang11', cxx: 'clang++', build: 'Release', components: 'core,python,bin,axcore,axbin,axtest' }
68+
- { image: '2022-clang11', cxx: 'g++', build: 'Release', components: 'core,python,bin,axcore,axbin,axtest' }
6969
fail-fast: false
7070
steps:
7171
- uses: actions/checkout@v3
@@ -85,7 +85,6 @@ jobs:
8585
- name: build
8686
run: >
8787
./ci/build.sh -v
88-
-j ${{ matrix.config.j }}
8988
--build-type=${{ matrix.config.build }}
9089
--components=${{ matrix.config.components }}
9190
--cargs=\"
@@ -100,7 +99,6 @@ jobs:
10099
if: matrix.config.components == 'core'
101100
run: >
102101
./ci/build.sh -v
103-
-j ${{ matrix.config.j }}
104102
--build-type=${{ matrix.config.build }}
105103
--components="bin,axcore,axbin,axtest"
106104
--cargs=\"

.github/workflows/weekly.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -178,22 +178,21 @@ jobs:
178178
matrix:
179179
config:
180180
# Unified
181-
- { image: '2022-clang14', cxx: 'clang++', build: 'Release', j: '8', components: 'core,bin,axcore,axbin,axtest' }
182-
- { image: '2022-clang14', cxx: 'g++', build: 'Release', j: '8', components: 'core,bin,axcore,axbin,axtest' }
183-
- { image: '2022-clang13', cxx: 'clang++', build: 'Release', j: '8', components: 'core,bin,axcore,axbin,axtest' }
184-
- { image: '2022-clang13', cxx: 'g++', build: 'Release', j: '8', components: 'core,bin,axcore,axbin,axtest' }
181+
- { image: '2022-clang14', cxx: 'clang++', build: 'Release', components: 'core,bin,axcore,axbin,axtest' }
182+
- { image: '2022-clang14', cxx: 'g++', build: 'Release', components: 'core,bin,axcore,axbin,axtest' }
183+
- { image: '2022-clang13', cxx: 'clang++', build: 'Release', components: 'core,bin,axcore,axbin,axtest' }
184+
- { image: '2022-clang13', cxx: 'g++', build: 'Release', components: 'core,bin,axcore,axbin,axtest' }
185185
# Standalone
186-
- { image: '2021-clang10', cxx: 'clang++', build: 'Release', j: '8', components: 'core' }
187-
- { image: '2022-clang11', cxx: 'clang++', build: 'Debug', j: '8', components: 'core' }
188-
- { image: '2022-clang11', cxx: 'clang++', build: 'Release', j: '8', components: 'core' }
189-
- { image: '2022-clang11', cxx: 'g++', build: 'Release', j: '8', components: 'core' }
186+
- { image: '2021-clang10', cxx: 'clang++', build: 'Release', components: 'core' }
187+
- { image: '2022-clang11', cxx: 'clang++', build: 'Debug', components: 'core' }
188+
- { image: '2022-clang11', cxx: 'clang++', build: 'Release', components: 'core' }
189+
- { image: '2022-clang11', cxx: 'g++', build: 'Release', components: 'core' }
190190
fail-fast: false
191191
steps:
192192
- uses: actions/checkout@v3
193193
- name: build
194194
run: >
195195
./ci/build.sh -v
196-
-j ${{ matrix.config.j }}
197196
--build-type=${{ matrix.config.build }}
198197
--components=${{ matrix.config.components }}
199198
--cargs=\"
@@ -208,7 +207,6 @@ jobs:
208207
if: matrix.config.components == 'core'
209208
run: >
210209
./ci/build.sh -v
211-
-j ${{ matrix.config.j }}
212210
--build-type=${{ matrix.config.build }}
213211
--components="bin,axcore,axbin,axtest,python"
214212
--cargs=\"

ci/build.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,15 @@ declare -A PARMS
2929
PARMS[--components]=core,bin
3030
PARMS[--target]=install
3131
PARMS[--build-dir]=build
32-
# github actions runners have 8 threads
33-
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
34-
PARMS[-j]=8
32+
33+
if [[ $RUNNER_NAME == *"8c-32g-300h"* ]]; then
34+
# ASWF github actions runners have 8 threads
35+
PARMS[-j]=8
36+
else
37+
# Github actions runners have 2 threads
38+
# https://help.github.com/en/actions/reference/virtual-environments-for-github-hosted-runners
39+
PARMS[-j]=2
40+
fi
3541

3642
# Available options for --components
3743
declare -A COMPONENTS

0 commit comments

Comments
 (0)