Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check 2.0.2-dev #1748

Merged
merged 5 commits into from
Aug 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 0 additions & 81 deletions .github/workflows/ci-community.yml

This file was deleted.

28 changes: 24 additions & 4 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,24 +11,44 @@ on:
types: [published]
workflow_dispatch:

env:
ARCH: x86_64

jobs:

build:
name: CI on macOS

runs-on: macos-12
strategy:
fail-fast: false
matrix:
os: [macos-12, macos-14]

runs-on: ${{ matrix.os }}

steps:
- name: Check out repository
uses: actions/checkout@v2
with:
submodules: true

- name: Install FSF toolchain
- name: Install FSF toolchain (x86_64)
if: ${{ matrix.os != 'macos-14' }}
uses: alire-project/alr-install@v1
with:
crates: gnat_native gprbuild

- name: Install FSF toolchain (AArch64)
if: ${{ matrix.os == 'macos-14' }}
run: |
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 bin/alr
bin/alr index --reset-community
bin/alr install gnat_native gprbuild --prefix alire_prefix
echo $PWD/bin >> $GITHUB_PATH
echo $PWD/alire_prefix/bin >> $GITHUB_PATH
echo "ARCH=aarch64" >> $GITHUB_ENV

- name: Install Python 3.x (required for the testsuite)
uses: actions/setup-python@v2
with:
Expand All @@ -44,7 +64,7 @@ jobs:
- name: Upload binaries
uses: actions/upload-artifact@v2
with:
name: alr-bin-macos.zip
name: alr-bin-${{ env.ARCH }}-macos.zip
path: |
bin/alr
LICENSE.txt
Expand Down Expand Up @@ -82,5 +102,5 @@ jobs:
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: alr-bin-macos.zip
asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-bin-x86_64-macos.zip
asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-bin-${{ env.ARCH }}-macos.zip
asset_content_type: application/zip
27 changes: 18 additions & 9 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
fail-fast: false # Attempt to generate as many of them as possible
matrix:
os:
- macos-14
- macos-12
- ubuntu-20.04
- windows-latest
Expand All @@ -31,14 +32,18 @@ jobs:
with:
submodules: true

# Until some stable alr with `alr install` is available, we cannot rely on
# the alr-install action, as that introduces a circular dependency. If a
# nightly build were to fail, there's no way to do an `alr install` anymore
# TODO: replace with `alr-install` once alr 2.0 is out.
- name: Install FSF toolchain
uses: ada-actions/toolchain@ce2020
with:
distrib: community
uses: alire-project/setup-alire@v3

- name: Replace toolchain with aarch64
if: ${{ runner.arch == 'ARM64' }}
run: |
curl -L https://github.com/alire-project/GNAT-FSF-builds/releases/download/gnat-14.1.0-3/gnat-aarch64-darwin-14.1.0-3.tar.gz \
| tar xzf - --strip-components=1 -C /Users/runner/work/alire/alire/alire_prefix
curl -L https://github.com/alire-project/GNAT-FSF-builds/releases/download/gprbuild-24.0.0-1/gprbuild-aarch64-darwin-24.0.0-1.tar.gz \
| tar xzf - --strip-components=1 -C /Users/runner/work/alire/alire/alire_prefix
which gcc
gcc -v

- name: Install Python 3.x (required for the testsuite)
uses: actions/setup-python@v2
Expand Down Expand Up @@ -81,10 +86,14 @@ jobs:
if: startsWith(matrix.os, 'ubuntu')
run: zip alr-nightly-bin-x86_64-linux.zip bin/alr* LICENSE.txt alr-*.txt

- name: Package binaries (macOS)
if: startsWith(matrix.os, 'macos')
- name: Package binaries (macOS/x64)
if: startsWith(matrix.os, 'macos') && runner.arch == 'X64'
run: zip alr-nightly-bin-x86_64-macos.zip bin/alr* LICENSE.txt alr-*.txt

- name: Package binaries (macOS/arm64)
if: startsWith(matrix.os, 'macos') && runner.arch == 'ARM64'
run: zip alr-nightly-bin-aarch64-macos.zip bin/alr* LICENSE.txt alr-*.txt

# There's no zip on windows
- name: Install zip (Windows)
if: startsWith(matrix.os, 'windows')
Expand Down
2 changes: 1 addition & 1 deletion scripts/version-patcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ elif (which gprbuild &>/dev/null); then
gprbuild -P support/version_patcher/version_patcher.gpr
elif (which alr &>/dev/null); then
echo "Building patcher with alr..."
alr -C "$(dirname $bin)" build
alr -C "$(dirname $(dirname $bin))" build
else
echo "WARNING: No Ada tool available to build patcher, skipping."
exit 0
Expand Down
14 changes: 13 additions & 1 deletion src/alire/alire.adb
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ with GNATCOLL.OS.Constants;

package body Alire is

package OS renames GNAT.OS_Lib;

---------
-- "=" --
---------
Expand All @@ -37,7 +39,17 @@ package body Alire is
-- Check_Absolute_Path --
-------------------------

function Check_Absolute_Path (Path : Any_Path) return Boolean is separate;
function Check_Absolute_Path (Path : Any_Path) return Boolean
is (OS.Is_Absolute_Path (Path)
and then
-- On Windows, we must ensure the path is not only absolute but
-- also that it has a drive letter. This is not checked by the
-- GNAT.OS_Lib function.
(if OS.Directory_Separator = '\'
then
(Path'Length >= 3
and then Path (Path'First) in 'a' .. 'z' | 'A' .. 'Z'
and then Path (Path'First + 1) = ':')));

-------------
-- Err_Log --
Expand Down
7 changes: 0 additions & 7 deletions src/alire/os_freebsd/alire-check_absolute_path.adb

This file was deleted.

7 changes: 0 additions & 7 deletions src/alire/os_linux/alire-check_absolute_path.adb

This file was deleted.

7 changes: 0 additions & 7 deletions src/alire/os_macos/alire-check_absolute_path.adb

This file was deleted.

10 changes: 0 additions & 10 deletions src/alire/os_windows/alire-check_absolute_path.adb

This file was deleted.

4 changes: 4 additions & 0 deletions testsuite/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash

clear
python3 run.py -M1 "$@"
Loading