Skip to content

Commit

Permalink
Merge remote branch 'origin/master' into edge
Browse files Browse the repository at this point in the history
  • Loading branch information
automatic-merge committed Sep 3, 2024
2 parents c2c4093 + c5919d3 commit a0d2fa1
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 5 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,34 @@ 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
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 alr exec -- gprconfig --show-targets | grep aarch64-linux; then
export GPRBUILD_EXTRA=--target=aarch64-linux
export NODE_ARCH_PLATFORM=arm64/linux
find . -name '*.ali' -delete
find . -name '*.[ao]' -delete
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:"
alr exec -- gprconfig --show-targets || true
fi
- name: Archive ALS binary
uses: actions/upload-artifact@v4
with:
Expand All @@ -80,6 +102,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: |
Expand Down
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down Expand Up @@ -70,6 +70,7 @@ else
# Code Ada extension.
NODE_ARCH=$(shell node -e "console.log(process.arch)")
NODE_PLATFORM=$(shell node -e "console.log(process.platform)")
NODE_ARCH_PLATFORM ?= $(NODE_ARCH)/$(NODE_PLATFORM)
endif

VSCE=npx vsce
Expand Down Expand Up @@ -112,8 +113,8 @@ endif
$(GPRBUILD) -P gnat/tester.gpr -p $(BUILD_FLAGS)
$(GPRBUILD) -P gnat/lsp_client.gpr -p $(COVERAGE_BUILD_FLAGS)
ifdef NODE
mkdir -p integration/vscode/ada/$(NODE_ARCH)/$(NODE_PLATFORM)
cp -v -f $(ALS) integration/vscode/ada/$(NODE_ARCH)/$(NODE_PLATFORM)
mkdir -p integration/vscode/ada/$(NODE_ARCH_PLATFORM)
cp -v -f $(ALS) integration/vscode/ada/$(NODE_ARCH_PLATFORM)
endif

generate:
Expand Down Expand Up @@ -150,7 +151,7 @@ clean:
-$(GPRCLEAN) -P gnat/lsp_3_17.gpr $(LIBRARY_FLAGS)
-$(GPRCLEAN) -P gnat/lsp_server.gpr $(LIBRARY_FLAGS)
-$(GPRCLEAN) -P gnat/tester.gpr $(LIBRARY_FLAGS)
-rm -rf integration/vscode/ada/$(NODE_ARCH)/$(NODE_PLATFORM)
-rm -rf integration/vscode/ada/$(NODE_ARCH_PLATFORM)

vscode:
ifneq ($(npm_config_offline),true)
Expand Down
4 changes: 4 additions & 0 deletions scripts/build_als.sh
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ function strip_debug() {
# system (or by XCode).
dsymutil "$ALS"
strip "$ALS"
elif [[ $NODE_ARCH_PLATFORM == "arm64/linux" ]]; then
aarch64-linux-gnu-objcopy --only-keep-debug ${ALS} ${ALS}.debug
aarch64-linux-gnu-objcopy --strip-all ${ALS}
aarch64-linux-gnu-objcopy --add-gnu-debuglink=${ALS}.debug ${ALS}
else
objcopy --only-keep-debug ${ALS} ${ALS}.debug
objcopy --strip-all ${ALS}
Expand Down
2 changes: 1 addition & 1 deletion subprojects/libgpr2.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ command = [

[[actions]]
type = "pre-build"
command = ["bash", "-c", "-x", "make setup build-lib-${LIBRARY_TYPE:-static} GPR2KBDIR=./gprconfig_kb/db"]
command = ["make", "setup", ".build/kb/gpr2-kb-embedded.ads", ".build/kb/gpr2-kb-embedded.adb", "GPR2KBDIR=./gprconfig_kb/db"]

[[depends-on]]
gnatcoll = "~24.0.0"
Expand Down

0 comments on commit a0d2fa1

Please sign in to comment.