1
1
on :
2
2
push :
3
- branches :
4
- - edge
5
3
tags :
6
4
- 2*.*.*
5
+ workflow_dispatch :
6
+
7
7
name : Build binaries
8
8
env :
9
9
DEFAULT_TAG : 24.0.999
10
- AWS_DEFAULT_REGION : eu-west-1
11
10
jobs :
12
11
build :
13
12
name : Build and deploy
14
13
strategy :
15
14
fail-fast : false
16
- matrix : # Build debug and/or production
17
- debug : [''] # '' if production, 'debug' for debug
18
- os : [macos-11, ubuntu-20.04, windows-latest]
19
- cross : ['', aarch64]
20
- exclude :
21
- - os : windows-latest
22
- cross : aarch64
15
+ matrix :
16
+ os : [macos-12, macos-14, ubuntu-20.04, windows-latest]
23
17
runs-on : ${{ matrix.os }}
24
18
steps :
25
19
- name : Setup Python
@@ -35,128 +29,72 @@ jobs:
35
29
else
36
30
echo "TAG=$DEFAULT_TAG" >> $GITHUB_ENV
37
31
fi
38
- - name : Install cross toolchain (Linux)
39
- if : ${{ matrix.cross != '' && runner.os == 'Linux' }}
40
- env :
41
- AWS_ACCESS_KEY_ID : ${{secrets.GHA_CACHE_ACCESS_KEY_ID}}
42
- AWS_SECRET_ACCESS_KEY : ${{secrets.GHA_CACHE_SECRET}}
43
- AWS_DEFAULT_REGION : eu-west-1
44
- run : |
45
- sudo apt install -y libc6-dev-arm64-cross linux-libc-dev-arm64-cross binutils-aarch64-linux-gnu
46
- aws s3 cp s3://adacore-gha-tray-eu-west-1/toolchain/${{ matrix.cross }}-${{ runner.os }}-gcc-13.2.tar.bz2 . --sse=AES256
47
- aws s3 cp s3://adacore-gha-tray-eu-west-1/toolchain/${{ matrix.cross }}-${{ runner.os }}-gmp-6.2.1.tar.bz2 . --sse=AES256
48
- sudo tar xjf ${{ matrix.cross }}-${{ runner.os }}-gcc-13.2.tar.bz2 -C /
49
- sudo tar xjf ${{ matrix.cross }}-${{ runner.os }}-gmp-6.2.1.tar.bz2 -C /
50
- - name : Install cross toolchain (MacOS)
51
- if : ${{ matrix.cross != '' && runner.os != 'Linux' }}
52
- env :
53
- AWS_ACCESS_KEY_ID : ${{secrets.GHA_CACHE_ACCESS_KEY_ID}}
54
- AWS_SECRET_ACCESS_KEY : ${{secrets.GHA_CACHE_SECRET}}
55
- AWS_DEFAULT_REGION : eu-west-1
56
- run : |
57
- aws s3 cp s3://adacore-gha-tray-eu-west-1/toolchain/${{ matrix.cross }}-${{ runner.os }}-gcc-13.2.tar.bz2 . --sse=AES256
58
- aws s3 cp s3://adacore-gha-tray-eu-west-1/toolchain/${{ matrix.cross }}-${{ runner.os }}-gmp-6.2.1.tar.bz2 . --sse=AES256
59
- sudo tar xjf ${{ matrix.cross }}-${{ runner.os }}-gcc-13.2.tar.bz2 --strip-components=3 -C /usr/local
60
- sudo tar xjf ${{ matrix.cross }}-${{ runner.os }}-gmp-6.2.1.tar.bz2 --strip-components=3 -C /usr/local
61
32
- name : Force Alire use preinstalled MSYS2
62
33
shell : bash
63
34
if : ${{ runner.os == 'Windows' }}
64
35
run : |
65
36
mkdir -p ~/.config/alire
66
37
echo '[msys2]' >> ~/.config/alire/config.toml
67
38
echo 'install_dir = "C:\\msys64"' >> ~/.config/alire/config.toml
68
- - name : Install iconv and gmp (Windows only)
69
- run : pacman --noconfirm -S mingw64/mingw-w64-x86_64-libiconv mingw64/mingw-w64-x86_64-gmp
70
- if : ${{ runner.os == 'Windows' }}
71
- shell : c:\msys64\usr\bin\bash.exe -l -e -o pipefail {0}
72
- env :
73
- MSYSTEM : MINGW64
74
39
- name : Get als
75
40
uses : actions/checkout@v3
76
41
with :
77
42
fetch-depth : 0
78
- - name : Get Spawn
79
- uses : actions/checkout@v3
80
- with :
81
- repository : AdaCore/spawn
82
- path : subprojects/spawn
83
- - name : Get LAL_Tools
84
- uses : actions/checkout@v3
85
- with :
86
- repository : AdaCore/libadalang-tools
87
- path : subprojects/libadalang-tools
88
- - name : Get Templates Parser
89
- uses : actions/checkout@v3
90
- with :
91
- repository : AdaCore/templates-parser
92
- path : subprojects/templates-parser
93
- - name : Get GNATdoc
94
- uses : actions/checkout@v3
95
- with :
96
- repository : AdaCore/gnatdoc
97
- path : subprojects/gnatdoc
98
- ref : edge
99
- - name : Get LAL Refactor
100
- uses : actions/checkout@v3
101
- with :
102
- repository : AdaCore/lal-refactor
103
- path : subprojects/lal-refactor
104
- ref : edge
105
- - uses : actions/cache@v3
106
- with :
107
- path : ./cached_gnat
108
- key : ${{ runner.os }}-alire-2023
109
- restore-keys : ${{ runner.os }}-alire-2023
110
- - name : Get GNAT toolchain with alire
111
- uses : alire-project/setup-alire@v2
43
+ - name : Get GNAT toolchain with alire (AArch64)
44
+ if : ${{ matrix.os == 'macos-14' }}
45
+ run : |
46
+ # alire-project/setup-alire doesn't work for ARM64 Mac OS X for now.
47
+ # https://github.com/alire-project/setup-alire/pull/74
48
+ curl -L -O https://github.com/alire-project/alire/releases/download/nightly/alr-nightly-bin-aarch64-macos.zip
49
+ unzip alr-nightly-bin-aarch64-macos.zip
50
+ bin/alr index --reset-community
51
+ bin/alr toolchain --select gnat_native^14 gprbuild
52
+ echo $PWD/bin >> $GITHUB_PATH
53
+ - name : Get GNAT toolchain with alire (x86_64)
54
+ if : ${{ matrix.os != 'macos-14' }}
55
+ uses : alire-project/setup-alire@v3
112
56
with :
113
- toolchain : gnat_native^13 gprbuild^22
114
- toolchain_dir : ./cached_gnat
57
+ toolchain : gnat_native^14 gprbuild
115
58
- name : Build
116
59
shell : bash
117
- env :
118
- AWS_ACCESS_KEY_ID : ${{secrets.GHA_CACHE_ACCESS_KEY_ID}}
119
- AWS_SECRET_ACCESS_KEY : ${{secrets.GHA_CACHE_SECRET}}
120
60
run : |
121
- # This is to avoid locking .sh on win that prevents its updating
122
- cp .github/workflows/build-binaries.sh .github/workflows/build-binaries.sh_
123
- .github/workflows/build-binaries.sh_ "${{ matrix.debug }}" ${{ runner.os }} ${{ env. TAG }} "" "${{ matrix.cross }} "
61
+ alr settings --global --set dependencies.shared false
62
+ pip3 install e3-testsuite
63
+ scripts/build_als.sh all "$ TAG"
124
64
- name : Archive ALS binary
125
- if : ${{ github.event_name == 'push' }}
126
- uses : actions/upload-artifact@v3
65
+ uses : actions/upload-artifact@v4
127
66
with :
128
- name : als-${{ runner.os }}-${{ matrix.debug }}${{ matrix.cross }}
67
+ name : als-${{ matrix.os }}
129
68
# We know that only one of the following entries will match on a given
130
69
# run, so we use globs here to try to avoid warnings on unmatched
131
70
# entries
132
71
path : |
133
72
integration/vscode/ada/arm*
134
73
integration/vscode/ada/x64*
135
- package :
136
- if : ${{ github.event_name == 'push' }}
137
- needs : build
138
- runs-on : ubuntu-latest
139
- steps :
140
- - name : Get als
141
- uses : actions/checkout@v3
142
- with :
143
- fetch-depth : 0
144
- - name : Download all workflow run artifacts
145
- uses : actions/download-artifact@v3
146
- - name : Pack vscode extension
74
+ commits.txt
75
+ - name : Upload release
76
+ shell : bash
77
+ if : ${{ env.TAG != env.DEFAULT_TAG }}
147
78
run : |
148
- if [[ ${GITHUB_REF##*/} = 2*.[0-9]*.[0-9]* ]]; then
149
- TAG="${GITHUB_REF##*/}"
150
- .github/workflows/release.sh "" "${{ secrets.GITHUB_TOKEN }}" $TAG
151
- # .github/workflows/release.sh "debug" "${{ secrets.GITHUB_TOKEN }}" $TAG
152
- else
153
- TAG="$DEFAULT_TAG"
154
- fi
155
- echo "TAG=$TAG" >> $GITHUB_ENV
156
- .github/workflows/pack-binaries.sh "" "${{secrets.VSCE_TOKEN}}" "${{secrets.OPENVSX_TOKEN}}" $TAG
157
- # .github/workflows/pack-binaries.sh "debug" "${{secrets.VSCE_TOKEN}}" "${{secrets.OPENVSX_TOKEN}}" $TAG
158
- - name : Archive ALS vsix
159
- uses : actions/upload-artifact@v3
79
+ .github/workflows/release.sh "${{ secrets.GITHUB_TOKEN }}" $TAG ""
80
+ - name : Package
81
+ shell : bash
82
+ run : |
83
+ .github/workflows/pack-binaries.sh "$TAG"
84
+ - name : Archive VSIX binary
85
+ uses : actions/upload-artifact@v4
160
86
with :
161
- name : als-vsix-${{ matrix.debug }}${{ env.TAG }}
162
- path : ' *.vsix'
87
+ name : vsix-${{ matrix.os }}
88
+ path : " *.vsix"
89
+ - name : Upload result to AWS
90
+ shell : bash
91
+ if : ${{ github.repository == 'AdaCore/ada_language_server' && startsWith(matrix.os, 'macos-') }}
92
+ env :
93
+ AWS_ACCESS_KEY_ID : ${{secrets.GHA_PUBLISH_ACCESS_KEY_ID}}
94
+ AWS_SECRET_ACCESS_KEY : ${{secrets.GHA_PUBLISH_SECRET}}
95
+ AWS_DEFAULT_REGION : eu-west-1
96
+ run : |
97
+ for FILE in *.vsix ; do
98
+ aws s3 cp ${FILE} s3://adacore-gha-tray-eu-west-1/vscode-extension/${TAG}/ --sse=AES256
99
+ done
100
+ aws s3 ls s3://adacore-gha-tray-eu-west-1/vscode-extension/${TAG}/
0 commit comments