generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 4
105 lines (86 loc) · 2.56 KB
/
selftest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
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