Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script #1

Merged
merged 66 commits into from
Feb 6, 2025
Merged
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
4480dca
wip
DelevoXDG Dec 11, 2024
5b513bc
Include uninstall docs for 'scarb' and 'starknet-foundry'
DelevoXDG Dec 11, 2024
ba89422
Improve plugin installation; Misc
DelevoXDG Dec 11, 2024
e4771ed
Add bold info messages on supported platforms
DelevoXDG Dec 11, 2024
abb7286
Replace bulk installation with individual version installation
DelevoXDG Dec 11, 2024
bd3bedd
Refactor global version setting
DelevoXDG Dec 11, 2024
eb3222a
Reinstall foundry to ensure latest version of USC is installed
DelevoXDG Dec 11, 2024
e2acb49
refactor
DelevoXDG Dec 11, 2024
8492df3
refactor
DelevoXDG Dec 11, 2024
7b97b9a
wip
DelevoXDG Dec 13, 2024
b8e5bbe
wip
DelevoXDG Dec 13, 2024
b97cd29
Add version and help args
DelevoXDG Dec 13, 2024
a095e67
wip
DelevoXDG Dec 13, 2024
92ce4a1
wip
DelevoXDG Dec 13, 2024
5c0d947
Fix `uninstall_latest_version`
DelevoXDG Dec 13, 2024
4cd9a6b
Add interactive installation for asdf-vm
DelevoXDG Dec 13, 2024
6434249
update description
DelevoXDG Dec 13, 2024
7932825
update shell-based installation instructions
DelevoXDG Dec 13, 2024
503ee7e
Drop support for all shels except bash, zshrc, ash
DelevoXDG Dec 13, 2024
12b03c5
Update asdf-vm installation instructions to use new documentation link
DelevoXDG Dec 13, 2024
bedaacf
wip
DelevoXDG Dec 16, 2024
6d12210
misc
DelevoXDG Dec 16, 2024
940a5cb
Add basic CI
DelevoXDG Dec 16, 2024
9230a1f
Update CI
DelevoXDG Dec 16, 2024
d35a563
Fix format checks
DelevoXDG Dec 16, 2024
491aded
improve ci
DelevoXDG Dec 16, 2024
426cf35
fix prints
DelevoXDG Dec 16, 2024
7e25f6b
misc
DelevoXDG Dec 16, 2024
1ed9000
misc
DelevoXDG Dec 16, 2024
4fb7c8c
Fetch and install latest version of asdf
DelevoXDG Dec 18, 2024
e395d8b
fix
DelevoXDG Dec 19, 2024
79123fe
Use 2 spaces instead of tabs
DelevoXDG Jan 13, 2025
f298591
Add shell source instruction on completion
DelevoXDG Jan 13, 2025
ddf7b65
Format
DelevoXDG Jan 14, 2025
fc13f93
Add .editorconfig with correct indent
DelevoXDG Jan 14, 2025
e65b87a
Improve handling of asdf version fetching
DelevoXDG Jan 14, 2025
41f16f7
update ci per review (remove pwsh use)
DelevoXDG Jan 21, 2025
af5daa8
fmt
DelevoXDG Jan 21, 2025
96a71a3
add sh support; drop ash
DelevoXDG Jan 21, 2025
238f412
Remove if around touch
DelevoXDG Jan 24, 2025
4cf66d3
update error msg
DelevoXDG Jan 24, 2025
2714c80
remove `set +e` around curl
DelevoXDG Jan 24, 2025
dacf543
add `--fail` to curl
DelevoXDG Jan 24, 2025
20ac8da
Revert "remove `set +e` around curl"
DelevoXDG Jan 24, 2025
50fb38a
update snfoundry uninstall instructions
DelevoXDG Jan 24, 2025
25e7407
misc: improve foundry uninst instructions
DelevoXDG Jan 24, 2025
5a550dd
misc: update error message for negative asdf install prompt answer
DelevoXDG Jan 24, 2025
57ddcf4
remove shellcheck
DelevoXDG Jan 24, 2025
7b411b3
drop `local` to make shellcheck happy (posix shell compat)
DelevoXDG Jan 24, 2025
09a73cd
simplify `install_asdf_interactively`
DelevoXDG Jan 24, 2025
71a1685
fmt
DelevoXDG Jan 24, 2025
aff9ee8
simplify fetching asdf version
DelevoXDG Jan 27, 2025
a0fa3e7
install_asdf_interactively: fix completion msg
DelevoXDG Jan 27, 2025
8412992
misc reorder cases
DelevoXDG Jan 27, 2025
d2434f4
install asdf silently
DelevoXDG Jan 27, 2025
5411f72
install USC manually
DelevoXDG Jan 27, 2025
9191854
fix `say` to support newlines
DelevoXDG Jan 28, 2025
eae4d48
fix plugin check
DelevoXDG Jan 28, 2025
96da134
centralize non-asdf install check; fix installation check
DelevoXDG Jan 28, 2025
55adea0
add `check_asdf_plugin_installed`
DelevoXDG Jan 28, 2025
4ad983f
update usc only if non-latest ver is installed
DelevoXDG Jan 28, 2025
a446699
enforce asdf prompt in non-interactive shells
DelevoXDG Feb 3, 2025
7976d20
always use asdf 0.15.0
DelevoXDG Feb 4, 2025
72b44d0
Use correct shell for usc install
DelevoXDG Feb 4, 2025
3a94220
fix `install_universal_sierra_compiler`
DelevoXDG Feb 4, 2025
662b9bc
add final usc check
DelevoXDG Feb 4, 2025
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
Prev Previous commit
Next Next commit
Update CI
DelevoXDG committed Dec 16, 2024
commit 9230a1ffb9c92c2a8917e143e4dd958b90b1c6a2
82 changes: 66 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -8,22 +8,72 @@ on:

