forked from chipsalliance/f4pga-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: use GitHub Packages to avoid installing the toolchain from scratc…
…h in each job INSTALL_DIR changed to an absolute location due to actions/runner#1525 Signed-off-by: Unai Martinez-Corral <[email protected]>
- Loading branch information
Showing
5 changed files
with
157 additions
and
109 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
#!/usr/bin/env python3 | ||
|
||
from sys import argv as sys_argv | ||
|
||
registry = 'ghcr.io/umarcor/symbiflow/conda' | ||
|
||
isFork = len(sys_argv)>1 and sys_argv[1] != 'SymbiFlow/symbiflow-examples' | ||
|
||
runs_on = ( | ||
'ubuntu-latest' | ||
if isFork else | ||
['self-hosted', 'Linux', 'X64'] | ||
) | ||
|
||
examples = [ | ||
"picosoc", | ||
"litex", | ||
"litex_linux", | ||
"button_controller", | ||
"pulse_width_led", | ||
"timer", | ||
"hello-a", | ||
"hello-b", | ||
"hello-c", | ||
"hello-d", | ||
"hello-e", | ||
"hello-f", | ||
"hello-g", | ||
"hello-h", | ||
"hello-i", | ||
"hello-j", | ||
"hello-k", | ||
"hello-l" | ||
] | ||
|
||
jobs = [] | ||
|
||
osvers = [ | ||
("ubuntu", "focal"), | ||
("centos", "8"), | ||
("debian", "buster"), | ||
("debian", "bullseye"), | ||
("debian", "sid"), | ||
("fedora", "35") | ||
] | ||
|
||
if not isFork: | ||
examples = [ | ||
"counter", | ||
"litex_sata", | ||
] + examples | ||
osvers += [ | ||
("ubuntu", "xenial"), | ||
("ubuntu", "bionic"), | ||
("centos", "7"), | ||
] | ||
|
||
for osver in osvers: | ||
jobs += [{ | ||
'runs-on': runs_on, | ||
'fpga-fam': "xc7", | ||
'image': f'{registry}/{osver[0]}/{osver[1]}/xc7', | ||
'example': example, | ||
'name': f'xc7 | {osver[0]}/{osver[1]} | {example}' | ||
} for example in examples] | ||
|
||
jobs += [{ | ||
'runs-on': runs_on, | ||
'fpga-fam': "eos-s3", | ||
'image': f'{registry}/{osver[0]}/{osver[1]}/eos-s3', | ||
'example': "counter", | ||
'name': f'eos-s3 | {osver[0]}/{osver[1]} | counter', | ||
} for osver in osvers] | ||
|
||
print('::set-output name=matrix::' + str(jobs)) | ||
|
||
utils = { | ||
'ubuntu': 'apt -qqy update && apt -qqy install git wget locales && locale-gen $LANG', | ||
'debian': 'apt -qqy update && apt -qqy install git wget locales && locale-gen $LANG', | ||
'centos': 'yum -y install git wget', | ||
'fedora': 'dnf install -y git wget', | ||
} | ||
|
||
# FIXME: | ||
# On centos:8 the following needs to be executed before installing the utils. | ||
# sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* | ||
# sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* | ||
|
||
images = [ | ||
{ | ||
'registry': f'{registry}', | ||
'image': f'{osver[0]}/{osver[1]}/{fam}', | ||
'from': f'{osver[0]}:{osver[1]}', | ||
'utils': utils[osver[0]], | ||
'args': f'{fam} {osver[0]}' | ||
} for osver in osvers for fam in ['xc7', 'eos-s3'] | ||
] | ||
|
||
print('::set-output name=images::' + str(images)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters