Skip to content

Commit

Permalink
Merge branch 'topic/gnatformat' into 'master'
Browse files Browse the repository at this point in the history
Add gnatformat as a dependency

See merge request eng/ide/ada_language_server!1655
  • Loading branch information
reznikmm committed Aug 12, 2024
2 parents b1f325b + 64a6683 commit 3b847a4
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 10 deletions.
21 changes: 12 additions & 9 deletions .github/workflows/build-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,24 @@ jobs:
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get GNAT toolchain with alire (AArch64)
if: ${{ matrix.os == 'macos-14' }}
- name: Get GNAT toolchain with alire
shell: bash
run: |
# alire-project/setup-alire doesn't work for ARM64 Mac OS X for now.
# https://github.com/alire-project/setup-alire/pull/74
curl -L -O https://github.com/alire-project/alire/releases/download/nightly/alr-nightly-bin-aarch64-macos.zip
unzip alr-nightly-bin-aarch64-macos.zip
# Also it depends on `engineerd/[email protected]` not approved by IT.
# https://github.com/alire-project/setup-alire/issues/75
# So we fetch Alire with curl then toolchain with Alire.
if [[ "$RUNNER_ARCH" == ARM64 ]] ; then
ZIP=nightly/alr-nightly-bin-aarch64-macos.zip
else
ZIP=v2.0.1/alr-2.0.1-bin-x86_64-${RUNNER_OS}.zip
fi
curl -L -O https://github.com/alire-project/alire/releases/download/$ZIP
unzip $(basename $ZIP)
bin/alr index --reset-community
bin/alr toolchain --select gnat_native^14 gprbuild
echo $PWD/bin >> $GITHUB_PATH
- name: Get GNAT toolchain with alire (x86_64)
if: ${{ matrix.os != 'macos-14' }}
uses: alire-project/setup-alire@v3
with:
toolchain: gnat_native^14 gprbuild
- name: Build
shell: bash
run: |
Expand Down
1 change: 1 addition & 0 deletions alire.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ libgpr2 = "^24.0.0"
vss = "^24.0.0"
libadalang_tools = "^24.0.0"
lal_refactor = "25.0.0-20240625"
gnatformat = "25.0.0-20240625"
gnatdoc = "^24.0.0"
spawn = "^24.0.0"

29 changes: 29 additions & 0 deletions index/gn/gnatformat/gnatformat-25.0.0-20240625.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name = "gnatformat"
description = "An opinionated code formatter for the Ada language."
version = "25.0.0-20240625"

authors = ["AdaCore"]
maintainers = ["João Azevedo <[email protected]>"]
maintainers-logins = ["joaopsazevedo"]
licenses = "Apache-2.0 WITH LLVM-exception"
website = "https://github.com/AdaCore/gnatformat"

project-files = ["gnat/gnatformat.gpr"]

[environment.'case(os)'.macos.DYLD_LIBRARY_PATH]
append = "${CRATE_ROOT}/.libs/relocatable"

[environment.'case(os)'.windows.PATH]
append = "${CRATE_ROOT}/.libs/relocatable"

[configuration]
disabled = true

[[depends-on]]
libadalang = "^24"
prettier_ada = "25.0.0-20240625"

[origin]
url = "git+https://github.com/AdaCore/gnatformat"
commit = "b418fcc894877777ecf4102410ba4eeee279e219"

4 changes: 3 additions & 1 deletion scripts/build_als.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ PINS="
adasat
gnatcoll
gnatdoc
gnatformat
lal_refactor
langkit_support
libadalang
Expand Down Expand Up @@ -45,6 +46,7 @@ repo_vss=VSS

branch_gnatdoc=edge
branch_lal_refactor=edge
branch_gnatformat=edge
branch_libgpr2=next
branch_prettier_ada=main

Expand All @@ -53,7 +55,7 @@ SETENV=$PWD/subprojects/libadalang/setenv.sh

# Set `prod` build mode
########################
# for adasat,lal,langkit,lal_refactor,laltools,markdown,spawn
# for adasat,gnatformat,lal,langkit,lal_refactor,laltools,markdown,spawn
export BUILD_MODE=prod
# for others
export GNATCOLL_BUILD_MODE=PROD
Expand Down
24 changes: 24 additions & 0 deletions subprojects/gnatformat.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name = "gnatformat"
description = "An opinionated code formatter for the Ada language."
version = "25.0.0-20240625"

authors = ["AdaCore"]
maintainers = ["João Azevedo <[email protected]>"]
maintainers-logins = ["joaopsazevedo"]
licenses = "Apache-2.0 WITH LLVM-exception"
website = "https://github.com/AdaCore/gnatformat"

project-files = ["gnat/gnatformat.gpr"]

[environment.'case(os)'.macos.DYLD_LIBRARY_PATH]
append = "${CRATE_ROOT}/.libs/relocatable"

[environment.'case(os)'.windows.PATH]
append = "${CRATE_ROOT}/.libs/relocatable"

[configuration]
disabled = true

[[depends-on]]
libadalang = "^24"
prettier_ada = "25.0.0-20240625"

0 comments on commit 3b847a4

Please sign in to comment.