jobs:
test:
name: test ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
- macos-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y curl git

- name: Setup asdf
uses: asdf-vm/actions/setup@v3.0.2

- name: Fetch latest Scarb version from GitHub releases
id: scarb_version
shell: pwsh
DelevoXDG marked this conversation as resolved.
Show resolved Hide resolved
run: |
$location = (Invoke-WebRequest -Uri "https://github.com/software-mansion/scarb/releases/latest" -Method Head -MaximumRedirection 0 -SkipHttpErrorCheck -ErrorAction Ignore).Headers.Location
$latest_version = ($location -replace '^.*/v','')
echo "Latest Scarb version found is $latest_version"
echo "LATEST_SCARB_VERSION=$latest_version" >> $env:GITHUB_OUTPUT

- name: Fetch latest Starknet Foundry version from GitHub releases
id: foundry_version
shell: pwsh
run: |
$location = (Invoke-WebRequest -Uri "https://github.com/foundry-rs/starknet-foundry/releases/latest" -Method Head -MaximumRedirection 0 -SkipHttpErrorCheck -ErrorAction Ignore).Headers.Location
$latest_version = ($location -replace '^.*/v','')
echo "Latest Starknet Foundry version found is $latest_version"
echo "LATEST_SNFOUNDRY_VERSION=$latest_version" >> $env:GITHUB_OUTPUT

- name: Fetch latest Universal Sierra Compiler version from GitHub releases
id: usc_version
shell: pwsh
run: |
$location = (Invoke-WebRequest -Uri "https://github.com/software-mansion/universal-sierra-compiler/releases/latest" -Method Head -MaximumRedirection 0 -SkipHttpErrorCheck -ErrorAction Ignore).Headers.Location
$latest_version = ($location -replace '^.*/v','')
echo "Latest Universal Sierra Compiler version found is $latest_version"
echo "LATEST_USC_VERSION=$latest_version" >> $env:GITHUB_OUTPUT

- name: Run starknetup
run: ./starknetup.sh

- name: Check Scarb latest
run: scarb --version | grep "scarb ${{ steps.scarb_version.outputs.LATEST_SCARB_VERSION }}"

- name: Check Starknet Foundry latest
run: snforge --version | grep "${{ steps.foundry_version.outputs.LATEST_SNFOUNDRY_VERSION }}"

- name: Check Universal Sierra Compiler latest
run: universal-sierra-compiler --version | grep "${{ steps.usc_version.outputs.LATEST_USC_VERSION }}"

shellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: shellcheck bin/* lib/*

shfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y curl git

- name: Setup asdf
uses: asdf-vm/actions/setup@v3.0.2

- name: Run starknetup
run: |
./starknetup.sh
scarb --version
snforge --version
universal-sierra-compiler --version
- uses: mfinelli/setup-shfmt@v3
- uses: actions/checkout@v4
- run: shfmt --diff .