Skip to content

Commit 76b10d9

Browse files
committed
ci: fixed shared chipyard dir
1 parent 23df3f9 commit 76b10d9

2 files changed

Lines changed: 8 additions & 17 deletions

File tree

.github/scripts/setup-chipyard.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ cd "${CHIPYARD_DIR}"
1111

1212
if [[ "${CACHE_HIT}" == "true" ]]; then
1313
echo "[CI] Cache hit! Skipping conda and toolchain steps"
14-
export RISCV="${CHIPYARD_CONDA_ENV_PATH}/riscv-tools"
14+
export RISCV="${CHIPYARD_DIR}/.conda-env/riscv-tools"
1515
[ -d "${RISCV}" ] || ( echo "error: ${RISCV} does not exist!" && exit 1 )
1616
source $(conda info --base)/etc/profile.d/conda.sh
17-
conda activate "${CHIPYARD_CONDA_ENV_PATH}"
18-
./build-setup.sh riscv-tools --conda-env-name "${CHIPYARD_CONDA_ENV_NAME}" \
17+
conda activate "${CHIPYARD_DIR}/.conda-env"
18+
./build-setup.sh riscv-tools \
1919
--skip-conda --skip-toolchain --skip-ctags --skip-precompile --skip-firesim --skip-marshal --skip-circt
2020
else
21-
./build-setup.sh riscv-tools --conda-env-name "${CHIPYARD_CONDA_ENV_NAME}" \
21+
./build-setup.sh riscv-tools \
2222
--skip-ctags --skip-precompile --skip-firesim --skip-marshal
2323
fi

.github/workflows/ci.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ defaults:
1212
env:
1313
CHIPYARD_RELPATH: chipyard-work
1414
# need to be persistent cross-action
15-
CHIPYARD_DIR: "/scratch/buildbot/radiance-ci-shared/chipyard-${{ github.run_id }}-${{ github.run_attempt }}"
15+
CHIPYARD_DIR: "/scratch/buildbot/radiance-ci-shared/chipyard"
1616
# flip to force-reset cache
1717
CACHE_NUMBER: 0
1818

@@ -41,8 +41,6 @@ jobs:
4141
git clone --depth 1 --branch graphics "https://github.com/ucb-bar/chipyard.git" "${CHIPYARD_DIR}"
4242
cd "${CHIPYARD_DIR}"
4343
echo "CHIPYARD_HASH=$(git rev-parse HEAD)" >> "${GITHUB_ENV}"
44-
# cross-workflow shared conda env
45-
echo "CHIPYARD_CONDA_ENV_NAME=chipyard-$(git rev-parse HEAD)" >> "${GITHUB_ENV}"
4644
# for caching
4745
ln -sf "${CHIPYARD_DIR}" "${GITHUB_WORKSPACE}/${CHIPYARD_RELPATH}"
4846
@@ -53,11 +51,6 @@ jobs:
5351
auto-activate-base: true
5452
activate-environment: ""
5553

56-
- name: Setup conda env path
57-
run: |
58-
set -x
59-
echo "CHIPYARD_CONDA_ENV_PATH=$(conda info --base)/envs/${CHIPYARD_CONDA_ENV_NAME} >> ${GITHUB_ENV}"
60-
6154
- name: Install cargo
6255
uses: dtolnay/rust-toolchain@stable
6356

@@ -77,14 +70,13 @@ jobs:
7770
uses: actions/cache@v5
7871
with:
7972
path: |
80-
${{ env.CHIPYARD_CONDA_ENV_PATH }}
73+
${{ env.CHIPYARD_DIR }}/.conda-env
8174
${{ env.CHIPYARD_RELPATH }}/env.sh
8275
key: chipyard-${{ env.CHIPYARD_HASH }}-${{ runner.os }}-${{ runner.arch }}-${{ env.CACHE_NUMBER }}
8376

8477
- name: Setup Chipyard
8578
run: |
86-
# .github/scripts/setup-chipyard.sh "${{ steps.cache-conda-env.outputs.cache-hit }}"
87-
.github/scripts/setup-chipyard.sh ""
79+
.github/scripts/setup-chipyard.sh "${{ steps.cache-conda-env.outputs.cache-hit }}"
8880
8981
- name: Setup Radiance
9082
# move radiance to under chipyard/generators
@@ -143,11 +135,10 @@ jobs:
143135
144136
clean:
145137
runs-on: as4
146-
needs: [run-soc-isa-tests, run-core-isa-tests, run-cosim-isa-tests]
138+
needs: [build, run-soc-isa-tests, run-core-isa-tests, run-cosim-isa-tests]
147139
if: always()
148140
steps:
149141
- name: Cleanup workspace, chipyard and conda
150142
run: |
151143
[ -d "${{ github.workspace }}" ] && rm -rf "${{ github.workspace }}"
152144
[ -d "${CHIPYARD_DIR}" ] && rm -rf "${CHIPYARD_DIR}"
153-
[ -d "${CHIPYARD_CONDA_ENV_PATH}" ] && rm -rf "${CHIPYARD_CONDA_ENV_PATH}"

0 commit comments

Comments
 (0)