Skip to content

Commit

Permalink
Support windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ksew1 committed Feb 3, 2025
1 parent 106e83f commit a8c4e09
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check-dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
fi
# If dist/ was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
Expand Down
11 changes: 9 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ outputs:
description: The prefix of installed Starknet Foundry
starknet-foundry-version:
description: The version of installed Starknet Foundry

runs:
using: node20
main: "dist/index.js"
using: "composite"
steps:
- name: Set up Universal Sierra Compiler
uses: software-mansion/setup-universal-sierra-compiler@v1

- name: "Run script"
run: node dist/index.js
shell: bash
16 changes: 0 additions & 16 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -29998,21 +29998,6 @@ async function findStarknetFoundryDir(extractedPath) {
);
}

async function downloadUniversalSierraCompiler() {
const scriptUrl =
"https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh";

try {
const scriptPath = await tool_cache.downloadTool(scriptUrl);

await exec.exec(`chmod +x ${scriptPath}`);

await exec.exec(scriptPath);
} catch (error) {
core.setFailed(error.message);
}
}

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


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

export async function downloadUniversalSierraCompiler() {
const scriptUrl =
"https://raw.githubusercontent.com/software-mansion/universal-sierra-compiler/master/scripts/install.sh";

try {
const scriptPath = await tc.downloadTool(scriptUrl);

await exec.exec(`chmod +x ${scriptPath}`);

await exec.exec(scriptPath);
} catch (error) {
core.setFailed(error.message);
}
}
1 change: 0 additions & 1 deletion lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export default async function main() {
triplet,
);
if (!StarknetFoundryPrefix) {
await downloadUniversalSierraCompiler();
const download = await downloadStarknetFoundry(
StarknetFoundryRepo,
StarknetFoundryVersion,
Expand Down

0 comments on commit a8c4e09

Please sign in to comment.