generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'alire/v3' into v4
- Loading branch information
Showing
2 changed files
with
26 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,55 +107,37 @@ runs: | |
shell: bash | ||
run: echo "need=true" >> $GITHUB_OUTPUT | ||
|
||
- name: Install GNAT (I) Linux | ||
if: steps.need-GNAT.outputs.need == 'true' && runner.os == 'Linux' | ||
uses: engineerd/[email protected] | ||
with: | ||
name: alr | ||
url: https://github.com/alire-project/alire/releases/download/v2.0.0/alr-2.0.0-bin-x86_64-linux.zip | ||
pathInArchive: bin/alr | ||
- name: Install GNAT (I) macOS x86_84 | ||
if: steps.need-GNAT.outputs.need == 'true' && runner.os == 'macOS' && runner.arch == 'X64' | ||
uses: engineerd/[email protected] | ||
with: | ||
name: alr | ||
url: https://github.com/alire-project/alire/releases/download/v2.0.0/alr-2.0.0-bin-x86_64-macos.zip | ||
pathInArchive: bin/alr | ||
- name: Install GNAT (I) macOS aarch64 | ||
if: steps.need-GNAT.outputs.need == 'true' && runner.os == 'macOS' && runner.arch == 'ARM64' | ||
uses: engineerd/[email protected] | ||
with: | ||
name: alr | ||
url: https://github.com/alire-project/alire/releases/download/v2.0.0/alr-2.0.0-bin-aarch64-macos.zip | ||
pathInArchive: bin/alr | ||
- name: Install GNAT (I) Windows | ||
if: steps.need-GNAT.outputs.need == 'true' && runner.os == 'Windows' | ||
uses: engineerd/[email protected] | ||
with: | ||
name: alr.exe | ||
url: https://github.com/alire-project/alire/releases/download/v2.0.0/alr-2.0.0-bin-x86_64-windows.zip | ||
pathInArchive: bin/alr.exe | ||
|
||
# Download a stable alr capable of installing a toolchain | ||
- name: Install GNAT (I) | ||
if: steps.need-GNAT.outputs.need == 'true' | ||
shell: bash | ||
run: | | ||
os_lower=$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]') | ||
alr_version=2.0.1 | ||
curl -L -O https://github.com/alire-project/alire/releases/download/v${alr_version}/alr-${alr_version}-bin-x86_64-${os_lower}.zip | ||
unzip -o alr-${alr_version}-bin-x86_64-${os_lower}.zip "bin/alr*" -d tmp_alr | ||
rm alr-${alr_version}-bin-x86_64-${os_lower}.zip | ||
echo "$(pwd -W 2>/dev/null || pwd)/tmp_alr/bin" >> $GITHUB_PATH | ||
# Perform the actual `alr install` and remove the `alr` just used to avoid | ||
# conflicts with the `alr` being built. | ||
# TODO: we use gnat^13 because there seems to be some trouble with gnat^14 | ||
# on macOS. Revisit this when the issue is resolved. | ||
- name: Install GNAT (II) | ||
if: steps.need-GNAT.outputs.need == 'true' | ||
shell: bash | ||
run: | | ||
alr install gnat_native gprbuild --prefix=$PWD/setup_alire_prefix | ||
alr install gnat_native^13 gprbuild^22 --prefix=$PWD/setup_alire_prefix | ||
echo REMOVAL TARGET: $(which alr) | ||
rm -f $(which alr)* && echo REMOVED stable alr used for toolchain install | ||
rm -rf tmp_alr && echo REMOVED stable alr used for toolchain install | ||
- name: Install GNAT (III) - Add to path (Windows) | ||
if: steps.need-GNAT.outputs.need == 'true' && runner.os == 'Windows' | ||
shell: pwsh | ||
run: | | ||
$Target = Resolve-Path .\setup_alire_prefix\bin | ||
Add-Content $env:GITHUB_PATH $Target | ||
- name: Install GNAT (III) - Add to path (!Windows) | ||
if: steps.need-GNAT.outputs.need == 'true' && runner.os != 'Windows' | ||
- name: Install GNAT (III) - Add to path | ||
if: steps.need-GNAT.outputs.need == 'true' | ||
shell: bash | ||
run: | | ||
readlink -f "$PWD/setup_alire_prefix/bin" >> $GITHUB_PATH | ||
path_to_add=$(pwd -W 2>/dev/null || pwd)/setup_alire_prefix/bin | ||
echo Adding to PATH: $path_to_add | ||
echo "$path_to_add" >> $GITHUB_PATH | ||
# END TOOLCHAIN INSTALLATION | ||
|
||
|
@@ -178,7 +160,8 @@ runs: | |
if: steps.need-GNAT.outputs.need == 'true' | ||
shell: bash | ||
run: | | ||
rm -rf setup_alire_prefix && echo REMOVED toolchain used to build alr | ||
rm -rf setup_alire_prefix && \ | ||
echo REMOVED toolchain used to build alr at $PWD/setup_alire_prefix | ||
# Display result for the record, and do some housekeeping | ||
- shell: bash | ||
|