-
-
Notifications
You must be signed in to change notification settings - Fork 51
87 lines (65 loc) · 2.1 KB
/
ci-toolchain.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
name: CI self+toolchain
# Build Alire with `alr build` and using a toolchain installed from Alire
# The `alr` being tested is the one which is being submitted in the PR
on:
pull_request:
paths-ignore:
- 'doc/**'
- '**.md'
- '**.rst'
- '**.txt'
jobs:
build:
name: ${{ matrix.os }} gcc^${{ matrix.gcc_version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- macos-latest
- ubuntu-latest
- windows-latest
gcc_version:
- 10
- 11
- 12
- 13
steps:
- name: Check out
uses: actions/checkout@v3
with:
submodules: true
# Use a stock alr to make the latest toolchain available
- name: Install FSF toolchain
uses: alire-project/alr-install@v1
with:
crates: gnat_native^${{matrix.gcc_version}} gprbuild
- name: Build alr with default toolchain
shell: bash
run: dev/build.sh
# We can start using the alr we just built
- name: Update dependencies
run: ./bin/alr -d -n update
- name: Show dependencies/pins
run: ./bin/alr -d -n -q with --solve || ./bin/alr -n -v -d with --solve
- name: Show build environment, with debug fallback
run: ./bin/alr -d -n printenv || ./bin/alr -n -v -d printenv
- shell: bash
run: mv ./bin ./bin-old || { sleep 5s && sudo mv ./bin ./bin-old; }
# Windows doesn't allow to replace a running exe so the next command
# fails otherwise. Also, this mv fails sometimes so we try twice JIC.
- name: SELF-BUILD
run: ./bin-old/alr -d -n build
- name: Show built version
run: ./bin/alr -d -n version
# Run the testsuite with the just build alr. The testsuite picks the proper
# alr in the ./bin/alr location.
- name: Install Python 3.x # required by testsuite
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install e3
run: pip install --upgrade -r testsuite/requirements.txt
- name: Run testsuite
run: cd testsuite; ./run.py -E
shell: bash