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

make install review: requires root access & assumes running in Github Actions #299

Open
mratsim opened this issue Jun 26, 2024 · 0 comments

Comments

@mratsim
Copy link
Contributor

mratsim commented Jun 26, 2024

Linked to #298

Root access

Currently for make install, we require write access to /opt which is root-only

raiko/makefile

Lines 2 to 3 in 546ab19

install:
./script/install.sh $(TARGET)

raiko/script/install.sh

Lines 23 to 24 in 546ab19

# Extract the downloaded archive
tar -xzf /tmp/riscv32-unknown-elf.gcc-13.2.0.tar.gz -C /opt/riscv/

Instead we should:

Assumes running in Github Action

The SP1 part is assuming /home/runner and $GITHUB_PATH which are Github Action specific.

raiko/script/install.sh

Lines 50 to 64 in 546ab19

# SP1
if [ -z "$1" ] || [ "$1" == "sp1" ]; then
curl -L https://sp1.succinct.xyz | bash
if [ -z "${CI}" ] || [ ! command -v sp1up &> /dev/null ]; then
# Need to add sp1up to the path here
PROFILE=$HOME/.bashrc
echo ${PROFILE}
source ${PROFILE}
sp1up
else
echo "/home/runner/.config/.sp1/bin" >> $GITHUB_PATH
/home/runner/.config/.sp1/bin/sp1up
fi
fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant