Refactor commonalities and general tidy-up
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
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.
|
||||
|
||||
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/alire-index-checks
|
||||
ref: ${{ github.base_ref }}
|
||||
path: alire-index-checks
|
||||
@@ -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 }}
|
||||
@@ -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,41 +41,20 @@ 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
|
||||
with:
|
||||
image: ghcr.io/alire-project/docker/gnat:${{matrix.tag}}
|
||||
command: ${{env.CHECKS_REPO}}/scripts/gh-build-crate.sh
|
||||
command: alire-index-checks/scripts/gh-build-crate.sh
|
||||
params: >
|
||||
-v ${{ github.workspace }}/alire_install/bin/alr:/usr/bin/alr
|
||||
-v ${{ github.event_path}}:/etc/event.json
|
||||
|
||||
@@ -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,33 +42,20 @@ 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
|
||||
|
||||
- name: Test crate
|
||||
run: ${{env.CHECKS_REPO}}/scripts/gh-build-crate.sh
|
||||
run: alire-index-checks/scripts/gh-build-crate.sh
|
||||
shell: bash
|
||||
env:
|
||||
GITHUB_EVENT_PATH: ${{ github.event_path }}
|
||||
|
||||
@@ -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,42 +39,19 @@ 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
|
||||
|
||||
- name: Test crate
|
||||
run: ${{env.CHECKS_REPO}}/scripts/gh-build-crate.sh
|
||||
run: alire-index-checks/scripts/gh-build-crate.sh
|
||||
shell: bash
|
||||
env:
|
||||
GITHUB_EVENT_PATH: ${{ github.event_path }}
|
||||
|
||||
@@ -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)
|
||||
@@ -66,7 +54,7 @@ jobs:
|
||||
run: echo '-x11 +no_x11 +quartz' >> /opt/local/etc/macports/variants.conf
|
||||
|
||||
- name: Test crate
|
||||
run: ${{env.CHECKS_REPO}}/scripts/gh-build-crate.sh
|
||||
run: alire-index-checks/scripts/gh-build-crate.sh
|
||||
shell: bash
|
||||
env:
|
||||
GITHUB_EVENT_PATH: ${{ github.event_path }}
|
||||
|
||||
@@ -5,6 +5,13 @@ on:
|
||||
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
|
||||
|
||||
@@ -5,6 +5,13 @@ on:
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -17,37 +17,21 @@ on:
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
env:
|
||||
CHECKS_ORG: alire-project
|
||||
CHECKS_REPO: alire-index-checks
|
||||
ALR_VERSION: 2.1.0
|
||||
|
||||
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 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`
|
||||
- name: Set up `alr`
|
||||
if: inputs.setup_alr
|
||||
uses: alire-project/setup-alire@v5
|
||||
with:
|
||||
version: ${{env.ALR_VERSION}}
|
||||
uses: ./.github/actions/setup-alr
|
||||
|
||||
- name: Run check
|
||||
run: >
|
||||
${{env.CHECKS_REPO}}/scripts/${{inputs.script}}
|
||||
"${{inputs.script_arg}}"
|
||||
alire-index-checks/scripts/${{inputs.script}}
|
||||
"$SCRIPT_ARG"
|
||||
shell: bash
|
||||
env:
|
||||
SCRIPT_ARG: ${{inputs.script_arg}}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,35 +24,14 @@ 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
|
||||
run: alire-index-checks/scripts/diff-release.sh || true # No deal breaker if failed
|
||||
shell: bash
|
||||
|
||||
Reference in New Issue
Block a user