Add msys2 option #143
Workflow file for this run
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
name: Selftest | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
setup-alire: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-12 | |
- macos-14 | |
- macos-latest | |
- ubuntu-latest | |
- windows-latest | |
target: | |
- nightly | |
- source | |
- stable | |
msys2: [true, false] | |
exclude: | |
- os: macos-12 | |
msys2: true | |
- os: macos-14 | |
msys2: true | |
- os: macos-stable | |
msys2: true | |
- os: ubuntu-latest | |
msys2: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup stable | |
if: matrix.target == 'stable' | |
uses: ./ # This uses the action code in the current PR | |
with: | |
msys2: ${{ matrix.msys2 }} | |
cache: false | |
# We test without cache, as caching is tested in a separate workflow. | |
# This way we make sure the cache isn't hiding any issue. | |
- name: Setup nightly | |
if: matrix.target == 'nightly' | |
uses: ./ | |
with: | |
msys2: ${{ matrix.msys2 }} | |
version: nightly | |
cache: false | |
- name: Setup from source (master) | |
if: matrix.target == 'source' | |
uses: ./ | |
with: | |
msys2: ${{ matrix.msys2 }} | |
branch: master | |
cache: false | |
# Check alr and default toolchains | |
- run: alr -n version | |
- run: | | |
alr -n init --bin alrws | |
cd alrws | |
alr exec -- gnat --version | |
alr exec -- gprbuild --version | |
# Verify proper OS | |
- run: alr -n version | grep "os:" | grep LINUX | |
if: matrix.os == 'ubuntu-latest' | |
shell: bash | |
- run: alr -n version | grep "os:" | grep MACOS | |
if: matrix.os == 'macos-latest' | |
shell: bash | |
- run: alr -n version | grep "os:" | grep WINDOWS | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
# Verify proper architecture | |
- run: alr -n version | grep "arch:" | grep X86_64 | |
if: runner.arch == 'X64' | |
shell: bash | |
- run: alr -n version | grep "arch:" | grep AARCH64 | |
if: runner.arch == 'ARM64' | |
shell: bash | |
# Verify proper msys2 behavior | |
- run: alr -n version | grep "distribution:" | grep MSYS2 | |
if: matrix.os == 'windows-latest' && matrix.msys2 == true | |
shell: bash | |
- run: alr -n version | grep "distribution:" | grep UNKNOWN | |
if: matrix.os == 'windows-latest' && matrix.msys2 == false | |
shell: bash |