Merge pull request #1675 from ucb-bar/install-circt-out-of-conda
Install CIRCT out of Conda
This commit is contained in:
15
.github/actions/create-conda-env/action.yml
vendored
15
.github/actions/create-conda-env/action.yml
vendored
@@ -14,12 +14,25 @@ runs:
|
|||||||
conda-lock install --conda $(which conda) -n ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-esp-tools ./conda-reqs/conda-lock-reqs/conda-requirements-esp-tools-linux-64.conda-lock.yml
|
conda-lock install --conda $(which conda) -n ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-esp-tools ./conda-reqs/conda-lock-reqs/conda-requirements-esp-tools-linux-64.conda-lock.yml
|
||||||
conda deactivate
|
conda deactivate
|
||||||
|
|
||||||
echo "Add extra toolchain collateral to RISC-V install area"
|
echo "Add extra toolchain collateral + CIRCT to RISC-V install area"
|
||||||
|
git submodule update --init ./tools/install-circt
|
||||||
conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-riscv-tools
|
conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-riscv-tools
|
||||||
./scripts/build-toolchain-extra.sh riscv-tools -p $CONDA_PREFIX/riscv-tools
|
./scripts/build-toolchain-extra.sh riscv-tools -p $CONDA_PREFIX/riscv-tools
|
||||||
|
./tools/install-circt/bin/download-release-or-nightly-circt.sh \
|
||||||
|
-f circt-full-shared-linux-x64.tar.gz \
|
||||||
|
-i $CONDA_PREFIX \
|
||||||
|
-v version-file \
|
||||||
|
-x ./conda-reqs/circt.json \
|
||||||
|
-g ${{ github.token }}
|
||||||
conda deactivate
|
conda deactivate
|
||||||
conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-esp-tools
|
conda activate ${{ env.conda-env-name-no-time }}-$(date --date "${{ env.workflow-timestamp }}" +%Y%m%d)-esp-tools
|
||||||
./scripts/build-toolchain-extra.sh esp-tools -p $CONDA_PREFIX/esp-tools
|
./scripts/build-toolchain-extra.sh esp-tools -p $CONDA_PREFIX/esp-tools
|
||||||
|
./tools/install-circt/bin/download-release-or-nightly-circt.sh \
|
||||||
|
-f circt-full-shared-linux-x64.tar.gz \
|
||||||
|
-i $CONDA_PREFIX \
|
||||||
|
-v version-file \
|
||||||
|
-x ./conda-reqs/circt.json \
|
||||||
|
-g ${{ github.token }}
|
||||||
conda deactivate
|
conda deactivate
|
||||||
fi
|
fi
|
||||||
shell: bash -leo pipefail {0}
|
shell: bash -leo pipefail {0}
|
||||||
|
|||||||
25
.github/workflows/update-circt.yml
vendored
Normal file
25
.github/workflows/update-circt.yml
vendored
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
name: update-circt
|
||||||
|
|
||||||
|
# run daily
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: 0,15,30,45 * * * *
|
||||||
|
#- cron: 0 8 * * *
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash -leo pipefail {0}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-circt:
|
||||||
|
name: update-circt
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Update CIRCT
|
||||||
|
uses: circt/update-circt@v1.0.0
|
||||||
|
with:
|
||||||
|
user: 'bartender'
|
||||||
|
email: 'firesimchipyard@gmail.com'
|
||||||
|
pr-reviewers: ''
|
||||||
|
pr-labels: 'changelog:changed'
|
||||||
|
circt-config: './conda-reqs/circt.json'
|
||||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -139,3 +139,6 @@
|
|||||||
[submodule "generators/rocc-acc-utils"]
|
[submodule "generators/rocc-acc-utils"]
|
||||||
path = generators/rocc-acc-utils
|
path = generators/rocc-acc-utils
|
||||||
url = https://github.com/ucb-bar/rocc-acc-utils
|
url = https://github.com/ucb-bar/rocc-acc-utils
|
||||||
|
[submodule "tools/install-circt"]
|
||||||
|
path = tools/install-circt
|
||||||
|
url = https://github.com/circt/install-circt/
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ dependencies:
|
|||||||
- conda-gcc-specs
|
- conda-gcc-specs
|
||||||
- binutils
|
- binutils
|
||||||
|
|
||||||
- firtool==1.58.0 # from ucb-bar channel - https://github.com/ucb-bar/firtool-feedstock
|
# firtool handled outside of conda
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
- autoconf
|
- autoconf
|
||||||
|
|||||||
3
conda-reqs/circt.json
Normal file
3
conda-reqs/circt.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"version": "firtool-1.58.0"
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -148,10 +148,40 @@ if run_step "1"; then
|
|||||||
|
|
||||||
# use conda-lock to create env
|
# use conda-lock to create env
|
||||||
conda-lock install --conda $(which conda) -p $CYDIR/.conda-env $LOCKFILE &&
|
conda-lock install --conda $(which conda) -p $CYDIR/.conda-env $LOCKFILE &&
|
||||||
|
|
||||||
source $CYDIR/.conda-env/etc/profile.d/conda.sh &&
|
source $CYDIR/.conda-env/etc/profile.d/conda.sh &&
|
||||||
conda activate $CYDIR/.conda-env
|
conda activate $CYDIR/.conda-env
|
||||||
exit_if_last_command_failed
|
exit_if_last_command_failed
|
||||||
|
|
||||||
|
# install circt into conda
|
||||||
|
git submodule update --init $CYDIR/tools/install-circt &&
|
||||||
|
$CYDIR/tools/install-circt/bin/download-release-or-nightly-circt.sh \
|
||||||
|
-f circt-full-shared-linux-x64.tar.gz \
|
||||||
|
-i $CONDA_PREFIX \
|
||||||
|
-v version-file \
|
||||||
|
-x $CYDIR/conda-reqs/circt.json \
|
||||||
|
-g null
|
||||||
|
exit_if_last_command_failed
|
||||||
|
|
||||||
|
# Conda Setup
|
||||||
|
# Provide a sourceable snippet that can be used in subshells that may not have
|
||||||
|
# inhereted conda functions that would be brought in under a login shell that
|
||||||
|
# has run conda init (e.g., VSCode, CI)
|
||||||
|
read -r -d '\0' CONDA_ACTIVATE_PREAMBLE <<'END_CONDA_ACTIVATE'
|
||||||
|
if ! type conda >& /dev/null; then
|
||||||
|
echo "::ERROR:: you must have conda in your environment first"
|
||||||
|
return 1 # don't want to exit here because this file is sourced
|
||||||
|
fi
|
||||||
|
|
||||||
|
# if we're sourcing this in a sub process that has conda in the PATH but not as a function, init it again
|
||||||
|
conda activate --help >& /dev/null || source $(conda info --base)/etc/profile.d/conda.sh
|
||||||
|
\0
|
||||||
|
END_CONDA_ACTIVATE
|
||||||
|
|
||||||
|
replace_content env.sh build-setup-conda "# line auto-generated by $0
|
||||||
|
$CONDA_ACTIVATE_PREAMBLE
|
||||||
|
conda activate $CYDIR/.conda-env
|
||||||
|
source $CYDIR/scripts/fix-open-files.sh"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$FORCE_FLAG" ]; then
|
if [ -z "$FORCE_FLAG" ]; then
|
||||||
@@ -250,26 +280,6 @@ if run_step "10"; then
|
|||||||
exit_if_last_command_failed
|
exit_if_last_command_failed
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Conda Setup
|
|
||||||
# Provide a sourceable snippet that can be used in subshells that may not have
|
|
||||||
# inhereted conda functions that would be brought in under a login shell that
|
|
||||||
# has run conda init (e.g., VSCode, CI)
|
|
||||||
read -r -d '\0' CONDA_ACTIVATE_PREAMBLE <<'END_CONDA_ACTIVATE'
|
|
||||||
if ! type conda >& /dev/null; then
|
|
||||||
echo "::ERROR:: you must have conda in your environment first"
|
|
||||||
return 1 # don't want to exit here because this file is sourced
|
|
||||||
fi
|
|
||||||
|
|
||||||
# if we're sourcing this in a sub process that has conda in the PATH but not as a function, init it again
|
|
||||||
conda activate --help >& /dev/null || source $(conda info --base)/etc/profile.d/conda.sh
|
|
||||||
\0
|
|
||||||
END_CONDA_ACTIVATE
|
|
||||||
|
|
||||||
replace_content env.sh build-setup "# line auto-generated by $0
|
|
||||||
$CONDA_ACTIVATE_PREAMBLE
|
|
||||||
conda activate $CYDIR/.conda-env
|
|
||||||
source $CYDIR/scripts/fix-open-files.sh"
|
|
||||||
|
|
||||||
echo "Setup complete!"
|
echo "Setup complete!"
|
||||||
|
|
||||||
} 2>&1 | tee build-setup.log
|
} 2>&1 | tee build-setup.log
|
||||||
|
|||||||
1
tools/install-circt
Submodule
1
tools/install-circt
Submodule
Submodule tools/install-circt added at 3f8dda6e1c
Reference in New Issue
Block a user