get-toolchain: use 'nightly' toolchain in CI

This commit is contained in:
umarcor 2020-10-12 17:07:26 +02:00
parent 21bcde2bd3
commit 5df387b987
2 changed files with 10 additions and 1 deletions

1
.github/tests.sh vendored
View File

@ -6,6 +6,7 @@ TOOLCHAIN_PATH="${TOOLCHAIN_PATH:-$PWD/$(find fomu-toolchain-* -type d -maxdepth
echo "TOOLCHAIN_PATH: $TOOLCHAIN_PATH" echo "TOOLCHAIN_PATH: $TOOLCHAIN_PATH"
export PATH=$TOOLCHAIN_PATH/bin:$PATH export PATH=$TOOLCHAIN_PATH/bin:$PATH
export GHDL_PREFIX=$TOOLCHAIN_PATH/lib/ghdl
echo '::group::VHDL Blink example' echo '::group::VHDL Blink example'
( (

View File

@ -80,7 +80,7 @@ def check_files(to_download):
return not error return not error
TOOLCHAIN = "https://api.github.com/repos/im-tomu/fomu-toolchain/releases/latest" TOOLCHAIN = "https://api.github.com/repos/im-tomu/fomu-toolchain/releases/%s" % ("tags/nightly" if os.environ.get('CI', False) else "latest")
def get_toolchain_data(): def get_toolchain_data():
@ -108,6 +108,14 @@ def main(argv):
plat = platform() plat = platform()
print("Platform:", plat) print("Platform:", plat)
if os.environ.get('CI', False):
platforms = {
"windows": "Windows",
"linux": "Linux",
"mac": "macOS"
}
plat = platforms[plat]
to_download = [] to_download = []
for asset in toolchain_data['assets']: for asset in toolchain_data['assets']: