Skip to content

Commit f31c59a

Browse files
author
automatic-merge
committed
Merge remote branch 'origin/master' into edge
2 parents b195271 + 0549e09 commit f31c59a

File tree

5 files changed

+17
-46
lines changed

5 files changed

+17
-46
lines changed

.github/workflows/build-binaries.yml

Lines changed: 5 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
fail-fast: false
2222
matrix:
23-
os: [macos-13, macos-14, ubuntu-20.04, windows-latest]
23+
os: [macos-13, macos-14, ubuntu-20.04, ubuntu-22.04-arm, windows-latest]
2424
runs-on: ${{ matrix.os }}
2525
steps:
2626
- name: Setup Python
@@ -55,7 +55,10 @@ jobs:
5555
shell: bash
5656
run: |
5757
# alire-project/setup-alire works for ARM64 Mac OS X now. Shall we use it?
58-
if [[ "$RUNNER_ARCH" == ARM64 ]] ; then
58+
if [[ ${{ matrix.os }} == ubuntu-22.04-arm ]] ; then
59+
# Alire 2.1.0 was built for ubuntu 24.04, doesn't work on 22.04
60+
ZIP=nightly/alr-nightly-bin-aarch64-linux.zip
61+
elif [[ "$RUNNER_ARCH" == ARM64 ]] ; then
5962
ZIP=v2.0.2/alr-2.0.2-bin-aarch64-${RUNNER_OS}.zip
6063
else
6164
ZIP=v2.0.2/alr-2.0.2-bin-x86_64-${RUNNER_OS}.zip
@@ -65,21 +68,6 @@ jobs:
6568
bin/alr index --reset-community
6669
bin/alr toolchain --select gnat_native gprbuild
6770
echo $PWD/bin >> $GITHUB_PATH
68-
- name: Get cross GNAT toolchain (Linux)
69-
if: ${{ runner.os == 'Linux' }}
70-
env:
71-
AWS_ACCESS_KEY_ID: ${{secrets.GHA_CACHE_ACCESS_KEY_ID}}
72-
AWS_SECRET_ACCESS_KEY: ${{secrets.GHA_CACHE_SECRET}}
73-
AWS_DEFAULT_REGION: eu-west-1
74-
run: |
75-
sudo apt install -y libc6-dev-arm64-cross linux-libc-dev-arm64-cross binutils-aarch64-linux-gnu
76-
aws s3 cp s3://adacore-gha-tray-eu-west-1/toolchain/aarch64-Linux-gcc-14.2.tar.bz2 . --sse=AES256
77-
aws s3 cp s3://adacore-gha-tray-eu-west-1/toolchain/aarch64-Linux-gmp-6.2.1.tar.bz2 . --sse=AES256
78-
sudo tar xjf aarch64-Linux-gcc-14.2.tar.bz2 -C /
79-
sudo tar xjf aarch64-Linux-gmp-6.2.1.tar.bz2 -C /
80-
# This step can fail on personal forks that don't have credentials for
81-
# AWS. Allow failure so that the non-cross build still gets performed.
82-
continue-on-error: true
8371
- name: Fetch dependency commits numbers
8472
shell: bash
8573
if: ${{ env.TAG != env.DEFAULT_TAG }}
@@ -94,20 +82,6 @@ jobs:
9482
shell: bash
9583
run: |
9684
scripts/build_als.sh all "$TAG"
97-
- name: Build ALS with cross (Linux)
98-
if: ${{ runner.os == 'Linux' }}
99-
run: |
100-
if alr exec -- gprconfig --show-targets | grep aarch64-linux; then
101-
export GPRBUILD_EXTRA=--target=aarch64-linux
102-
export NODE_ARCH_PLATFORM=arm64/linux
103-
find . -name '*.ali' -delete
104-
find . -name '*.[ao]' -delete
105-
scripts/build_als.sh build_als "$TAG" arm64/linux
106-
scripts/build_als.sh strip_debug "$TAG" arm64/linux
107-
else
108-
echo "No AArch64 cross compiler found:"
109-
alr exec -- gprconfig --show-targets || true
110-
fi
11185
- name: Test
11286
shell: bash
11387
run: |
@@ -134,9 +108,6 @@ jobs:
134108
if: ${{ env.TAG != env.DEFAULT_TAG }}
135109
run: |
136110
.github/workflows/release.sh "${{ secrets.GITHUB_TOKEN }}" $TAG ""
137-
if [ -f integration/vscode/ada/arm64/linux/ada_language_server ] ; then
138-
.github/workflows/release.sh "${{ secrets.GITHUB_TOKEN }}" $TAG arm64/linux
139-
fi
140111
- name: Package
141112
shell: bash
142113
run: |

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ PROCESSORS ?= 0
1414
ifeq ($(OS),Windows_NT)
1515
PYTHON=python.exe
1616
EXE=.exe
17+
LSP_OS=$(OS)
1718
else
1819
UNAME_S := $(shell uname -s)
1920
ifeq ($(UNAME_S),Linux)
20-
OS=unix
21+
LSP_OS=unix
2122
else ifeq ($(UNAME_S),Darwin)
22-
OS=osx
23+
LSP_OS=osx
2324
endif
2425
PYTHON=python3
2526
EXE=
@@ -77,7 +78,7 @@ endif
7778
VSCE=npx vsce
7879

