Skip to content

Commit b2ebac8

Browse files
committed
Merge branch 'topic/fix_gh_ci' into 'master'
GitHub CI: Use GCC 13 to build ALS See merge request eng/ide/ada_language_server!1411
2 parents d258654 + c085ca3 commit b2ebac8

File tree

7 files changed

+37
-33
lines changed

7 files changed

+37
-33
lines changed

.github/workflows/build-binaries.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,22 @@
55
set -x -e
66
DEBUG=$1 # Value is '' or 'debug'
77
RUNNER_OS=$2 # ${{ runner.os }} is Linux, Windiws, maxOS
8-
TAG=$3 # For master it's 23.0.999, while for tag it's the tag itself
8+
TAG=$3 # For master it's 24.0.999, while for tag it's the tag itself
99
NO_REBASE=$4 # Specify this to skip the rebase over the edge branch. Used for local debugging.
1010

1111
prefix=/tmp/ADALIB_DIR
1212

13+
export CPATH=/usr/local/include
14+
export LIBRARY_PATH=/usr/local/lib
15+
export DYLD_LIBRARY_PATH=/usr/local/lib
16+
export PATH=`ls -d $PWD/cached_gnat/*/bin |tr '\n' ':'`$PATH
17+
export ADAFLAGS=-g1
18+
1319
if [ $RUNNER_OS = Windows ]; then
1420
prefix=/opt/ADALIB_DIR
15-
mount `cygpath -w $RUNNER_TEMP|cut -d: -f1`:/opt /opt
21+
export CPATH=`cygpath -w /c/msys64/mingw64/include`
22+
export LIBRARY_PATH=`cygpath -w /c/msys64/mingw64/lib`
23+
mount D:/opt /opt
1624
fi
1725

1826
export GPR_PROJECT_PATH=$prefix/share/gpr:\
@@ -22,11 +30,6 @@ $PWD/subprojects/lal-refactor/gnat:\
2230
$PWD/subprojects/libadalang-tools/src:\
2331
$PWD/subprojects/spawn/gnat:\
2432
$PWD/subprojects/stubs
25-
export CPATH=/usr/local/include:/mingw64/include
26-
export LIBRARY_PATH=/usr/local/lib:/mingw64/lib
27-
export DYLD_LIBRARY_PATH=/usr/local/lib
28-
export PATH=`ls -d $PWD/cached_gnat/*/bin |tr '\n' ':'`$PATH
29-
export ADAFLAGS=-g1
3033
echo PATH=$PATH
3134

3235
BRANCH=master
@@ -57,6 +60,7 @@ FILE=libadalang-$RUNNER_OS-$BRANCH${DEBUG:+-dbg}-static.tar.gz
5760
# and we don't delete it after use.
5861
if [ ! -f "$FILE" ]; then
5962
aws s3 cp s3://adacore-gha-tray-eu-west-1/libadalang/$FILE . --sse=AES256
63+
umask 0 # To avoid permission errors on MSYS2
6064
tar xzf $FILE -C $prefix
6165
rm -f -v $FILE
6266
else

