Skip to content

Commit b31ce90

Browse files
GH Runner: Put solc and resolc in tmp directory instead of work dir (#1049)
While working on #1047 I noticed that the `/cmd bench` command commits `solc` and `resolc` binaries. This is unwanted. I propose to not put the binaries into the main repo directory, but use the `RUNNER_TEMP` directory. Then we have a general solution and don't need to mess with manual exclusion of whatever tooling we want in the future in the git workflow. Example commit created by bot which shows the issue: 1854d62 Example commit which shows that fix works (no binaries present): a4e34df - [x] Does not require a CHANGELOG entry Co-authored-by: fellowship-merge-bot[bot] <151052383+fellowship-merge-bot[bot]@users.noreply.github.com>
1 parent 1f498c3 commit b31ce90

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

.github/install-deps.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ sudo rm -rf "$AGENT_TOOLSDIRECTORY"
1717
df -h
1818

1919
# Install solc
20-
mkdir -p solc
21-
if [[ -x solc/solc ]]; then
20+
mkdir -p "$RUNNER_TEMP/solc"
21+
if [[ -x "$RUNNER_TEMP/solc/solc" ]]; then
2222
echo "solc already present, skipping download"
2323
else
2424
curl -Lsf --show-error --retry 5 --retry-all-errors --connect-timeout 10 --max-time 300 \
25-
--output solc/solc \
25+
--output "$RUNNER_TEMP/solc/solc" \
2626
"https://github.com/ethereum/solidity/releases/download/v${SOLC_VERSION}/${SOLC_NAME}"
27-
chmod +x solc/solc
27+
chmod +x "$RUNNER_TEMP/solc/solc"
2828
fi
2929

3030
# Install resolc
31-
mkdir -p resolc
32-
if [[ -x resolc/resolc ]]; then
31+
mkdir -p "$RUNNER_TEMP/resolc"
32+
if [[ -x "$RUNNER_TEMP/resolc/resolc" ]]; then
3333
echo "resolc already present, skipping download"
3434
else
3535
curl -Lsf --show-error --retry 5 --retry-all-errors --connect-timeout 10 --max-time 300 \
36-
--output resolc/resolc \
36+
--output "$RUNNER_TEMP/resolc/resolc" \
3737
"https://github.com/paritytech/revive/releases/download/v${RESOLC_VERSION}/resolc-x86_64-unknown-linux-musl"
38-
chmod +x resolc/resolc
39-
./resolc/resolc --version
38+
chmod +x "$RUNNER_TEMP/resolc/resolc"
39+
"$RUNNER_TEMP/resolc/resolc" --version
4040
fi
4141

42-
echo "$PWD/solc" >> "$GITHUB_PATH"
43-
echo "$PWD/resolc" >> "$GITHUB_PATH"
42+
echo "$RUNNER_TEMP/solc" >> "$GITHUB_PATH"
43+
echo "$RUNNER_TEMP/resolc" >> "$GITHUB_PATH"
4444

0 commit comments

Comments
 (0)