7980
LIBRARY_FLAGS=-XBUILD_MODE=$(BUILD_MODE) \
80-
-XOS=$(OS) \
81+
-XLSP_OS=$(LSP_OS) \
8182
-XLIBRARY_TYPE=$(LIBRARY_TYPE) \
8283
-XXMLADA_BUILD=$(LIBRARY_TYPE) \
8384
-XGPR_BUILD=$(LIBRARY_TYPE)

gnat/lsp_server.gpr

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ project LSP_Server is
2626
Library_Type : Library_Kind := external("ALS_LIBRARY_TYPE",
2727
external("LIBRARY_TYPE", "relocatable"));
2828

29-
type OS_KIND is ("Windows_NT", "unix", "osx");
30-
OS : OS_KIND := external("OS", "unix");
29+
OS : LSP_Common.OS_API_KIND := LSP_Common.OS_API;
3130

3231
for Source_Dirs use
3332
("../source/server",

subprojects/als.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ tags = ["lsp", "vscode"]
1313
ADA_PROJECT_PATH.set= "${CRATE_ROOT}/subprojects/stubs"
1414

1515
[gpr-set-externals."case(os)".linux]
16-
OS = "unix"
16+
LSP_OS = "unix"
1717
[gpr-set-externals."case(os)".macos]
18-
OS = "osx"
18+
LSP_OS = "osx"
1919
[gpr-set-externals."case(os)".windows]
20-
OS = "Windows_NT"
20+
LSP_OS = "Windows_NT"
2121

2222
[[depends-on]]
2323
gnatcoll = "^24.0.0"

subprojects/spawn.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ tags = ["process", "launch", "pipe"]
1414
disabled = true
1515

1616
[gpr-externals]
17-
OS = ["unix", "osx", "Windows_NT"]
17+
SPAWN_OS = ["unix", "osx", "Windows_NT"]
1818

1919
[gpr-set-externals.'case(os)']
20-
linux = { OS = "unix" } # Compact table syntax is convenient in this case
21-
windows = { OS = "Windows_NT" } # to see all enumeration values, one per row.
22-
macos = { OS = "osx" }
20+
linux = { SPAWN_OS = "unix" } # Compact table syntax is convenient in this case
21+
windows = { SPAWN_OS = "Windows_NT" } # to see all enumeration values, one per row.
22+
macos = { SPAWN_OS = "osx" }

0 commit comments

Comments
 (0)