diff --git a/.github/workflows/selftest.yml b/.github/workflows/selftest.yml index 56fcc946..9bd1e0de 100644 --- a/.github/workflows/selftest.yml +++ b/.github/workflows/selftest.yml @@ -9,6 +9,7 @@ on: pull_request jobs: setup-alire: strategy: + fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] target: [stable, nightly, source] diff --git a/action.yml b/action.yml index 05b87012..86c8ce67 100644 --- a/action.yml +++ b/action.yml @@ -77,13 +77,39 @@ runs: id: find-gnat run: gnat --version && echo "available=true" >> $GITHUB_OUTPUT || echo "available=false" >> $GITHUB_OUTPUT - # Setup a GNAT if necessary to build from branch. - # We cannot use alr-install or setup-alire, as that creates infinite recursion. - - name: Install GNAT + # Setup a GNAT if necessary to build from branch. We cannot use alr-install + # or setup-alire, as that creates infinite recursion. Rather than relying + # on the old action that sets up CE editions, we rely on ourselves to + # install a stable alr and use it to install the toolchain we need. + + # BEGIN TOOLCHAIN INSTALLATION + + - name: Install GNAT (I) if: inputs.branch != '' && steps.find-gnat.outputs.available != 'true' && steps.cache-alr.outputs.cache-hit != 'true' - uses: ada-actions/toolchain@ce2020 - with: - distrib: community + uses: alire-project/setup-alire@v3 + + - name: Install GNAT (II) + if: inputs.branch != '' && steps.find-gnat.outputs.available != 'true' && steps.cache-alr.outputs.cache-hit != 'true' + shell: bash + run: | + alr install gnat_native gprbuild --prefix=$PWD/setup_alire_prefix + rm -rf ./alire_install && echo REMOVED stable alr used for toolchain install + ls -lF $PWD/setup_alire_prefix/bin + + - name: Install GNAT (III) - Add to path (Windows) + if: inputs.add_to_path == 'true' && runner.os == 'Windows' + shell: pwsh + run: | + $Target = Resolve-Path $PWD.Path\setup_alire_prefix\bin + Add-Content $env:GITHUB_PATH $Target + + - name: Install GNAT (III) - Add to path (!Windows) + if: inputs.add_to_path == 'true' && runner.os != 'Windows' + shell: bash + run: | + readlink -f "$PWD/setup_alire_prefix/bin" >> $GITHUB_PATH + + # END TOOLCHAIN INSTALLATION # To run the old setup action which is javascript - name: Setup Node