From 5df387b987583be86cb98c688066b217dcead036 Mon Sep 17 00:00:00 2001 From: umarcor Date: Mon, 12 Oct 2020 17:07:26 +0200 Subject: [PATCH] get-toolchain: use 'nightly' toolchain in CI --- .github/tests.sh | 1 + get-toolchain.py | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/tests.sh b/.github/tests.sh index 66a85a2e..d8ca5b8a 100755 --- a/.github/tests.sh +++ b/.github/tests.sh @@ -6,6 +6,7 @@ TOOLCHAIN_PATH="${TOOLCHAIN_PATH:-$PWD/$(find fomu-toolchain-* -type d -maxdepth echo "TOOLCHAIN_PATH: $TOOLCHAIN_PATH" export PATH=$TOOLCHAIN_PATH/bin:$PATH +export GHDL_PREFIX=$TOOLCHAIN_PATH/lib/ghdl echo '::group::VHDL Blink example' ( diff --git a/get-toolchain.py b/get-toolchain.py index b8c98f5a..c3f8b618 100755 --- a/get-toolchain.py +++ b/get-toolchain.py @@ -80,7 +80,7 @@ def check_files(to_download): 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(): @@ -108,6 +108,14 @@ def main(argv): plat = platform() print("Platform:", plat) + if os.environ.get('CI', False): + platforms = { + "windows": "Windows", + "linux": "Linux", + "mac": "macOS" + } + plat = platforms[plat] + to_download = [] for asset in toolchain_data['assets']: