Skip to content

Commit 60540dc

Browse files
committed
feat(workflows): use venv for python dependencies
Isolates Python dependencies within a virtual environment for all GitHub Actions workflows. This prevents conflicts with system-wide packages and ensures a consistent, reproducible environment for CI/CD processes. - Replaces all 'pip install' commands with a 'venv' setup. - Simplifies 'pip' commands by removing unnecessary flags. - Adds 'venv/' to '.gitignore' to exclude virtual environment directories from source control. Signed-off-by: Sombrio <[email protected]>
1 parent aaf4f6a commit 60540dc

File tree

5 files changed

+12
-2
lines changed

5 files changed

+12
-2
lines changed

.github/workflows/github-actions-lint-tcl.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ jobs:
1717

1818
- name: Install Dependencies
1919
run: |
20-
python3 -m pip install -U --user tclint==0.4.2
20+
python3 -m venv ./venv
21+
source ./venv/bin/activate
22+
pip install tclint==0.4.2
2123
2224
- name: Lint
2325
run: |

.github/workflows/github-actions-manual-update-rules.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
python-version: "3.10"
2323
- name: Install Python Packages
2424
run: |
25+
python3 -m venv ./venv
26+
source ./venv/bin/activate
2527
pip install firebase-admin
2628
- name: Execute Python Script Update
2729
env:

.github/workflows/github-actions-update-rules.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ jobs:
2424
python-version: "3.10"
2525
- name: Install Python Packages
2626
run: |
27+
python3 -m venv ./venv
28+
source ./venv/bin/activate
2729
pip install firebase-admin
2830
- name: Execute Python Script Update
2931
env:

.github/workflows/github-actions-yaml-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
git diff --exit-code docs/user/FlowVariables.md
2626
- name: Run yamlfix check
2727
run: |
28+
python3 -m venv ./venv
29+
source ./venv/bin/activate
2830
pip install --quiet yamlfix==1.17.0
2931
yamlfix --version
3032
set -x

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ flow/rc_model.bin
2929
flow/*.tif.gz
3030
flow/*.def.v
3131

32-
3332
# RePlAce deps
3433
*PORT9.dat
3534
*POST9.dat
@@ -103,3 +102,6 @@ bazel-bin
103102
bazel-out
104103
bazel-OpenROAD-flow-scripts
105104
bazel-testlogs
105+
106+
# python venv
107+
venv/

0 commit comments

Comments
 (0)