Skip to content

Commit 4e4e0c8

Browse files
author
Amitayush Thakur
committed
Fixed install and action script.
1 parent 4abbddd commit 4e4e0c8

File tree

2 files changed

+15
-26
lines changed

2 files changed

+15
-26
lines changed

.github/workflows/github-build-actions.yaml

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,18 @@ jobs:
4141
- name: Install package
4242
run: pip install dist/*.whl --break-system-packages
4343

44+
- name: Install Lean (elan) and prepare Lean REPL
45+
shell: bash
46+
run: |
47+
install-lean-repl
48+
source $HOME/.elan/env
49+
50+
- name: Build Lean REPL for itp-interface
51+
shell: bash
52+
run: |
53+
source $HOME/.elan/env
54+
install-itp-interface
55+
4456
- name: Check and Init opam version
4557
run: |
4658
opam --version
@@ -54,30 +66,6 @@ jobs:
5466
opam repo add coq-released https://coq.inria.fr/opam/released
5567
opam pin add -y coq-lsp 0.1.8+8.18
5668
57-
# - name: Install Lean (elan)
58-
# shell: bash
59-
# run: |
60-
# curl https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh -sSf | sh -s -- -y
61-
# source $HOME/.elan/env
62-
63-
- name: Install Lean (elan) and prepare Lean REPL
64-
shell: bash
65-
run: |
66-
install-lean-repl
67-
source $HOME/.elan/env
68-
69-
# - name: Prepare Lean REPL
70-
# shell: bash
71-
# run: |
72-
# source $HOME/.elan/env
73-
# install-lean-repl
74-
75-
- name: Build Lean REPL for itp-interface
76-
shell: bash
77-
run: |
78-
source $HOME/.elan/env
79-
install-itp-interface
80-
8169
- name: List repository files (debug step)
8270
run: find . -type f
8371

src/itp_interface/main/install.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def install_lean_repl():
6969
else:
7070
print("Installing .elan")
7171
elan_url = "https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh"
72-
os.system(f"curl -sSL {elan_url} | sh")
72+
os.system(f"curl -sSL {elan_url} -sSf | sh -s -- -y")
7373
print("[OK] .elan installed")
7474
lean_repo = "leanprover/lean4"
7575
# Create a temporary script to run
@@ -95,7 +95,8 @@ def install_lean_repl():
9595
print("Removing the script")
9696
os.system(f"rm {random_sh_path}")
9797
os.system(f"rmdir /tmp/{random_path}")
98-
assert os.system("source $HOME/.elan/env && export PATH=$PATH:$HOME/.elan/bin && lean --version") == 0, "Lean 4 is not installed aborting"
98+
os.system("ls -l $HOME/.elan/bin")
99+
assert os.system("export PATH=$PATH:$HOME/.elan/bin && lean --version") == 0, "Lean 4 is not installed aborting"
99100
print("[OK] Lean 4 installed successfully")
100101
print("NOTE: Please run `install-itp-interface` to finish the installation")
101102

0 commit comments

Comments
 (0)