diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 512df925..6215641e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,10 +18,16 @@ jobs: . /home/github-runner/setup-paths.sh export OPENRAM_HOME="`pwd`/compiler" export OPENRAM_TECH="`pwd`/technology:/software/PDKs/skywater-tech" + export OPENRAM_TMP="`pwd`/scn4me_subm" python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 32 -t scn4m_subm + - name: Archive + uses: actions/upload-artifact@v2 + with: + name: scn4me_subm Archives + path: $OPENRAM_TMP/ freepdk45: # Run this second and only if the first passes - needs: scn4me_subm + needs: setup runs-on: self-hosted steps: - name: FreePDK45 test @@ -29,7 +35,13 @@ jobs: . /home/github-runner/setup-paths.sh export OPENRAM_HOME="`pwd`/compiler" export OPENRAM_TECH="`pwd`/technology:/software/PDKs/skywater-tech" + export OPENRAM_TMP="`pwd`/freepdk45" python3-coverage run -p $OPENRAM_HOME/tests/regress.py -j 32 -t freepdk45 + - name: Archive + uses: actions/upload-artifact@v2 + with: + name: FreePDK45 Archives + path: $OPENRAM_TMP/ coverage: needs: [scn4me_subm, freepdk45] runs-on: self-hosted diff --git a/compiler/globals.py b/compiler/globals.py index d6cff8a4..8a4cff3d 100644 --- a/compiler/globals.py +++ b/compiler/globals.py @@ -116,11 +116,6 @@ def parse_args(): if OPTS.tech_name == "s8": OPTS.tech_name = "sky130" - if OPTS.openram_temp: - # If they define the temp directory, we can only use one thread at a time! - debug.warning("num_threads forced to 1 due to shared temp directory {}".format(OPTS.openram_temp)) - OPTS.num_threads = 1 - return (options, args) @@ -426,7 +421,7 @@ def setup_paths(): # Add all of the subdirs to the python path # These subdirs are modules and don't need # to be added: characterizer, verify - subdirlist = [ item for item in os.listdir(OPENRAM_HOME) if os.path.isdir(os.path.join(OPENRAM_HOME, item)) ] + subdirlist = [item for item in os.listdir(OPENRAM_HOME) if os.path.isdir(os.path.join(OPENRAM_HOME, item))] for subdir in subdirlist: full_path = "{0}/{1}".format(OPENRAM_HOME, subdir) debug.check(os.path.isdir(full_path), @@ -434,10 +429,10 @@ def setup_paths(): if "__pycache__" not in full_path: sys.path.append("{0}".format(full_path)) - # Use a unique temp directory - if not OPTS.openram_temp: - OPTS.openram_temp = "/tmp/openram_{0}_{1}_temp/".format(getpass.getuser(), - os.getpid()) + # Use a unique temp subdirectory + OPTS.openram_temp += "/openram_{0}_{1}_temp/".format(getpass.getuser(), + os.getpid()) + if not OPTS.openram_temp.endswith('/'): OPTS.openram_temp += "/" debug.info(1, "Temporary files saved in " + OPTS.openram_temp) diff --git a/compiler/options.py b/compiler/options.py index 91bae758..4c04cdb0 100644 --- a/compiler/options.py +++ b/compiler/options.py @@ -74,7 +74,7 @@ class options(optparse.Values): # If user defined the temporary location in their environment, use it openram_temp = os.path.abspath(os.environ.get("OPENRAM_TMP")) except: - openram_temp = None + openram_temp = "/tmp" # This is the verbosity level to control debug information. 0 is none, 1 # is minimal, etc. diff --git a/compiler/tests/regress.py b/compiler/tests/regress.py index 285f8c7d..878182a5 100755 --- a/compiler/tests/regress.py +++ b/compiler/tests/regress.py @@ -73,7 +73,7 @@ def fork_tests(num_threads): sys.stdin.close() test_suite_result = AutoTimingTestResultDecorator(TestProtocolClient(stream)) test_suite.run(test_suite_result) - except: + except EBADF: try: stream.write(traceback.format_exc()) finally: