Skip to content

Commit 144c2a6

Browse files
authored
Merge pull request #1545 from Idclip/feature/runner_forks
Fixed forked repo action runners
2 parents dea3fd6 + b521258 commit 144c2a6

File tree

6 files changed

+37
-35
lines changed

6 files changed

+37
-35
lines changed

.github/workflows/ax.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
github.event_name != 'workflow_dispatch' ||
5050
github.event.inputs.type == 'all' ||
5151
github.event.inputs.type == 'linux'
52-
runs-on: ubuntu-20.04-8c-32g-300h
52+
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
5353
name: >
5454
linux-ax:${{ matrix.config.image }}-cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }}
5555
container:
@@ -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=\"
@@ -158,7 +156,7 @@ jobs:
158156
if: |
159157
github.event_name == 'workflow_dispatch' &&
160158
github.event.inputs.type == 'grammar'
161-
runs-on: ubuntu-20.04-8c-32g-300h
159+
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
162160
container:
163161
image: aswf/ci-openvdb:2022-clang11
164162
steps:

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
github.event_name != 'workflow_dispatch' ||
5757
github.event.inputs.type == 'all' ||
5858
github.event.inputs.type == 'linux'
59-
runs-on: ubuntu-20.04-8c-32g-300h
59+
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
6060
name: >
6161
linux-vfx:${{ matrix.config.image }}-
6262
abi:${{ matrix.config.abi }}-
@@ -118,7 +118,7 @@ jobs:
118118
github.event_name != 'workflow_dispatch' ||
119119
github.event.inputs.type == 'all' ||
120120
github.event.inputs.type == 'win'
121-
runs-on: windows-2022-8c-32g-300h
121+
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
122122
name: windows-vc:${{ matrix.config.vc }}-type:${{ matrix.config.build }}
123123
env:
124124
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }}

.github/workflows/houdini.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
# Check that valid github secrets have been set. This isn't needed to retrieve
4242
# the cache, but ensures that the job doens't start with an empty cache
4343
name: Verify Houdini Secrets
44-
runs-on: ubuntu-20.04-8c-32g-300h
44+
runs-on: ubuntu-latest
4545
outputs:
4646
HOUDINI_SECRETS: ${{ steps.check.outputs.HOUDINI_SECRETS }}
4747
steps:
@@ -59,7 +59,7 @@ jobs:
5959
if: >
6060
${{ needs.checksecret.outputs.HOUDINI_SECRETS == 'true' ||
6161
github.repository_owner == 'AcademySoftwareFoundation' }}
62-
runs-on: ubuntu-20.04-8c-32g-300h
62+
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
6363
name: hou:${{ matrix.config.hou }}-vfx:${{ matrix.config.image }}-cxx:${{ matrix.config.cxx }}
6464
container:
6565
image: aswf/ci-base:${{ matrix.config.image }}

.github/workflows/nanovdb.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
github.event_name != 'workflow_dispatch' ||
5050
github.event.inputs.type == 'all' ||
5151
github.event.inputs.type == 'linux'
52-
runs-on: ubuntu-20.04-8c-32g-300h
52+
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
5353
name: >
5454
linux-nanovdb:cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }}
5555
container:
@@ -93,7 +93,7 @@ jobs:
9393
github.event_name != 'workflow_dispatch' ||
9494
github.event.inputs.type == 'all' ||
9595
github.event.inputs.type == 'win'
96-
runs-on: windows-2022-8c-32g-300h
96+
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
9797
env:
9898
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }}
9999
visual_studio: "Visual Studio 17 2022"
@@ -175,7 +175,7 @@ jobs:
175175
github.event_name != 'workflow_dispatch' ||
176176
github.event.inputs.type == 'all' ||
177177
github.event.inputs.type == 'linux'
178-
runs-on: ubuntu-20.04-8c-32g-300h
178+
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
179179
steps:
180180
- uses: actions/checkout@v3
181181
- name: install_gtest

.github/workflows/weekly.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
# download Houdini and cache it. The secrets are used in download_houdini.py
3131
checksecret:
3232
name: Verify Houdini Secrets
33-
runs-on: ubuntu-20.04-8c-32g-300h
33+
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
3434
outputs:
3535
HOUDINI_SECRETS: ${{ steps.check.outputs.HOUDINI_SECRETS }}
3636
steps:
@@ -54,7 +54,7 @@ jobs:
5454
(github.event_name != 'workflow_dispatch' ||
5555
github.event.inputs.type == 'all' ||
5656
github.event.inputs.type == 'houdini')
57-
runs-on: ubuntu-20.04-8c-32g-300h
57+
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
5858
name: linux-houdini:${{ matrix.config.houdini_version }}
5959
env:
6060
CXX: clang++
@@ -98,7 +98,7 @@ jobs:
9898
github.event_name != 'workflow_dispatch' ||
9999
github.event.inputs.type == 'all' ||
100100
github.event.inputs.type == 'extra'
101-
runs-on: ubuntu-20.04-8c-32g-300h
101+
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
102102
name: linux-extra:${{ matrix.config.name }}
103103
container:
104104
# Can bump clang when AX is compatible with LLVM14
@@ -167,7 +167,7 @@ jobs:
167167
github.event_name != 'workflow_dispatch' ||
168168
github.event.inputs.type == 'all' ||
169169
github.event.inputs.type == 'ax'
170-
runs-on: ubuntu-20.04-8c-32g-300h
170+
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
171171
name: >
172172
linux-ax:${{ matrix.config.image }}-cxx:${{ matrix.config.cxx }}-${{ matrix.config.build }}
173173
container:
@@ -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=\"
@@ -261,7 +259,7 @@ jobs:
261259
github.event_name != 'workflow_dispatch' ||
262260
github.event.inputs.type == 'all' ||
263261
github.event.inputs.type == 'ax'
264-
runs-on: windows-2022-8c-32g-300h
262+
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'windows-2022-8c-32g-300h') || 'windows-latest' }}
265263
name: windows-vc:${{ matrix.config.vc }}-type:${{ matrix.config.build }}
266264
env:
267265
VCPKG_DEFAULT_TRIPLET: ${{ matrix.config.vc }}
@@ -326,7 +324,7 @@ jobs:
326324
github.event_name != 'workflow_dispatch' ||
327325
github.event.inputs.type == 'all' ||
328326
github.event.inputs.type == 'blosc'
329-
runs-on: ubuntu-20.04-8c-32g-300h
327+
runs-on: ${{ (github.repository_owner == 'AcademySoftwareFoundation' && 'ubuntu-20.04-8c-32g-300h') || 'ubuntu-latest' }}
330328
name: linux-blosc:${{ matrix.blosc }}
331329
container:
332330
image: aswf/ci-base:2021

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)