aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreine <6628437+eine@users.noreply.github.com>2020-01-08 19:38:07 +0000
committertgingold <tgingold@users.noreply.github.com>2020-01-08 20:38:07 +0100
commit91e5fab3e69fdcdbc04c3280c3ab9f3c8c8d5c51 (patch)
tree83e894c1e49fee3fa6df69a9031942156ae02522
parente754d848f8c8864b4ad5eee38ded84be8f3609bf (diff)
downloadghdl-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
-rw-r--r--.github/workflows/push.yml8
-rw-r--r--.travis.yml14
-rwxr-xr-xdist/ci-run.sh17
-rwxr-xr-xdist/macosx/install-ada.sh29
4 files changed, 40 insertions, 28 deletions
diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml
index 3543c33ca..37eea6b76 100644
--- a/.github/workflows/push.yml
+++ b/.github/workflows/push.yml
@@ -30,7 +30,13 @@ jobs:
runs-on: macOS-latest
steps:
- uses: actions/checkout@v1
- - run: ./dist/ci-run.sh -c
+ - run: |
+ brew update
+ brew install p7zip
+ ./dist/macosx/install-ada.sh
+ - run: |
+ PATH=$PWD/gnat/bin:$PATH
+ ./dist/ci-run.sh -c
env:
TASK: macosx+mcode
GITHUB_OS: ${{ runner.os }}
diff --git a/.travis.yml b/.travis.yml
index a6c3bf3fb..67be8d1cc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -39,15 +39,21 @@ jobs:
- &osx
os: osx
language: c
- osx_image: xcode9.4
- install: true
+ osx_image: xcode10
+ env: TASK=macosx+mcode
cache:
directories:
- gnat
- env: TASK=macosx+mcode
+ install: ./dist/macosx/install-ada.sh
+ before_script: PATH=$PWD/gnat/bin:$PATH
+ addons:
+ homebrew:
+ packages:
+ - p7zip
+ update: true
# Optionally, more macos jobs can be added. See list of available versions at https://docs.travis-ci.com/user/reference/osx/#macos-version
# - <<: *osx
-# osx_image: xcode10
+# osx_image: xcode9.4
- env: TASK="man"
script: ./dist/man.sh
deploy:
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