Skip to content

Commit 4ead1a1

Browse files
committed
made rust installation non-interactive and added . '/home/phw2/.cargo/env'
1 parent 4444bfe commit 4ead1a1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

.github/workflows/unittest_ci.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,24 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v2
1414

15-
# We could choose to set up dependencies manually in the GHA runner.
15+
# We could choose to set up dependencies manually in the GHA runner
16+
# instead of installing them during the GHA.
1617
#
1718
# However, I think it's better to do them in the GHA itself so that
1819
# we're testing our dependency installation step in addition to our
1920
# actual code.
21+
#
22+
# This also removes the need to manually reinstall dependencies on
23+
# the GHA runners every time we add a new dependency.
2024
- name: Set up Python
2125
uses: actions/setup-python@v4
2226
with:
2327
python-version: '3.10'
2428

2529
- name: Install dependencies
26-
run: ./dependency/install_dependencies.sh
30+
run: |
31+
./dependency/install_dependencies.sh
32+
. "$HOME/.cargo/env"
2733
2834
- name: Run unit tests
2935
run: python scripts/run_unittests.py

dependency/install_dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# You may want to create a conda environment before doing this
33
pip install -r dependency/requirements.txt
44
cat dependency/apt_requirements.txt | xargs sudo apt-get install -y
5-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
5+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

0 commit comments

Comments
 (0)