.github/workflows/build-binaries.yml

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- 2*.*.*
77
name: Build binaries
88
env:
9-
DEFAULT_TAG: 23.0.999
9+
DEFAULT_TAG: 24.0.999
1010
AWS_DEFAULT_REGION: eu-west-1
1111
jobs:
1212
build:
@@ -18,10 +18,10 @@ jobs:
1818
os: [macos-11, ubuntu-20.04, windows-latest]
1919
runs-on: ${{ matrix.os }}
2020
steps:
21-
- name: Setup Python 3.8
21+
- name: Setup Python
2222
uses: actions/setup-python@v4
2323
with:
24-
python-version: '3.8'
24+
python-version: '3.10'
2525
- name: Initialize TAG and git autocrlf
2626
shell: bash
2727
run: |
@@ -31,15 +31,19 @@ jobs:
3131
else
3232
echo "TAG=$DEFAULT_TAG" >> $GITHUB_ENV
3333
fi
34+
- name: Force Alire use preinstalled MSYS2
35+
shell: bash
36+
if: ${{ runner.os == 'Windows' }}
37+
run: |
38+
mkdir -p ~/.config/alire
39+
echo '[msys2]' >> ~/.config/alire/config.toml
40+
echo 'install_dir = "C:\\msys64"' >> ~/.config/alire/config.toml
3441
- name: Install iconv and gmp (Windows only)
42+
run: pacman --noconfirm -S mingw64/mingw-w64-x86_64-libiconv mingw64/mingw-w64-x86_64-gmp
3543
if: ${{ runner.os == 'Windows' }}
36-
uses: msys2/setup-msys2@v2
37-
with:
38-
path-type: inherit
39-
update: true
40-
install: >-
41-
mingw64/mingw-w64-x86_64-libiconv
42-
mingw64/mingw-w64-x86_64-gmp
44+
shell: c:\msys64\usr\bin\bash.exe -l -e -o pipefail {0}
45+
env:
46+
MSYSTEM: MINGW64
4347
- name: Get als
4448
uses: actions/checkout@v3
4549
with:
@@ -79,29 +83,22 @@ jobs:
7983
- uses: actions/cache@v3
8084
with:
8185
path: ./cached_gnat
82-
key: ${{ runner.os }}-alire-2022
83-
restore-keys: ${{ runner.os }}-alire-2022
86+
key: ${{ runner.os }}-alire-2023
87+
restore-keys: ${{ runner.os }}-alire-2023
8488
- name: Get GNAT toolchain with alire
8589
uses: alire-project/setup-alire@v2
8690
with:
87-
toolchain: gnat_native^12 gprbuild^22
91+
toolchain: gnat_native^13 gprbuild^22
8892
toolchain_dir: ./cached_gnat
89-
- name: Build (Windows)
90-
if: ${{ runner.os == 'Windows' }}
91-
shell: msys2 {0}
93+
- name: Build
94+
shell: bash
9295
env:
9396
AWS_ACCESS_KEY_ID: ${{secrets.GHA_CACHE_ACCESS_KEY_ID}}
9497
AWS_SECRET_ACCESS_KEY: ${{secrets.GHA_CACHE_SECRET}}
9598
run: |
9699
# This is to avoid locking .sh on win that prevents its updating
97100
cp .github/workflows/build-binaries.sh .github/workflows/build-binaries.sh_
98101
.github/workflows/build-binaries.sh_ "${{ matrix.debug }}" ${{ runner.os }} ${{ env.TAG }}
99-
- name: Build (non-Windows)
100-
env:
101-
AWS_ACCESS_KEY_ID: ${{secrets.GHA_CACHE_ACCESS_KEY_ID}}
102-
AWS_SECRET_ACCESS_KEY: ${{secrets.GHA_CACHE_SECRET}}
103-
if: ${{ runner.os != 'Windows' }}
104-
run: .github/workflows/build-binaries.sh "${{ matrix.debug }}" ${{ runner.os }} ${{ env.TAG }}
105102
- name: Archive ALS binary
106103
if: ${{ github.event_name == 'push' }}
107104
uses: actions/upload-artifact@v3

.github/workflows/pack-binaries.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -x -e
33
DEBUG=$1 # Value is '' or 'debug'
44
VSCE_TOKEN=$2
55
OVSX_TOKEN=$3
6-
TAG=$4 # For master it's 23.0.999, while for tag it's the tag itself
6+
TAG=$4 # For master it's 24.0.999, while for tag it's the tag itself
77

88
function make_change_log()
99
{

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ else
9191
endif
9292

9393
all: coverage-instrument
94+
$(GPRBUILD) -P gnat/lsp_3_17.gpr -p $(COVERAGE_BUILD_FLAGS) -c lsp-inputs.adb
9495
$(GPRBUILD) -P gnat/lsp_3_17.gpr -p $(COVERAGE_BUILD_FLAGS)
9596
$(GPRBUILD) -P gnat/tester.gpr -p $(BUILD_FLAGS)
9697
$(GPRBUILD) -d -ws -c -u -P gnat/lsp_server.gpr -p $(BUILD_FLAGS) s-memory.adb

gnat/lsp_3_17.gpr

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ project LSP_3_17 is
106106

107107
package Compiler is
108108
for Default_Switches ("Ada") use Common_Ada_Switches & Ada_Switches;
109+
for Switches ("lsp-inputs.adb") use
110+
Common_Ada_Switches & Ada_Switches & ("-O0");
109111
for Local_Configuration_Pragmas use "gnat.adc";
110112
end Compiler;
111113

integration/vscode/ada/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

integration/vscode/ada/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ada",
33
"displayName": "Language Support for Ada",
44
"description": "A Language Server providing Ada and SPARK support in Visual Studio Code",
5-
"version": "23.0.999",
5+
"version": "24.0.999",
66
"publisher": "AdaCore",
77
"license": "GPL-3.0",
88
"engines": {

0 commit comments

Comments
 (0)