893ec65679
* fix: improper syntax that will be rejected post-2.1 (#1417) We had a missing check in index loading logic that should have rejected an unexpected array. * Don't fail fast
121 lines
3.8 KiB
YAML
121 lines
3.8 KiB
YAML
# Please read the TESTING file before modifying this file
|
|
|
|
name: Build Crate
|
|
|
|
env:
|
|
CHECKS_ORG: alire-project
|
|
CHECKS_REPO: alire-index-checks
|
|
|
|
on:
|
|
pull_request:
|
|
paths:
|
|
- 'index/**.toml'
|
|
|
|
jobs:
|
|
|
|
build:
|
|
name: ${{ matrix.os }}::${{ matrix.tag }}
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os:
|
|
- macos-latest
|
|
- ubuntu-latest
|
|
- windows-latest
|
|
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
|
|
- ubuntu-lts # Ubuntu LTS is a common Debian derivative
|
|
- ""
|
|
exclude: # inclusions don't allow to add arrays of values to a scenario
|
|
- os: ubuntu-latest
|
|
tag: ""
|
|
- os: macos-latest
|
|
tag: arch-rolling
|
|
- os: macos-latest
|
|
tag: centos-stream-fsf-latest
|
|
- os: macos-latest
|
|
tag: debian-stable
|
|
- os: macos-latest
|
|
tag: fedora-latest
|
|
- os: macos-latest
|
|
tag: ubuntu-lts
|
|
- os: windows-latest
|
|
tag: arch-rolling
|
|
- os: windows-latest
|
|
tag: centos-stream-fsf-latest
|
|
- os: windows-latest
|
|
tag: debian-stable
|
|
- os: windows-latest
|
|
tag: fedora-latest
|
|
- os: windows-latest
|
|
tag: ubuntu-lts
|
|
|
|
steps:
|
|
- name: Check out alire-index
|
|
uses: actions/checkout@v2
|
|
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@v3
|
|
with:
|
|
repository: ${{env.CHECKS_ORG}}/${{env.CHECKS_REPO}}
|
|
ref: ${{github.base_ref}}
|
|
path: ${{env.CHECKS_REPO}}
|
|
|
|
- name: Update system repositories
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: sudo apt update
|
|
|
|
- name: Set up GNAT toolchain (FSF)
|
|
if: matrix.os == 'ubuntu-latest'
|
|
uses: ada-actions/toolchain@ce2021
|
|
with:
|
|
distrib: fsf # faster install?
|
|
|
|
- name: Set up GNAT toolchain (Community)
|
|
if: matrix.os != 'ubuntu-latest'
|
|
uses: ada-actions/toolchain@ce2020
|
|
with:
|
|
distrib: community
|
|
|
|
- name: Set up stable `alr`
|
|
if: contains(github.base_ref, 'stable-')
|
|
uses: alire-project/setup-alire@v1
|
|
with:
|
|
toolchain: --disable-assistant # We want to use the external ones in this workflow
|
|
|
|
- name: Set up devel `alr`
|
|
if: contains(github.base_ref, 'devel-')
|
|
uses: alire-project/setup-alire@v1
|
|
with:
|
|
toolchain: --disable-assistant # We want to use the external ones in this workflow
|
|
branch: master
|
|
|
|
- name: Test crate (Linux)
|
|
if: matrix.os == 'ubuntu-latest' # docker testing only for linuxes
|
|
uses: mosteo/actions@docker-run/v1
|
|
with:
|
|
image: alire/gnat:${{matrix.tag}}
|
|
command: ${{env.CHECKS_REPO}}/scripts/gh-build-crate.sh
|
|
params: -v ${{ github.workspace }}/alire_install/bin/alr:/usr/bin/alr
|
|
|
|
- name: Install tar from msys2 (Windows) # Git tar in Actions VM does not seem to work)
|
|
if: matrix.os == 'windows-latest'
|
|
run: C:\Users\runneradmin\.cache\alire\msys64\usr\bin\pacman --noconfirm -S tar
|
|
|
|
- name: Test crate (Windows/MacOS)
|
|
if: matrix.os != 'ubuntu-latest' # native testing in Windows/MacOS
|
|
run: ${{env.CHECKS_REPO}}/scripts/gh-build-crate.sh
|
|
shell: bash
|