diff options
author | eine <6628437+eine@users.noreply.github.com> | 2020-01-08 19:38:07 +0000 |
---|---|---|
committer | tgingold <tgingold@users.noreply.github.com> | 2020-01-08 20:38:07 +0100 |
commit | 91e5fab3e69fdcdbc04c3280c3ab9f3c8c8d5c51 (patch) | |
tree | 83e894c1e49fee3fa6df69a9031942156ae02522 /dist | |
parent | e754d848f8c8864b4ad5eee38ded84be8f3609bf (diff) | |
download | ghdl-91e5fab3e69fdcdbc04c3280c3ab9f3c8c8d5c51.tar.gz ghdl-91e5fab3e69fdcdbc04c3280c3ab9f3c8c8d5c51.tar.bz2 ghdl-91e5fab3e69fdcdbc04c3280c3ab9f3c8c8d5c51.zip |
ci: update installation of GNAT GPL on macOS (#1072)
* ci: move 'install-ada' to YAML files
* ci: update Xcode to 10
* ci: update GNAT to 2019
Diffstat (limited to 'dist')
-rwxr-xr-x | dist/ci-run.sh | 17 | ||||
-rwxr-xr-x | dist/macosx/install-ada.sh | 29 |
2 files changed, 23 insertions, 23 deletions
diff --git a/dist/ci-run.sh b/dist/ci-run.sh index d6061edb2..722b0d1c4 100755 --- a/dist/ci-run.sh +++ b/dist/ci-run.sh @@ -388,14 +388,6 @@ ci_run () { git fetch --unshallow || true gend - if [ "x$IS_MACOS" = "xtrue" ]; then - gstart "[CI] Install gnat compiler (use cache) and set CPATH" "$ANSI_BLUE" - ./dist/macosx/install-ada.sh || exit 1 - PATH=$PWD/gnat/bin:$PATH - export CPATH="$CPATH:`xcrun --show-sdk-path`/usr/include" - gend - fi - # Get build command options gstart "[CI] Get build command options" "$ANSI_BLUE" buildCmdOpts "$TASK" @@ -406,7 +398,10 @@ ci_run () { RUN="docker run --rm -t -e CI -e TRAVIS -v `pwd`:/work -w /work" if [ "x$IS_MACOS" = "xtrue" ]; then - CC=clang CONFIG_OPTS="--disable-libghdl" bash -c "${scriptdir}/ci-run.sh $BUILD_CMD_OPTS build" + export CPATH="$CPATH:`xcrun --show-sdk-path`/usr/include" + CC=clang \ + CONFIG_OPTS="--disable-libghdl" \ + bash -c "${scriptdir}/ci-run.sh $BUILD_CMD_OPTS build" else # Assume linux @@ -435,7 +430,9 @@ ci_run () { # Test if [ "x$IS_MACOS" = "xtrue" ]; then - CC=clang prefix="`cd ./install-mcode; pwd`" ./testsuite/testsuite.sh sanity gna vests + CC=clang \ + prefix="`cd ./install-mcode; pwd`" \ + ./testsuite/testsuite.sh sanity gna vests else # Build ghdl/ghdl:$GHDL_IMAGE_TAG image build_img_ghdl diff --git a/dist/macosx/install-ada.sh b/dist/macosx/install-ada.sh index bba0a0aab..760be908b 100755 --- a/dist/macosx/install-ada.sh +++ b/dist/macosx/install-ada.sh @@ -2,7 +2,7 @@ set -e -if [ -e gnat/etc/install_ok ]; then +if [ -e gnat/etc/install_ok ] && [ "x$(cat gnat/etc/install_ok)" = "x2019" ]; then echo "gnatgpl already installed" exit 0 fi @@ -10,16 +10,20 @@ fi echo "Download and install gnat-gpl" set -x -# Download from libre.adacore.com -tarfile=gnat-gpl-2017-x86_64-darwin-bin.tar.gz -wget -O $tarfile https://community.download.adacore.com/v1/7bbc77bd9c3c03fdb93699bce67b458f95d049a9?filename=gnat-gpl-2017-x86_64-darwin-bin.tar.gz +# Remove old gnat directory +if [ -d gnat ]; then + rm -rf gnat +fi -# untar -tar xf $tarfile +# Download from community.adacore.com and extract +wget -O dmgfile https://community.download.adacore.com/v1/5a7801fc686e86de838cfaf7071170152d81254d?filename=gnat-community-2019-20190517-x86_64-darwin-bin.dmg +7z x dmgfile +installer="gnat-community-2019-20190517-x86_64-darwin-bin/gnat-community-2019-20190517-x86_64-darwin-bin.app/Contents/MacOS/gnat-community-2019-20190517-x86_64-darwin-bin" -# Remove old gnat directory and install manually -rm -rf gnat -mv gnat-gpl-2017-x86_64-darwin-bin gnat +# Install +mkdir -p gnat +chmod +x $installer +./$installer PREFIX=gnat # Cleanup: remove components not needed rm -rf gnat/share/{themes,icons} \ @@ -40,9 +44,8 @@ rm -rf gnat/share/{themes,icons} \ gnat/lib/gcc/x86*/*/rts-native/adalib/*.dylib \ gnat/lib/gcc/x86*/*/rts-native/adalib/lib*_pic.a \ gnat/libexec/gprbuild \ - gnat/libexec/gcc/x86*/*/{plugin,install-tools} - -rm -f gnat/bin/aws* gnat/bin/gps* gnat/bin/gcov* \ + gnat/libexec/gcc/x86*/*/{plugin,install-tools} \ + gnat/bin/aws* gnat/bin/gps* gnat/bin/gcov* \ gnat/bin/gnat2* gnat/bin/xml2* gnat/bin/gnatcoll* \ gnat/bin/gnat{doc,metric,pp,stub,prep,test,check,elim,inspect,find,kr} \ gnat/bin/gnat{xref,name} \ @@ -54,4 +57,4 @@ rm -f gnat/bin/aws* gnat/bin/gps* gnat/bin/gcov* \ gnat/lib/libxmlada* \ gnat/libexec/gcc/x86*/*/{cc1obj,cc1plus,lto1} -touch gnat/etc/install_ok +echo "2019" > gnat/etc/install_ok |