Compare commits

...

4 Commits

Author SHA1 Message Date
Alejandro R. Mosteo 41424df44d Remove hard-coded repo 2026-05-22 17:51:39 +02:00
Alejandro R. Mosteo 2e187a6e2c Refactor commonalities and general tidy-up 2026-05-22 17:47:42 +02:00
Alejandro R. Mosteo 23a2d783a2 Touch libhello to trigger tests 2026-05-22 17:13:37 +02:00
Alejandro R. Mosteo 17f2b68db5 New crate name check, plus reusable workflow 2026-05-22 17:09:50 +02:00
14 changed files with 237 additions and 197 deletions
+31
View File
@@ -0,0 +1,31 @@
name: Check out index repos
description: >
Check out alire-index with full history (needed by diff detectors
and check-author; grafted partial branches cause confusion), and
alire-index-checks checked out at the PR base branch.
Also exports CHECKS_REPO for use in subsequent run steps.
inputs:
checks_repo:
description: Name of the checks repository.
required: false
default: alire-index-checks
runs:
using: composite
steps:
- name: Check out alire-index
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check out alire-index-checks
uses: actions/checkout@v4
with:
repository: alire-project/${{ inputs.checks_repo }}
ref: ${{ github.base_ref }}
path: ${{ inputs.checks_repo }}
- name: Export CHECKS_REPO
shell: bash
run: echo "CHECKS_REPO=${{ inputs.checks_repo }}" >> "$GITHUB_ENV"
+45
View File
@@ -0,0 +1,45 @@
name: Set up alr
description: >
Install alr, stable or devel, based on the PR target branch.
The stable version is provided here as the single authoritative source.
inputs:
version:
description: Stable alr version to install; update here to bump.
required: false
default: '2.1.0'
toolchain:
description: >
Passed verbatim to setup-alire's toolchain input
(e.g. --disable-assistant). Omit to use the action default.
required: false
default: ''
runs:
using: composite
steps:
- name: Set up stable `alr`
if: contains(github.base_ref, 'stable-') && inputs.toolchain == ''
uses: alire-project/setup-alire@v5
with:
version: ${{ inputs.version }}
- name: Set up stable `alr` (custom toolchain)
if: contains(github.base_ref, 'stable-') && inputs.toolchain != ''
uses: alire-project/setup-alire@v5
with:
version: ${{ inputs.version }}
toolchain: ${{ inputs.toolchain }}
- name: Set up devel `alr`
if: contains(github.base_ref, 'devel-') && inputs.toolchain == ''
uses: alire-project/setup-alire@v5
with:
branch: master
- name: Set up devel `alr` (custom toolchain)
if: contains(github.base_ref, 'devel-') && inputs.toolchain != ''
uses: alire-project/setup-alire@v5
with:
branch: master
toolchain: ${{ inputs.toolchain }}
-38
View File
@@ -1,38 +0,0 @@
name: Check Author
env:
CHECKS_ORG: alire-project
CHECKS_REPO: alire-index-checks
ALR_VERSION: 2.1.0
on:
pull_request:
paths:
- 'index/**.toml'
jobs:
check:
runs-on: ubuntu-latest
steps:
- 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.
- 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`
uses: alire-project/setup-alire@v5
with:
version: ${{env.ALR_VERSION}}
- name: Test authorship
run: ${{env.CHECKS_REPO}}/scripts/check-author.sh "${{ github.event.pull_request.user.login }}"
shell: bash
+14 -32
View File
@@ -4,16 +4,19 @@ 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.1.0
on:
pull_request:
paths:
- 'index/**.toml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
build:
@@ -38,35 +41,14 @@ jobs:
- 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 repos
uses: ./.github/actions/checkout-repos
- name: Check out alire-index-checks
uses: actions/checkout@v4
- name: Set up `alr`
uses: ./.github/actions/setup-alr
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@v5
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@v5
with:
toolchain: --disable-assistant # We want to use the external ones in this workflow
branch: master
# External distro toolchain is used; skip Alire's own
toolchain: --disable-assistant
- name: Test crate (${{matrix.tag}})
uses: mosteo-actions/docker-run@v1
+11 -19
View File
@@ -2,14 +2,11 @@
# When the same index version is used by various stable and devel `alr`
# versions, we want to make sure all of them understand the index properly.
# Besides, there are
name: Build Crate (alr dev)
# Build the crate with a native toolchain from Alire
env:
CHECKS_ORG: alire-project
CHECKS_REPO: alire-index-checks
PACMAN: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\usr\bin\pacman
on:
@@ -17,6 +14,14 @@ on:
paths:
- 'index/**.toml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
build:
@@ -37,28 +42,15 @@ jobs:
- windows-latest
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: Check out repos
uses: ./.github/actions/checkout-repos
- name: Set up devel `alr`
uses: alire-project/setup-alire@v5
with:
branch: 'master'
- name: Install tar from msys2 (Windows) # Git tar in Actions VM does not seem to work)
- name: Install tar from msys2 (Windows) # Git tar in Actions VM does not seem to work
if: matrix.os == 'windows-latest'
run: ${{env.PACMAN}} --noconfirm -S tar
+13 -31
View File
@@ -4,9 +4,6 @@ name: Build Crate (Alire toolchain)
# Build the crate with a native toolchain from Alire
env:
CHECKS_ORG: alire-project
CHECKS_REPO: alire-index-checks
ALR_VERSION: 2.1.0
PACMAN: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\usr\bin\pacman
on:
@@ -14,6 +11,14 @@ on:
paths:
- 'index/**.toml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
build:
@@ -34,37 +39,14 @@ jobs:
- windows-latest
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: Check out repos
uses: ./.github/actions/checkout-repos
# By default, this also sets up the newest indexed native toolchain
- name: Set up stable `alr`
if: contains(github.base_ref, 'stable-')
uses: alire-project/setup-alire@v5
with:
version: ${{env.ALR_VERSION}}
- name: Set up `alr`
uses: ./.github/actions/setup-alr
# By default, this also sets up the newest indexed native toolchain
- name: Set up devel `alr`
if: contains(github.base_ref, 'devel-')
uses: alire-project/setup-alire@v5
with:
branch: 'master'
- name: Install tar from msys2 (Windows) # Git tar in Actions VM does not seem to work)
- name: Install tar from msys2 (Windows) # Git tar in Actions VM does not seem to work
if: matrix.os == 'windows-latest'
run: ${{env.PACMAN}} --noconfirm -S tar
+12 -24
View File
@@ -6,16 +6,19 @@
name: Build Crate (MacPorts)
# Build the crate with a native toolchain from Alire
env:
CHECKS_ORG: alire-project
CHECKS_REPO: alire-index-checks
ALR_VERSION: 2.1.0
on:
pull_request:
paths:
- 'index/**.toml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
jobs:
build:
@@ -33,26 +36,11 @@ jobs:
- macos-latest # arm64
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 repos
uses: ./.github/actions/checkout-repos
- 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`
uses: alire-project/setup-alire@v5
with:
version: ${{env.ALR_VERSION}}
- name: Set up `alr`
uses: ./.github/actions/setup-alr
- name: Disable Homebrew
run: rm -f $(which brew)
+21
View File
@@ -0,0 +1,21 @@
name: Check Author
on:
pull_request:
paths:
- 'index/**.toml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check:
uses: ./.github/workflows/check-with-script.yml
with:
script: check-author.sh
script_arg: ${{github.event.pull_request.user.login}}
setup_alr: true
+20
View File
@@ -0,0 +1,20 @@
name: Check Crate Name
on:
pull_request:
paths:
- 'index/**.toml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check:
uses: ./.github/workflows/check-with-script.yml
with:
script: check-crate-name.sh
script_arg: ${{github.event.pull_request.title}}
+19 -20
View File
@@ -1,35 +1,34 @@
name: Check Index
env:
ALR_VERSION: 2.1.0
on: pull_request
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
check:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up stable `alr`
if: contains(github.base_ref, 'stable-')
uses: alire-project/setup-alire@v5
with:
version: ${{env.ALR_VERSION}}
- name: Set up `alr`
uses: ./.github/actions/setup-alr
- name: Set up devel `alr`
if: contains(github.base_ref, 'devel-')
uses: alire-project/setup-alire@v5
with:
branch: master
- name: List current index
run: alr index --list
- run: alr index --list
- run: alr index --add=. --name=local_index
- name: Add local index
run: alr index --add=. --name=local_index
# Check index contents for unknown config variables
- run: alr index --check
- name: Check index
run: alr index --check
- run: alr index --update-all
- name: Update index
run: alr index --update-all
- run: alr search --crates
- name: List crates
run: alr search --crates
+37
View File
@@ -0,0 +1,37 @@
name: Check With Script
on:
workflow_call:
inputs:
script:
description: Script filename under alire-index-checks/scripts/
required: true
type: string
script_arg:
description: Single argument passed to the script
required: true
type: string
setup_alr:
description: Whether to install alr before running the script
required: false
type: boolean
default: false
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Check out repos
uses: ./.github/actions/checkout-repos
- name: Set up `alr`
if: inputs.setup_alr
uses: ./.github/actions/setup-alr
- name: Run check
run: >
${{env.CHECKS_REPO}}/scripts/${{inputs.script}}
"$SCRIPT_ARG"
shell: bash
env:
SCRIPT_ARG: ${{inputs.script_arg}}
+1 -1
View File
@@ -12,7 +12,7 @@ jobs:
steps:
- uses: actions/stale@v7
with:
debug-only : false # Set to true to work in dry-run mode
debug-only: false # Set to true to work in dry-run mode
stale-pr-message: 'This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
close-pr-message: 'This PR was closed because it has been stalled for 90 days with no activity.'
days-before-stale: 60
+12 -31
View File
@@ -5,16 +5,18 @@
name: Diff release
env:
CHECKS_ORG: alire-project
CHECKS_REPO: alire-index-checks
ALR_VERSION: 2.1.0
on:
pull_request:
paths:
- 'index/**.toml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
DIFF:
@@ -22,34 +24,13 @@ jobs:
runs-on: ubuntu-latest
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 detector
- name: Check out repos
uses: ./.github/actions/checkout-repos
- name: Check out alire-index-checks
uses: actions/checkout@v4
- name: Set up `alr`
uses: ./.github/actions/setup-alr
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@v5
with:
toolchain: --disable-assistant # We don't need the compiler
version: ${{env.ALR_VERSION}}
- name: Set up devel `alr`
if: contains(github.base_ref, 'devel-')
uses: alire-project/setup-alire@v5
with:
toolchain: --disable-assistant # We don't need the compiler
branch: master
toolchain: --disable-assistant # No compiler needed
- name: <<DIFF RELEASES>>
run: ${{env.CHECKS_REPO}}/scripts/diff-release.sh || true # No deal breaker if failed
+1 -1
View File
@@ -15,4 +15,4 @@ url = "git+https://github.com/alire-project/libhello.git"
# We use this crate as a trigger to conveniently test minor changes to
# metaprocesses of the CI of the repository itself.
# Last touch: 2025-12-13 18:31 CET
# Last touch: 2026-05-22 17:51 CEST