2021-10-19 18:05:37 -04:00
|
|
|
#!/usr/bin/env python3
|
2021-10-20 14:45:00 -04:00
|
|
|
#
|
|
|
|
# Copyright (C) 2021-2022 F4PGA Authors
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
#
|
|
|
|
# https://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2021-10-19 18:05:37 -04:00
|
|
|
|
2021-12-14 03:21:51 -05:00
|
|
|
from sys import argv as sys_argv
|
|
|
|
|
2022-02-18 12:15:44 -05:00
|
|
|
isFork = len(sys_argv)>1 and sys_argv[1] != 'chipsalliance/f4pga-examples'
|
2022-04-04 06:31:49 -04:00
|
|
|
usesSurelog = len(sys_argv)>2 and sys_argv[2] == 'Surelog'
|
2021-12-14 22:32:15 -05:00
|
|
|
|
2021-12-14 03:21:51 -05:00
|
|
|
runs_on = (
|
|
|
|
'ubuntu-latest'
|
2021-12-14 22:32:15 -05:00
|
|
|
if isFork else
|
2021-12-14 03:21:51 -05:00
|
|
|
['self-hosted', 'Linux', 'X64']
|
|
|
|
)
|
|
|
|
|
2021-10-19 18:05:37 -04:00
|
|
|
examples = [
|
|
|
|
"pulse_width_led",
|
2021-10-23 19:40:31 -04:00
|
|
|
"hello-a",
|
|
|
|
"hello-b",
|
|
|
|
"hello-c",
|
2021-10-23 21:42:30 -04:00
|
|
|
"hello-d",
|
|
|
|
"hello-e",
|
|
|
|
"hello-f",
|
|
|
|
"hello-g",
|
|
|
|
"hello-h",
|
|
|
|
"hello-i",
|
2021-10-23 21:50:28 -04:00
|
|
|
"hello-j",
|
2021-10-19 18:05:37 -04:00
|
|
|
]
|
|
|
|
|
2022-04-04 06:31:49 -04:00
|
|
|
# Skip tests that are currently unsupported
|
|
|
|
if not usesSurelog:
|
|
|
|
examples = [
|
|
|
|
"litex",
|
|
|
|
"picosoc",
|
|
|
|
"litex_linux",
|
|
|
|
"button_controller",
|
|
|
|
"timer",
|
|
|
|
"hello-k",
|
|
|
|
"hello-l"
|
|
|
|
] + examples
|
|
|
|
|
2021-10-19 18:05:37 -04:00
|
|
|
jobs = []
|
|
|
|
|
|
|
|
osvers = [
|
|
|
|
("ubuntu", "focal"),
|
|
|
|
("debian", "buster"),
|
|
|
|
("debian", "bullseye"),
|
2021-12-14 03:20:51 -05:00
|
|
|
("debian", "sid"),
|
2021-12-15 19:54:06 -05:00
|
|
|
("fedora", "35"),
|
|
|
|
("fedora", "36"),
|
2021-10-19 18:05:37 -04:00
|
|
|
]
|
|
|
|
|
2021-12-14 22:32:15 -05:00
|
|
|
if not isFork:
|
2021-12-15 03:42:37 -05:00
|
|
|
examples = [
|
|
|
|
"counter",
|
|
|
|
] + examples
|
2022-04-04 06:31:49 -04:00
|
|
|
|
|
|
|
# Skip tests that are currently unsupported
|
|
|
|
if not usesSurelog:
|
|
|
|
examples = [
|
|
|
|
"litex_sata",
|
|
|
|
] + examples
|
|
|
|
|
2021-12-14 22:32:15 -05:00
|
|
|
osvers += [
|
|
|
|
("ubuntu", "xenial"),
|
|
|
|
("ubuntu", "bionic"),
|
|
|
|
("centos", "7"),
|
|
|
|
]
|
|
|
|
|
2021-10-19 18:05:37 -04:00
|
|
|
for osver in osvers:
|
|
|
|
jobs += [{
|
2021-12-14 03:21:51 -05:00
|
|
|
'runs-on': runs_on,
|
2021-10-19 18:05:37 -04:00
|
|
|
'fpga-fam': "xc7",
|
|
|
|
'os': osver[0],
|
|
|
|
'os-version': osver[1],
|
|
|
|
'example': example
|
|
|
|
} for example in examples]
|
|
|
|
|
|
|
|
jobs += [{
|
2021-12-14 03:21:51 -05:00
|
|
|
'runs-on': runs_on,
|
2021-10-19 18:05:37 -04:00
|
|
|
'fpga-fam': "eos-s3",
|
|
|
|
'os': osver[0],
|
|
|
|
'os-version': osver[1],
|
|
|
|
'example': "counter"
|
|
|
|
} for osver in osvers]
|
|
|
|
|
2021-12-14 03:21:51 -05:00
|
|
|
print(f'::set-output name=matrix::{jobs!s}')
|
|
|
|
|
|
|
|
print(str(jobs))
|