Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ jobs:
with:
version: ${{matrix.solc}}

- name: Overwrite workspace
uses: actions/checkout@v5
# An old version of setup-solc downloaded the binaries to the runner
# workspace, which meant it had to be run _after_ actions/checkout to
# avoid being overwritten. This step acts as a regression test.

- name: Check version
run: solc --version | grep "${{matrix.solc}}"

Expand Down
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as fs from 'node:fs/promises';
import * as os from 'node:os';
import * as path from 'node:path';
import require$$0 from 'os';
import require$$0$1 from 'crypto';
Expand Down Expand Up @@ -29835,8 +29836,8 @@ try {
}
const constructURL = (fileName) => `https://binaries.soliditylang.org/${pathPrefix}/${fileName}`;
const list = (await fetch(constructURL('list.json')).then(res => res.json()));
const destDir = path.join(process.cwd(), 'setup-solc_downloads');
await fs.mkdir(destDir);
const destDir = path.join(process.env.RUNNER_TEMP ?? os.tmpdir(), 'setup-solc_downloads');
await fs.mkdir(destDir, { recursive: true });
coreExports.addPath(destDir);
for (const [version, outs] of parseVersionInputs().entries()) {
coreExports.info(`Setting up solc version ${version}`);
Expand All @@ -29850,7 +29851,6 @@ try {
console.info(`${version} at ${outs}`);
}
;
console.info(list);
}
catch (error) {
if (error instanceof Error) {
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import * as fs from 'node:fs/promises'
import * as fs from 'node:fs/promises';
import * as os from 'node:os';
import * as path from 'node:path';
import * as core from '@actions/core';
import * as tc from '@actions/tool-cache';
Expand Down Expand Up @@ -28,8 +29,8 @@ try {
}[];
};

const destDir = path.join(process.cwd(), 'setup-solc_downloads');
await fs.mkdir(destDir);
const destDir = path.join(process.env.RUNNER_TEMP ?? os.tmpdir(), 'setup-solc_downloads');
await fs.mkdir(destDir, { recursive: true });
core.addPath(destDir);

for (const [version, outs] of parseVersionInputs().entries()) {
Expand All @@ -52,8 +53,6 @@ try {
console.info(`${version} at ${outs}`);
};

console.info(list);

} catch (error: any) {
if (error instanceof Error) {
core.setFailed(error.message)
Expand Down
Loading