Skip to content

Commit

Permalink
Merge pull request #26 from johnnychen94/jc/kr_official
Browse files Browse the repository at this point in the history
add more servers for upstream Official

and also print more logs in CI environment
  • Loading branch information
johnnychen94 authored Feb 20, 2020
2 parents 1b11def + 9272e31 commit 0a47b81
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/pythonapp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install coverage
python -m pip install --upgrade pip --quiet
pip install -r requirements.txt --quiet
pip install coverage --quiet
- name: Test jill download and install
run: |
Expand Down Expand Up @@ -75,12 +75,13 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install coverage
python -m pip install --upgrade pip --quiet
pip install -r requirements.txt --quiet
pip install coverage --quiet
- name: test install
run: |
python -m jill upstream
python -m jill install --confirm --upstream Official
& julia -e 'using InteractiveUtils; versioninfo()'
& julia --project=. -e 'using Pkg; Pkg.add(\"ImageCore\")'
Expand Down Expand Up @@ -116,8 +117,9 @@ jobs:
run: |
apt-get update -qq
apt-get install -y -qq -o=Dpkg::Use-Pty=0 python3-pip python3-wheel python3-setuptools gnupg wget --no-install-recommends
pip3 install --upgrade pip
pip3 install -r requirements.txt
pip3 install --upgrade pip --quiet
pip3 install -r requirements.txt --quiet
python -m jill upstream
python3 -m jill install --confirm --upstream Official
julia -e 'using InteractiveUtils; versioninfo()'
python3 -m jill install 1.0 --confirm --upstream Official
Expand Down
10 changes: 8 additions & 2 deletions jill/config/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,16 @@
"Official": {
"name": "Julialang.org",
"urls": [
"https://julialang-s3.julialang.org/bin/$sys/$arch/$minor_version/$filename"
"https://julialang-s3.julialang.org/bin/$sys/$arch/$minor_version/$filename",
"https://mirror.kr.pkg.julialang.org/julialang2/bin/$sys/$arch/$minor_version/$filename",
"https://mirror.eu.pkg.julialang.org/julialang2/bin/$sys/$arch/$minor_version/$filename",
"https://mirror.us-east.pkg.julialang.org/julialang2/bin/$sys/$arch/$minor_version/$filename"
],
"latest_urls": [
"https://julialangnightlies-s3.julialang.org/bin/$sys/$arch/$latest_filename"
"https://julialangnightlies-s3.julialang.org/bin/$sys/$arch/$latest_filename",
"https://mirror.kr.pkg.julialang.org/julialangnightlies/bin/$sys/$arch/$latest_filename",
"https://mirror.eu.pkg.julialang.org/julialangnightlies/bin/$sys/$arch/$latest_filename",
"https://mirror.us-east.pkg.julialang.org/julialangnightlies/bin/$sys/$arch/$latest_filename"
]
},
"USTC": {
Expand Down
3 changes: 3 additions & 0 deletions jill/utils/source_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from .net_utils import query_ip
from .net_utils import port_response_time
from .net_utils import is_url_available
from .sys_utils import show_verbose
from .filters import generate_info
from .interactive_utils import color

Expand Down Expand Up @@ -198,6 +199,8 @@ def query_download_url(self,

url_list = chain.from_iterable(repeat(url_list, max_try))
for url in url_list:
if show_verbose():
print(f"query {url}")
if is_url_available(url, timeout):
return url
return None
Expand Down
8 changes: 8 additions & 0 deletions jill/utils/sys_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
in the `filters` module
"""
import platform
import os


def current_system():
Expand Down Expand Up @@ -31,3 +32,10 @@ def current_architecture():
return "x86_64"
else:
return arch


def show_verbose():
if "GITHUB_ACTIONS" in os.environ:
return True

return os.environ.get("DEBUG", False)

0 comments on commit 0a47b81

Please sign in to comment.