Skip to content

Commit

Permalink
download USC
Browse files Browse the repository at this point in the history
  • Loading branch information
war-in committed Jan 17, 2024
1 parent c29a4fb commit 9cd4893
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
10 changes: 10 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29963,6 +29963,15 @@ async function findStarknetFoundryDir(extractedPath) {
);
}

async function downloadUniversalSierraCompiler() {
const { exec } = __nccwpck_require__(2081);

const command =
"curl -L https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh | sh";

exec(command);
}

;// CONCATENATED MODULE: ./lib/main.js


Expand Down Expand Up @@ -29995,6 +30004,7 @@ async function main() {
triplet,
);
if (!StarknetFoundryPrefix) {
await downloadUniversalSierraCompiler();
const download = await downloadStarknetFoundry(
StarknetFoundryRepo,
StarknetFoundryVersion,
Expand Down
9 changes: 9 additions & 0 deletions lib/download.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,12 @@ async function findStarknetFoundryDir(extractedPath) {
`could not find Starknet Foundry directory in ${extractedPath}`,
);
}

export async function downloadUniversalSierraCompiler() {
const { exec } = require("child_process");

const command =
"curl -L https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh | sh";

exec(command);
}
6 changes: 5 additions & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ import {
getFullVersionFromStarknetFoundry,
versionWithPrefix,
} from "./versions";
import { downloadStarknetFoundry } from "./download";
import {
downloadStarknetFoundry,
downloadUniversalSierraCompiler,
} from "./download";
import { getOsTriplet } from "./platform";
import path from "path";
import * as core from "@actions/core";
Expand Down Expand Up @@ -33,6 +36,7 @@ export default async function main() {
triplet,
);
if (!StarknetFoundryPrefix) {
await downloadUniversalSierraCompiler();
const download = await downloadStarknetFoundry(
StarknetFoundryRepo,
StarknetFoundryVersion,
Expand Down

0 comments on commit 9cd4893

Please sign in to comment.