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

Fix building with GNAT 10 & 11 #33

Closed
wants to merge 7 commits into from
Closed
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
8 changes: 8 additions & 0 deletions .github/workflows/ci-appimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
- name: Install FSF toolchain
run: sudo apt-get install -y gnat-10 gprbuild

- uses: mosteo-actions/gnat-toolchain-arch-checker@v1

- name: Set up gcc on the PATH to be gcc-10
run: |
mkdir -p $HOME/.local/bin
Expand Down Expand Up @@ -98,6 +100,12 @@ jobs:
- name: Rename AppImage
run: mv alr*AppImage alr.AppImage

- name: Test AppImage without the toolchain installed
run: |
chmod +x ./alr.AppImage
sudo apt-get remove -y gnat-10 gprbuild
which gnat || { echo "Toolchain purged"; ./alr.AppImage version; }

- name: Upload AppImage asset
if: (github.event_name == 'release')
uses: actions/upload-release-asset@v1
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ jobs:
uses: alire-project/alr-install@v1
with:
crates: gnat_native gprbuild
prefix: alire_prefix

- uses: mosteo-actions/gnat-toolchain-arch-checker@v1

- name: Install Python 3.x (required for the testsuite)
uses: actions/setup-python@v2
Expand All @@ -47,6 +50,13 @@ jobs:
BRANCH: ${{ github.base_ref }}
INDEX: ""

# Ascertain whether alr can run without the toolchain that built it
- name: Remove toolchain used for building & testing
shell: bash
run: |
rm -rf alire_prefix
which gnat || { echo "Toolchain purged"; ./bin/alr version; }

- name: Upload binaries
uses: actions/upload-artifact@v4
with:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
uses: alire-project/alr-install@v1
with:
crates: gnat_native gprbuild
prefix: alire_prefix

- name: Install FSF toolchain (AArch64)
if: ${{ matrix.os == 'macos-14' }}
Expand All @@ -49,6 +50,8 @@ jobs:
echo $PWD/alire_prefix/bin >> $GITHUB_PATH
echo "ARCH=aarch64" >> $GITHUB_ENV

- uses: mosteo-actions/gnat-toolchain-arch-checker@v1

- name: Install Python 3.x (required for the testsuite)
uses: actions/setup-python@v2
with:
Expand All @@ -61,6 +64,13 @@ jobs:
BRANCH: ${{ github.base_ref }}
INDEX: ""

# Ascertain whether alr can run without the toolchain that built it
- name: Remove toolchain used for building & testing
shell: bash
run: |
rm -rf alire_prefix
which gnat || { echo "Toolchain purged"; ./bin/alr version; }

- name: Upload binaries
uses: actions/upload-artifact@v4
with:
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ jobs:
uses: alire-project/alr-install@v1
with:
crates: gnat_native gprbuild
prefix: alire_prefix

- uses: mosteo-actions/gnat-toolchain-arch-checker@v1

- name: Build alr
run: gprbuild -j0 -p -P alr_env
Expand Down Expand Up @@ -66,6 +69,13 @@ jobs:
- name: Install alr
run: gprinstall -p -P alr_env --prefix=${{ runner.temp }}/alr_install

# Ascertain whether alr can run without the toolchain that built it
- name: Remove toolchain used for building & testing
shell: bash
run: |
rm -rf alire_prefix
which gnat || { echo "Toolchain purged"; ./bin/alr version; }

- name: Install qt-installer-framework in msys2
run: ${{env.PACMAN}} -S mingw64/mingw-w64-x86_64-qt-installer-framework

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,41 +21,41 @@ jobs:
fail-fast: false # Attempt to generate as many of them as possible
matrix:
os:
- macos-14
- macos-12
- macos-14
- ubuntu-20.04
- windows-latest

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

- name: Install FSF toolchain
uses: alire-project/alr-install@v1
with:
crates: gnat_native gprbuild
prefix: alire_prefix

- 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
- uses: mosteo-actions/gnat-toolchain-arch-checker@v1

- name: Install Python 3.x (required for the testsuite)
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Run test script
run: scripts/ci-github.sh
shell: bash

# Ascertain whether alr can run without the toolchain that built it
- name: Remove toolchain used for building & testing
shell: bash
run: |
rm -rf alire_prefix
which gnat || { echo "Toolchain purged"; ./bin/alr version; }

- name: Upload logs (if failed)
if: failure()
uses: actions/upload-artifact@v4
Expand Down
15 changes: 14 additions & 1 deletion scripts/ci-github.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,19 @@ fi
# Patch version
scripts/version-patcher.sh

# Use -static-libgcc only on macOS.
ALR_LINKER_ARGS=
if [ "$(get_OS)" == "macos" ]; then
ALR_LINKER_ARGS="-static-libgcc"
fi

# Build alr if no argument is "build=false"
if [[ " $* " == *" build=false "* ]]; then
echo "Skipping alr build, explicitly disabled via arguments"
else
export ALIRE_OS=$(get_OS)
gprbuild -j0 -p -P alr_env
echo "Using ALR_LINKER_ARGS=$ALR_LINKER_ARGS"
gprbuild -j0 -p -P alr_env -largs $ALR_LINKER_ARGS
fi

# Disable distro detection if supported
Expand Down Expand Up @@ -70,6 +77,12 @@ echo ALR SEARCH:
alr -q -d search --list --external
echo ............................

# Exit without testing if some argument is "test=false"
if [[ " $* " == *" test=false "* ]]; then
echo "SKIPPING testsuite, explicitly disabled via arguments"
exit 0
fi

echo TESTSUITE:
# Run e3.testsuite
echo
Expand Down
Loading