Skip to content

Commit

Permalink
made rust installation non-interactive and added . '/home/phw2/.cargo…
Browse files Browse the repository at this point in the history
…/env'
  • Loading branch information
wangpatrick57 committed Jul 8, 2024
1 parent 4444bfe commit 4ead1a1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/unittest_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,24 @@ jobs:
steps:
- uses: actions/checkout@v2

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

- name: Install dependencies
run: ./dependency/install_dependencies.sh
run: |
./dependency/install_dependencies.sh
. "$HOME/.cargo/env"
- name: Run unit tests
run: python scripts/run_unittests.py
2 changes: 1 addition & 1 deletion dependency/install_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# You may want to create a conda environment before doing this
pip install -r dependency/requirements.txt
cat dependency/apt_requirements.txt | xargs sudo apt-get install -y
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y

0 comments on commit 4ead1a1

Please sign in to comment.