Skip to content

Commit 5e3d03a

Browse files
[CI] Moved to Use Standard Package Installer Script
Found that the CI was using a separate script which was indirectly calling the standard package install script. This can cause the standard package install script to regress, but it was also causing pressure on the GitHub runners by having them install more packages than they needed.
1 parent 51c025a commit 5e3d03a

File tree

6 files changed

+107
-170
lines changed

6 files changed

+107
-170
lines changed

.github/scripts/install_dependencies.sh

Lines changed: 0 additions & 60 deletions
This file was deleted.

.github/scripts/install_jammy_dependencies.sh

Lines changed: 0 additions & 56 deletions
This file was deleted.

.github/workflows/nightly_test_manual.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ jobs:
144144
- uses: actions/setup-python@v5
145145
with:
146146
python-version: 3.12.3
147+
147148
- uses: actions/checkout@v4
148149
with:
149150
submodules: 'true'
@@ -153,7 +154,7 @@ jobs:
153154
id: cpu-cores
154155

155156
- name: Install dependencies
156-
run: ./.github/scripts/install_dependencies.sh
157+
run: ./install_apt_packages.sh
157158

158159
- uses: hendrikmuhs/ccache-action@v1.2
159160
with:

.github/workflows/test.yml

Lines changed: 62 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
id: cpu-cores
4848

4949
- name: Install dependencies
50-
run: ./.github/scripts/install_dependencies.sh
50+
run: ./install_apt_packages.sh
5151

5252
- uses: hendrikmuhs/ccache-action@v1.2
5353
with:
@@ -88,7 +88,7 @@ jobs:
8888
id: cpu-cores
8989

9090
- name: Install dependencies
91-
run: ./.github/scripts/install_dependencies.sh
91+
run: ./install_apt_packages.sh
9292

9393
- uses: hendrikmuhs/ccache-action@v1.2
9494
with:
@@ -194,7 +194,7 @@ jobs:
194194
id: cpu-cores
195195

196196
- name: Install dependencies
197-
run: ./.github/scripts/install_dependencies.sh
197+
run: ./install_apt_packages.sh
198198

199199
- name: Download Build Artifact
200200
uses: actions/download-artifact@v4
@@ -237,7 +237,11 @@ jobs:
237237
id: cpu-cores
238238

239239
- name: 'Install dependencies'
240-
run: ./.github/scripts/install_dependencies.sh
240+
run: ./install_apt_packages.sh
241+
242+
- name: 'Install Python Requirements'
243+
run: |
244+
pip install -r requirements.txt
241245
242246
- name: 'ccache'
243247
uses: hendrikmuhs/ccache-action@v1.2
@@ -320,19 +324,23 @@ jobs:
320324
include: [
321325
{
322326
name: 'Basic',
323-
suite: 'vtr_reg_basic'
327+
suite: 'vtr_reg_basic',
328+
extra_pkgs: ''
324329
},
325330
{
326331
name: 'Strong',
327-
suite: 'vtr_reg_strong'
332+
suite: 'vtr_reg_strong',
333+
extra_pkgs: ''
328334
},
329335
{
330336
name: 'SystemVerilog',
331-
suite: 'vtr_reg_system_verilog'
337+
suite: 'vtr_reg_system_verilog',
338+
extra_pkgs: ''
332339
},
333340
{
334341
name: 'Valgrind Memory',
335-
suite: 'vtr_reg_valgrind_small'
342+
suite: 'vtr_reg_valgrind_small',
343+
extra_pkgs: 'valgrind'
336344
}
337345
]
338346
name: 'R: ${{ matrix.name }}'
@@ -351,7 +359,17 @@ jobs:
351359
id: cpu-cores
352360

353361
- name: Install dependencies
354-
run: ./.github/scripts/install_dependencies.sh
362+
run: ./install_apt_packages.sh
363+
364+
- name: Install Extra Dependencies
365+
if: ${{ matrix.extra_pkgs != '' }}
366+
run: |
367+
sudo apt update
368+
sudo apt install -y ${{ matrix.extra_pkgs }}
369+
370+
- name: Install Python Requirements
371+
run: |
372+
pip install -r requirements.txt
355373
356374
- name: Download Build Artifact
357375
uses: actions/download-artifact@v4
@@ -398,15 +416,18 @@ jobs:
398416
include: [
399417
{
400418
name: 'Basic_odin',
401-
suite: 'vtr_reg_basic_odin'
419+
suite: 'vtr_reg_basic_odin',
420+
extra_pkgs: ''
402421
},
403422
{
404423
name: 'Strong_odin',
405-
suite: 'vtr_reg_strong_odin'
424+
suite: 'vtr_reg_strong_odin',
425+
extra_pkgs: ''
406426
},
407427
{
408428
name: 'Valgrind Memory Odin',
409-
suite: 'vtr_reg_valgrind_small_odin'
429+
suite: 'vtr_reg_valgrind_small_odin',
430+
extra_pkgs: 'valgrind'
410431
}
411432
]
412433
name: 'R: ${{ matrix.name }}'
@@ -425,7 +446,17 @@ jobs:
425446
id: cpu-cores
426447

