From a6efd7cdbc450bc6269ea3bf850fd04072d1e7aa Mon Sep 17 00:00:00 2001 From: Maxim Reznik Date: Thu, 29 Aug 2024 17:33:22 +0300 Subject: [PATCH] Try to build AArch64 ALS on Linux --- .github/workflows/build-binaries.yml | 24 ++++++++++++++++++++++++ Makefile | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index 30c1133e..6d333df9 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -58,12 +58,33 @@ jobs: bin/alr index --reset-community bin/alr toolchain --select gnat_native^14 gprbuild echo $PWD/bin >> $GITHUB_PATH + - name: Get cross GNAT toolchain (Linux) + if: ${{ runner.os == 'Linux' }} + run: | + sudo apt install -y libc6-dev-arm64-cross linux-libc-dev-arm64-cross binutils-aarch64-linux-gnu + curl -L 'https://www.dropbox.com/scl/fi/0qe3ouaf1asty5z6kc5nw/aarch64-Linux-gnat-14.tar?rlkey=dxuztwe4zfpdy3bd96fsr3ckm&st=jl7ascbf&dl=1' \ + | tar xvf - + # aws s3 cp s3://adacore-gha-tray-eu-west-1/toolchain/aarch64-Linux-gcc-14.2.tar.bz2 . --sse=AES256 + # aws s3 cp s3://adacore-gha-tray-eu-west-1/toolchain/aarch64-Linux-gmp-6.2.1.tar.bz2 . --sse=AES256 + sudo tar xjf aarch64-Linux-gcc-14.2.tar.bz2 -C / + sudo tar xjf aarch64-Linux-gmp-6.2.1.tar.bz2 -C / - name: Build shell: bash run: | alr settings --global --set dependencies.shared false pip3 install e3-testsuite scripts/build_als.sh all "$TAG" + - name: Build ALS with cross (Linux) + if: ${{ runner.os == 'Linux' }} + run: | + if gprconfig --show-targets | grep aarch64-linux; then + export GPRBUILD_EXTRA=--target=aarch64-linux + scripts/build_als.sh build_als "$TAG" arm64/linux + scripts/build_als.sh strip_debug "$TAG" arm64/linux + else + echo "No AArch64 cross compiler found:" + gprconfig --show-targets + fi - name: Archive ALS binary uses: actions/upload-artifact@v4 with: @@ -80,6 +101,9 @@ jobs: if: ${{ env.TAG != env.DEFAULT_TAG }} run: | .github/workflows/release.sh "${{ secrets.GITHUB_TOKEN }}" $TAG "" + if [ -f integration/vscode/ada/arm64/linux/ada_language_server ] ; then + .github/workflows/release.sh "${{ secrets.GITHUB_TOKEN }}" $TAG arm64/linux + fi - name: Package shell: bash run: | diff --git a/Makefile b/Makefile index 86781cdb..614b2c2c 100644 --- a/Makefile +++ b/Makefile @@ -37,7 +37,7 @@ TESTER=$(ROOTDIR)/.obj/tester/tester-run$(EXE) # Env variable to set for update VS Code test references MOCHA_ALS_UPDATE= -GPRBUILD_EXTRA= +GPRBUILD_EXTRA ?= GPRBUILD_FLAGS=-m -j$(PROCESSORS) $(GPRBUILD_EXTRA) GPRBUILD=gprbuild $(GPRBUILD_FLAGS) -XSUPERPROJECT= GPRCLEAN_EXTRA=