mirror of
https://github.com/XTXMarkets/ternfs.git
synced 2026-05-05 01:09:35 -05:00
First GH workflow attempt
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ build_dir.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
if build_type in ('alpine', 'alpine-debug') and 'IN_EGGS_BUILD_CONTAINER' not in os.environ:
|
||||
subprocess.run(
|
||||
['docker', 'run', '--rm', '-i', '--mount', f'type=bind,src={repo_dir},dst=/eggsfs', 'REDACTED', '/eggsfs/cpp/build.py', build_type] + sys.argv[2:],
|
||||
['docker', 'run', '--rm', '-i', '--mount', f'type=bind,src={repo_dir},dst=/eggsfs', '-u', f'{os.getuid()}:{os.getgid()}', 'REDACTED', '/eggsfs/cpp/build.py', build_type] + sys.argv[2:],
|
||||
check=True,
|
||||
)
|
||||
else:
|
||||
|
||||
+4
-1
@@ -17,10 +17,13 @@ if len(paths) == 0:
|
||||
|
||||
if 'IN_EGGS_BUILD_CONTAINER' not in os.environ:
|
||||
subprocess.run(
|
||||
['docker', 'run', '--rm', '-i', '--mount', f'type=bind,src={repo_dir},dst=/eggsfs', 'REDACTED', '/eggsfs/go/build.py'] + paths,
|
||||
['docker', 'run', '--rm', '-i', '--mount', f'type=bind,src={repo_dir},dst=/eggsfs', '-u', f'{os.getuid()}:{os.getgid()}', 'REDACTED', '/eggsfs/go/build.py'] + paths,
|
||||
check=True,
|
||||
)
|
||||
else:
|
||||
# Otherwise go will try to create the cache in /.cache, which won't work
|
||||
# since we're not running as root.
|
||||
os.environ['GOCACHE'] = '/eggsfs/.cache'
|
||||
for path_str in paths:
|
||||
print(f'Building {path_str}')
|
||||
path = go_dir / Path(path_str)
|
||||
|
||||
@@ -62,7 +62,7 @@ func main() {
|
||||
}
|
||||
|
||||
if *dataDir == "" {
|
||||
dir, err := os.MkdirTemp("", "eggsrun.")
|
||||
dir, err := os.MkdirTemp(".", "eggsrun.")
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("could not create tmp data dir: %w", err))
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ func main() {
|
||||
cleanupDbDir := false
|
||||
tmpDataDir := *dataDir == ""
|
||||
if tmpDataDir {
|
||||
dir, err := os.MkdirTemp("", "eggs-integrationtest.")
|
||||
dir, err := os.MkdirTemp(".", "eggs-integrationtest.")
|
||||
if err != nil {
|
||||
panic(fmt.Errorf("could not create tmp data dir: %w", err))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user