ci: use default runners when running CI on a fork

Signed-off-by: umarcor <unai.martinezcorral@ehu.eus>
This commit is contained in:
umarcor 2021-12-14 09:21:51 +01:00
parent 6ce90115fa
commit e051b9aa13
2 changed files with 16 additions and 3 deletions

View File

@ -1,5 +1,13 @@
#!/usr/bin/env python3
from sys import argv as sys_argv
runs_on = (
'ubuntu-latest'
if len(sys_argv)>1 and sys_argv[1] != 'SymbiFlow/symbiflow-examples' else
['self-hosted', 'Linux', 'X64']
)
examples = [
"counter",
"picosoc",
@ -39,6 +47,7 @@ osvers = [
for osver in osvers:
jobs += [{
'runs-on': runs_on,
'fpga-fam': "xc7",
'os': osver[0],
'os-version': osver[1],
@ -46,10 +55,13 @@ for osver in osvers:
} for example in examples]
jobs += [{
'runs-on': runs_on,
'fpga-fam': "eos-s3",
'os': osver[0],
'os-version': osver[1],
'example': "counter"
} for osver in osvers]
print('::set-output name=matrix::' + str(jobs))
print(f'::set-output name=matrix::{jobs!s}')
print(str(jobs))

View File

@ -21,16 +21,17 @@ jobs:
- name: Generate examples matrix
id: generate
run: ./.github/scripts/generate_job_matrix.py
run: ./.github/scripts/generate_job_matrix.py '${{ github.repository }}'
Test:
needs: Matrix
runs-on: [self-hosted, Linux, X64]
strategy:
fail-fast: false
matrix:
include: ${{ fromJson(needs.Matrix.outputs.matrix) }}
runs-on: ${{ matrix.runs-on }}
name: ${{ matrix.fpga-fam }} | ${{ matrix.os }} ${{ matrix.os-version }} | ${{ matrix.example }}
env:
LANG: "en_US.UTF-8"