-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1671 from firesim/sudo-once
Isolate `sudo` usage
- Loading branch information
Showing
35 changed files
with
636 additions
and
243 deletions.
There are no files selected for viewing
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,34 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import argparse | ||
from enum import Enum | ||
from fabric.api import prefix, run, execute # type: ignore | ||
|
||
from ci_variables import ci_env | ||
|
||
class FpgaPlatform(Enum): | ||
vitis = 'vitis' | ||
f1 = 'f1' | ||
xilinx_alveo_u250 = 'xilinx_alveo_u250' | ||
|
||
def __str__(self): | ||
return self.value | ||
|
||
parser = argparse.ArgumentParser(description='') | ||
parser.add_argument('--platform', type=FpgaPlatform, choices=list(FpgaPlatform), required=True) | ||
args = parser.parse_args() | ||
|
||
def build_driver(): | ||
"""Runs compilation of FireSim driver for the make-default tuple""" | ||
|
||
# assumptions: | ||
# - the firesim repo is already setup in a prior script | ||
# - machine-launch-script requirements are already installed | ||
|
||
with prefix(f"cd {ci_env['REMOTE_WORK_DIR']}"): | ||
with prefix('source sourceme-manager.sh --skip-ssh-setup'): | ||
with prefix("cd ./sim"): | ||
run(f"make PLATFORM={args.platform} {args.platform}") | ||
|
||
if __name__ == "__main__": | ||
execute(build_driver, hosts=["localhost"]) |
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
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
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
Oops, something went wrong.