diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 60140446a..4ae2bd575 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -37,13 +37,9 @@ jobs: uses: actions/checkout@v2 with: repository: AdaCore/gprbuild - path: gprbuild - fetch-depth: 0 # To be able do `git revert` - - name: Revert a libgpr patch (MacOS X only) - # The latest libgpr doesn't support GNAT CE 2020, but on MacOS X we - # don't have GNAT CE 2021. Let's revert this commit for now. - if: ${{ runner.os == 'macOS' }} - run: git -C gprbuild revert --no-edit 3341766255bf5ab90fe05a8e162894b7830adca6 + # `gprbuild` directory raises a conflict in alr: + # https://github.com/alire-project/alire/issues/864 + path: gprbuild_ - name: Get gnatcoll core uses: actions/checkout@v2 with: @@ -66,19 +62,12 @@ jobs: - uses: actions/cache@v2 with: path: ./cached_gnat - key: ${{ runner.os }}-gnat-ce-2021 - - name: Get GNAT Community 2021 toolchain - if: ${{ runner.os != 'macOS' }} - uses: ada-actions/toolchain@ce2021 + key: ${{ runner.os }}-alire-2021 + - name: Get GNAT toolchain with alire + uses: alire-project/setup-alire@v1 with: - distrib: community - install_dir: ./cached_gnat - - name: Get GNAT Community 2020 toolchain - if: ${{ runner.os == 'macOS' }} - uses: ada-actions/toolchain@ce2020 - with: - distrib: community - install_dir: ./cached_gnat + toolchain: gnat_native^11 gprbuild^21 + toolchain_dir: ./cached_gnat - name: Setup Python 3.8 uses: actions/setup-python@v2 with: diff --git a/utils/gh-build-binaries.sh b/utils/gh-build-binaries.sh index 34858bb35..a43f86bf1 100755 --- a/utils/gh-build-binaries.sh +++ b/utils/gh-build-binaries.sh @@ -12,6 +12,9 @@ export GPR_PROJECT_PATH=$prefix/share/gpr export CPATH=/usr/local/include:/mingw64/include export LIBRARY_PATH=/usr/local/lib:/mingw64/lib export DYLD_LIBRARY_PATH=/usr/local/lib +export PATH=`ls -d $PWD/cached_gnat/*/bin |tr '\n' ':'`$PATH +echo PATH=$PATH + if [ $RUNNER_OS = Linux ]; then LIBRARY_TYPES="relocatable,static" else @@ -20,11 +23,14 @@ fi pip install -r langkit/REQUIREMENTS.dev pip install jsonschema pip install langkit/ -# gnat-ce installation is cached, so gnatcoll/gpr could be uninstalled already -gprinstall --uninstall gnatcoll || true -gprinstall --uninstall gpr || true -make -C gprbuild prefix=$prefix BUILD=${DEBUG:-production} GPRBUILD_OPTIONS="-cargs:C -Dst_mtim=st_mtimespec -gargs" libgpr.build.{shared,static} libgpr.install.{shared,static} +alr --non-interactive get xmlada +cd xmlada* +./configure --prefix=$prefix ${DEBUG:+--enable-build=Debug} +make all install +cd .. + +make -C gprbuild_ prefix=$prefix BUILD=${DEBUG:-production} GPRBUILD_OPTIONS="-cargs:C -Dst_mtim=st_mtimespec -gargs" libgpr.build.{shared,static} libgpr.install.{shared,static} BUILD=`echo $DEBUG| tr [a-z] [A-Z]` # Convert to uppercase make -C gnatcoll-core prefix=$prefix BUILD=${BUILD:-PROD} LIBRARY_TYPES="${LIBRARY_TYPES/,/ }" build install python gnatcoll-bindings/iconv/setup.py build ${DEBUG:+--debug} -j0 --prefix=$prefix --library-types=$LIBRARY_TYPES @@ -37,12 +43,14 @@ langkit/manage.py build-langkit-support --library-types $LIBRARY_TYPES langkit/manage.py install-langkit-support $prefix --library-types $LIBRARY_TYPES BUILD=${DEBUG:+dev} # Convert debug to dev + # Build libadalang static library ./manage.py generate ./manage.py build --library-types=static --build-mode ${BUILD:-prod} ./manage.py install --library-types=static --build-mode ${BUILD:-prod} $prefix gprinstall --uninstall --prefix=$prefix mains.gpr tar czf libadalang-$RUNNER_OS-`basename $GITHUB_REF`${DEBUG:+-dbg}-static.tar.gz -C $prefix . + # Build libadalang relocatable library if [ "$LIBRARY_TYPES" != static ]; then gprinstall --uninstall --prefix=$prefix libadalang.gpr