-
Notifications
You must be signed in to change notification settings - Fork 98
79 lines (67 loc) · 2.68 KB
/
build-distros.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
# Please read the TESTING file before modifying this file
name: Build Crate (Distro toolchain)
# Build the crate on the platforms with a supported package manager
# and using the distro-supplied GNAT compiler (with Alire's FSF fallback).
env:
CHECKS_ORG: alire-project
CHECKS_REPO: alire-index-checks
ALR_VERSION: 2.0.2
on:
pull_request:
paths:
- 'index/**.toml'
jobs:
build:
name: ${{ matrix.tag }}
env:
JOB_NAME: ${{ matrix.tag }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
tag:
- arch-rolling # Arch has its own recent GNAT and pacman
- centos-stream-fsf-latest # CentOS is used for unknown package manager
- debian-stable # Debian has very good Ada support and apt
- fedora-latest # Fedora has its own GNAT and dnf
# - opensuse-leap # OpenSUSE has its own GNAT and zypper
# TODO: diagnose and reinstate problems with tar/compiler installation
- ubuntu-lts # Ubuntu LTS is a common Debian derivative
steps:
- name: Check out alire-index
uses: actions/checkout@v4
with:
fetch-depth: 0
# Needed to be able to diff and obtain changed files. Furthermore, we
# need the full history or else grafted partial branches confuse the
# changed files detectors (in both scripts/gh-build-crate.sh and
# check-author action).
- name: Check out alire-index-checks
uses: actions/checkout@v4
with:
repository: ${{env.CHECKS_ORG}}/${{env.CHECKS_REPO}}
ref: ${{github.base_ref}}
path: ${{env.CHECKS_REPO}}
- name: Set up stable `alr`
if: contains(github.base_ref, 'stable-')
uses: alire-project/setup-alire@v4
with:
toolchain: --disable-assistant # We want to use the external ones in this workflow
version: ${{env.ALR_VERSION}}
- name: Set up devel `alr`
if: contains(github.base_ref, 'devel-')
uses: alire-project/setup-alire@v4
with:
toolchain: --disable-assistant # We want to use the external ones in this workflow
branch: master
- name: Test crate (${{matrix.tag}})
uses: mosteo-actions/docker-run@v1
with:
image: ghcr.io/alire-project/docker/gnat:${{matrix.tag}}
command: ${{env.CHECKS_REPO}}/scripts/gh-build-crate.sh
params: >
-v ${{ github.workspace }}/alire_install/bin/alr:/usr/bin/alr
-v ${{ github.event_path}}:/etc/event.json
-e GITHUB_EVENT_PATH=/etc/event.json
-e GITHUB_REPOSITORY=${{ github.repository }}
-e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}