427448
- name: Install dependencies
428-
run: ./.github/scripts/install_dependencies.sh
449+
run: ./install_apt_packages.sh
450+
451+
- name: Install Extra Dependencies
452+
if: ${{ matrix.extra_pkgs != '' }}
453+
run: |
454+
sudo apt update
455+
sudo apt install -y ${{ matrix.extra_pkgs }}
456+
457+
- name: Install Python Requirements
458+
run: |
459+
pip install -r requirements.txt
429460
430461
- name: Download Build Artifact
431462
uses: actions/download-artifact@v4
@@ -493,7 +524,11 @@ jobs:
493524
id: cpu-cores
494525

495526
- name: Install dependencies
496-
run: ./.github/scripts/install_dependencies.sh
527+
run: ./install_apt_packages.sh
528+
529+
- name: Install Python Requirements
530+
run: |
531+
pip install -r requirements.txt
497532
498533
- uses: hendrikmuhs/ccache-action@v1.2
499534
with:
@@ -536,7 +571,11 @@ jobs:
536571
id: cpu-cores
537572

538573
- name: Install dependencies
539-
run: ./.github/scripts/install_dependencies.sh
574+
run: ./install_apt_packages.sh
575+
576+
- name: Install Python Requirements
577+
run: |
578+
pip install -r requirements.txt
540579
541580
- name: Download Build Artifact
542581
uses: actions/download-artifact@v4
@@ -571,7 +610,11 @@ jobs:
571610
id: cpu-cores
572611

573612
- name: Install dependencies
574-
run: ./.github/scripts/install_dependencies.sh
613+
run: ./install_apt_packages.sh
614+
615+
- name: Install Python Requirements
616+
run: |
617+
pip install -r requirements.txt
575618
576619
- name: Download Build Artifact
577620
uses: actions/download-artifact@v4
@@ -607,7 +650,7 @@ jobs:
607650
id: cpu-cores
608651

609652
- name: Install dependencies
610-
run: ./.github/scripts/install_dependencies.sh
653+
run: ./install_apt_packages.sh
611654

612655
- name: Download Build Artifact
613656
uses: actions/download-artifact@v4
@@ -652,7 +695,7 @@ jobs:
652695
id: cpu-cores
653696

654697
- name: Install dependencies
655-
run: ./.github/scripts/install_dependencies.sh
698+
run: ./install_apt_packages.sh
656699

657700
- uses: hendrikmuhs/ccache-action@v1.2
658701
with:
@@ -683,7 +726,7 @@ jobs:
683726
id: cpu-cores
684727

685728
- name: Install Dependencies
686-
run: ./.github/scripts/install_jammy_dependencies.sh
729+
run: ./install_apt_packages.sh
687730

688731
- uses: hendrikmuhs/ccache-action@v1.2
689732
with:

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ ENV PIP_BREAK_SYSTEM_PACKAGES=1
1111
# Install and cleanup is done in one command to minimize the build cache size
1212
RUN apt-get update -qq \
1313
# Extract package names from install_apt_packages.sh
14-
&& sed '/sudo/d' install_apt_packages.sh | sed '/#/d' | sed '/if\s.*then$/d' | sed '/else$/d' | sed '/fi$/d' | sed '/echo\s/d' | sed 's/ \\//g' | sed '/^$/d' | sed '/^[[:space:]]*$/d' | sed 's/\s//g' \
14+
&& sed '/sudo/d' install_apt_packages.sh | sed '/#/d' | sed '/packages_to_install/d' | sed '/)/d' | sed '/if\s.*then$/d' | sed '/else$/d' | sed '/fi$/d' | sed '/echo\s/d' | sed 's/ \\//g' | sed '/^$/d' | sed '/^[[:space:]]*$/d' | sed 's/\s//g' \
1515
# Install packages
1616
| xargs apt-get -y install --no-install-recommends \
1717
# Additional packages not listed in install_apt_packages.sh
1818
&& apt-get -y install --no-install-recommends \
1919
wget \
2020
ninja-build \
21-
libeigen3-dev \
2221
python3-pip \
2322
time \
2423
# Install python packages

0 commit comments

Comments
 (0)