From c2a1095cc012d64e50fd064ae429cbca60502e5f Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Tue, 21 Feb 2023 11:34:27 -0800 Subject: [PATCH] Fix socket name length issues on CI --- .github/scripts/defaults.sh | 5 +++++ .github/workflows/chipyard-full-flow.yml | 1 + variables.mk | 3 ++- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 6ca434fb30..57fdfaa808 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -23,6 +23,11 @@ LOCAL_CHIPYARD_DIR=$GITHUB_WORKSPACE LOCAL_SIM_DIR=$LOCAL_CHIPYARD_DIR/sims/verilator LOCAL_FIRESIM_DIR=$LOCAL_CHIPYARD_DIR/sims/firesim/sim +# CI uses temp directories with very long names +# explicitly force socket creation to use /tmp to avoid name length errors +# https://github.com/sbt/sbt/pull/6887 +JAVA_TMP_DIR=$(mktemp -d -t ci-cy-XXXXXXXX) + # key value store to get the build groups declare -A grouping grouping["group-cores"]="chipyard-cva6 chipyard-ibex chipyard-rocket chipyard-hetero chipyard-boom chipyard-sodor chipyard-digitaltop chipyard-multiclock-rocket chipyard-nomem-scratchpad chipyard-spike chipyard-clone" diff --git a/.github/workflows/chipyard-full-flow.yml b/.github/workflows/chipyard-full-flow.yml index cc2168e847..22382571d3 100644 --- a/.github/workflows/chipyard-full-flow.yml +++ b/.github/workflows/chipyard-full-flow.yml @@ -13,6 +13,7 @@ defaults: env: REMOTE_WORK_DIR: ${{ secrets.BUILDDIR }}/cy-ci-shared/cy-${{ github.sha }} + JAVA_TMP_DIR: /tmp/cy-${{ github.sha }}-full jobs: cancel-prior-workflows: diff --git a/variables.mk b/variables.mk index f10cbfa95a..1312cbe387 100644 --- a/variables.mk +++ b/variables.mk @@ -202,7 +202,8 @@ sim_common_files ?= $(build_dir)/sim_files.common.f # java arguments used in sbt ######################################################################################### JAVA_HEAP_SIZE ?= 8G -export JAVA_TOOL_OPTIONS ?= -Xmx$(JAVA_HEAP_SIZE) -Xss8M -Djava.io.tmpdir=$(base_dir)/.java_tmp +JAVA_TMP_DIR ?= $(base_dir)/.java_tmp +export JAVA_TOOL_OPTIONS ?= -Xmx$(JAVA_HEAP_SIZE) -Xss8M -Djava.io.tmpdir=$(JAVA_TMP_DIR) ######################################################################################### # default sbt launch command