Skip to content

Commit

Permalink
Merge pull request #287 from firesim/fix-ci
Browse files Browse the repository at this point in the history
Update docs for conda-lock, Solve all conda reqs at once (solves Python ABI issues).
  • Loading branch information
abejgonzalez authored Aug 6, 2023
2 parents 731550e + 388d7ab commit 8abff82
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 19 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ jobs:
- name: Setup conda (install all deps)
run: |
cd ${{ env.REMOTE_WORK_DIR }}
conda env create -f ./conda-reqs.yaml -p ./.conda-env
eval "$(conda shell.bash hook)"
conda install -y -p $PWD/.conda-env -c ucb-bar riscv-tools=1.0.4
conda-lock --conda $(which conda) -f ./conda-reqs.yaml -f ./riscv-tools.yaml -p linux-64
conda-lock install --conda $(which conda) -p $PWD/.conda-env
- name: Install Spike
run: |
cd ${{ env.REMOTE_WORK_DIR }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/weekly-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ jobs:
- name: Setup conda (install all deps)
run: |
cd ${{ env.REMOTE_WORK_DIR }}
conda env create -f ./conda-reqs.yaml -p ./.conda-env
eval "$(conda shell.bash hook)"
conda install -y -p $PWD/.conda-env -c ucb-bar riscv-tools=1.0.4
conda-lock --conda $(which conda) -f ./conda-reqs.yaml -f ./riscv-tools.yaml -p linux-64
conda-lock install --conda $(which conda) -p $PWD/.conda-env
- name: Initialize all submodules
run: |
cd ${{ env.REMOTE_WORK_DIR }}
Expand Down
19 changes: 8 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,29 @@ To run FireMarshal independently, follow along from the next section (Standalone

FireMarshal uses the [Conda](https://docs.conda.io/en/latest/) package manager to help manage system dependencies.
This allows users to create an "environment" that holds system dependencies like ``make``, ``git``, etc.
Please install Conda using the Chipyard documentation [here](https://chipyard.readthedocs.io/en/main/Chipyard-Basics/Initial-Repo-Setup.html#default-requirements-installation).
Additionally, FireMarshal uses [Conda Lock](https://conda.github.io/conda-lock/) to generate lock files for Conda environments.
Please install Conda and Conda Lock using the Chipyard documentation [here](https://chipyard.readthedocs.io/en/main/Chipyard-Basics/Initial-Repo-Setup.html#default-requirements-installation).

Next you can run the following command to create a FireMarshal environment called ``firemarshal``.
Next you can run the following commands to create a FireMarshal environment called ``firemarshal`` with a RISC-V compatible toolchain:

```bash
conda env create -f ./conda-reqs.yaml -n firemarshal
conda-lock --conda $(which conda) -f ./conda-reqs.yaml -f ./riscv-tools.yaml -p linux-64
conda-lock install --conda $(which conda) -n firemarshal
```

To enter this environment, you then run the ``activate`` command.
**Note that this command should be run whenever you want to use FireMarshal so that packages can be properly be added to your ``PATH``**.

```bash
conda activate firemarshal # or whatever name you gave during environment creation
```

In addition to standard packages added in the conda environment, you will need a RISC-V compatible toolchain and the RISC-V ISA simulator (Spike).
A RISC-V compatible toolchain can be obtained by the following:

```bash
conda install -n firemarshal -c ucb-bar riscv-tools
conda activate firemarshal # or whatever name/prefix you gave during environment creation
```

In addition to standard packages added in the conda environment, you will need the RISC-V ISA simulator (Spike).
To install Spike, please refer to https://github.com/riscv-software-src/riscv-isa-sim.

Finally, if you are running as a user on a machine without ``sudo`` access it is required for you to install ``guestmount`` for disk manipulation.
You can install this through your default package manager (for ex. ``apt`` or ``yum``).
You can also follow along with the ``guestmount`` [installation instructions found in the FireSim project](https://docs.fires.im/en/stable/Getting-Started-Guides/On-Premises-FPGA-Getting-Started/Initial-Setup/RHS-Research-Nitefury-II.html?highlight=guestmount#install-guestmount).

## Basic Usage

Expand Down
9 changes: 5 additions & 4 deletions conda-reqs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ platforms:

dependencies:
- qemu # from ucb-bar channel - https://github.com/ucb-bar/qemu-feedstock
- python>=3.9
- python>=3.8
- rsync
- psutil
- doit>=0.34
- doit>=0.34.0
- git
- gitpython
- humanfriendly
Expand All @@ -27,8 +27,8 @@ dependencies:
- sphinx
- sphinx_rtd_theme
- unzip
- gcc
- gxx
- gcc<13
- gxx<13
- conda-gcc-specs
- binutils
- sysroot_linux-64=2.17
Expand All @@ -47,3 +47,4 @@ dependencies:
- findutils
- lzop
- pygithub
- autoconf
11 changes: 11 additions & 0 deletions riscv-tools.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
channels:
- conda-forge
- ucb-bar
- nodefaults

# non-standard key used in conda-lock: https://github.com/conda-incubator/conda-lock#platform-specification
platforms:
- linux-64

dependencies:
- riscv-tools==1.0.4 # from ucb-bar channel - https://github.com/ucb-bar/riscv-tools-feedstock

0 comments on commit 8abff82

Please sign in to comment.