Skip to content

Commit

Permalink
Merge remote-tracking branch 'alire/master' into feat/unique-version
Browse files Browse the repository at this point in the history
  • Loading branch information
mosteo committed Jun 12, 2024
2 parents bcf67bb + de6c9fa commit 3ab04c9
Show file tree
Hide file tree
Showing 293 changed files with 4,074 additions and 1,832 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci-docker.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: CI Docker
# Check builds on supported Linux distributions

on:
pull_request:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
build:
name: CI on Linux

runs-on: ubuntu-latest
runs-on: ubuntu-20.04

steps:
- name: Check out repository
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
build:
name: CI on macOS

runs-on: macos-latest
runs-on: macos-12

steps:
- name: Check out repository
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/ci-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,10 @@ jobs:
fail-fast: false
matrix:
os:
- macos-latest
- macos-12
- ubuntu-latest
- windows-latest
gcc_version:
- 10
- 11
- 12
- 13
gcc_version: [10, 11, 12, 13, 14]

steps:
- name: Check out
Expand Down Expand Up @@ -60,8 +56,10 @@ jobs:
run: ./bin/alr -d -n printenv || ./bin/alr -n -v -d printenv

- shell: bash
run: mv ./bin ./bin-old
# Windows doesn't allow to replace a running exe so the next command fails otherwise
run: mv ./bin ./bin-old || { sleep 5s && 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
Expand Down
26 changes: 18 additions & 8 deletions .github/workflows/ci-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ on:
workflow_dispatch:

env:
ALIRE_OS: "windows"
ALIRE_OS: windows
MSYS64_ROOT: C:\Users\runneradmin\AppData\Local\alire\cache\msys64
MINGW64_PATH: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\mingw64\bin
MSYS2_PATH: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\usr\bin
PACMAN: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\usr\bin\pacman --noconfirm

jobs:

Expand All @@ -35,11 +39,17 @@ jobs:
- name: Build alr
run: gprbuild -j0 -p -P alr_env

- name: alr first run to install msys2
run: ./bin/alr --non-interactive help get
- name: Remove previous alr's msys2 (so a new one can be tested)
shell: pwsh
run: |
if (Test-Path "${{env.MSYS64_ROOT}}") {
Remove-Item "${{env.MSYS64_ROOT}}" -Recurse -Force }
- name: Display built alr and trigger install of msys2
run: ./bin/alr version

- name: install tar from msys2 (Git tar in Actions VM does not seem to work)
run: C:\Users\runneradmin\AppData\Local\alire\msys64\usr\bin\pacman --noconfirm -S tar
run: ${{env.PACMAN}} -S tar

- name: Install Python 3.x (required for the testsuite)
uses: actions/setup-python@v2
Expand All @@ -57,17 +67,17 @@ jobs:
run: gprinstall -p -P alr_env --prefix=${{ runner.temp }}/alr_install

- name: Install qt-installer-framework in msys2
run: C:\Users\runneradmin\AppData\Local\alire\msys64\usr\bin\pacman --noconfirm -S mingw64/mingw-w64-x86_64-qt-installer-framework
run: ${{env.PACMAN}} -S mingw64/mingw-w64-x86_64-qt-installer-framework

- name: Add msys2 /mingw64/bin to the path (for qt-installer-framework)
run: echo 'C:\Users\runneradmin\AppData\Local\alire\msys64\mingw64\bin' >> $GITHUB_PATH
run: echo '${{env.MINGW64_PATH}}' >> $GITHUB_PATH
shell: bash

- name: Install zip in msys2
run: C:\Users\runneradmin\AppData\Local\alire\msys64\usr\bin\pacman --noconfirm -S zip
run: ${{env.PACMAN}} --noconfirm -S zip

- name: Add msys2 /usr/bin to the path (for zip)
run: echo 'C:\Users\runneradmin\AppData\Local\alire\msys64\usr\bin' >> $GITHUB_PATH
run: echo '${{env.MSYS2_PATH}}' >> $GITHUB_PATH
shell: bash

- name: Run installer build script
Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
fail-fast: false # Attempt to generate as many of them as possible
matrix:
os:
- macos-latest
- ubuntu-latest
- macos-12
- ubuntu-20.04
- windows-latest

steps:
Expand All @@ -31,14 +31,10 @@ jobs:
with:
submodules: true

# Until some stable alr with `alr install` is available, we cannot rely on
# the alr-install action, as that introduces a circular dependency. If a
# nightly build were to fail, there's no way to do an `alr install` anymore
# TODO: replace with `alr-install` once alr 2.0 is out.
- name: Install FSF toolchain
uses: ada-actions/toolchain@ce2020
uses: alire-project/alr-install@v1
with:
distrib: community
crates: gnat_native gprbuild

- name: Install Python 3.x (required for the testsuite)
uses: actions/setup-python@v2
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/tarball-full.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
name: Full sources
# Create a tarball that includes everything necessary for building,
# particularly 3rd party dependencies in submodules which are not included in
# GitHub automatic source tarballs.

on:
release:
Expand Down
16 changes: 13 additions & 3 deletions BREAKING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
Log of breaking changes in index or alr.

### alr 2.0.0 + index 1.2.2
### alr 3.0.0 + index 1.3.0

- alr: removed `ALR_CONFIG` environment variable.
- alr: removed `alr config` command.

### alr 2.0.0 + index 1.3.0

- index:`binary` property required in binary origins.
- index: Paths in `[environment]` must be portable (using forward slashes).
- alr: removed `alr toolchain`'s `--install, --uninstall, --install-dir`.
- alr: deprecated (but still working) `ALR_CONFIG`, `alr config`.

### alr 1.2.2 + index 1.2.1

- Unable to load externals containing regex special characters in the system
- alr: unable to load externals containing regex special characters in the system
package name (fixed in #1545).
- Paths in `[environment]` are not converted to the native platform convention.
- alr: paths in `[environment]` are not converted to the native platform convention.
12 changes: 10 additions & 2 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
## Checklist for releasing a new version

1. [ ] Update version in `Alire.Version`.
1. [ ] Update Msys2 installer at https://github.com/msys2/msys2-installer/releases/
1. [ ] Run local-only tests (`/testsuite/run-dev.sh`)
1. [ ] Update versions
- `Alire.Version`
- `alire.toml`
- `user-changes.md`
1. [ ] Create test release in own fork.
- To verify builds succeed.
- As the Windows build can rarely fail, this provides a backup .exe
1. [ ] Create new index version branches if necessary.
1. [ ] In repo `alire-index`: create new index version branches if necessary.
- Edit index/index.toml to match.
1. [ ] Ensure the index version is the default branch in the community repos:
- alire-index
- alire-index-checks (must match alire-index)
- alire-index-staging (when it exists)
- test-index
1. [ ] Create a proper release in alire-project/alire
- Tag corresponding commit as vX.X.X (github does it if missing).
- Use autogenerated release notes.
Expand All @@ -18,3 +24,5 @@
- We used to use default in setup-alire, but by making it explicit we can
test the new release before making it the default for everyone (next step).
1. After a screening period, update default version in setup-alire repo.
- For major Alire versions with breaking changes, bump the setup-alire
version too.
73 changes: 48 additions & 25 deletions alire.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "alr"
description = "Command-line tool from the Alire project"

version = "1.3.0-dev"
version = "2.1-dev"

authors = ["Alejandro R. Mosteo", "Fabien Chouteau", "Pierre-Marie de Rodat"]
maintainers = ["[email protected]", "[email protected]"]
Expand Down Expand Up @@ -47,27 +47,50 @@ windows = { ALIRE_OS = "windows" }

# Some dependencies require precise versions during the development cycle:
[[pins]]
aaa = { url = "https://github.com/mosteo/aaa", commit = "dff61d2615cc6332fa6205267bae19b4d044b9da" }
ada_toml = { url = "https://github.com/mosteo/ada-toml", commit = "da4e59c382ceb0de6733d571ecbab7ea4919b33d" }
clic = { url = "https://github.com/alire-project/clic", commit = "de0330053584bad4dbb3dbd5e1ba939c4e8c6b55" }
dirty_booleans = { url = "https://github.com/mosteo/dirty_booleans", branch = "main" }
diskflags = { url = "https://github.com/mosteo/diskflags", branch = "main" }
gnatcoll = { url = "https://github.com/alire-project/gnatcoll-core.git", commit = "4e663b87a028252e7e074f054f8f453661397166" }
minirest = { url = "https://github.com/mosteo/minirest.git", commit = "9a9c660f9c6f27f5ef75417e7fac7061dff14d78" }
semantic_versioning = { url = "https://github.com/alire-project/semantic_versioning", commit = "2f23fc5f6b4855b836b599adf292fed9c0ed4144" }
simple_logging = { url = "https://github.com/alire-project/simple_logging", commit = "3505dc645f3eef6799a486aae223d37e88cfc4d5" }
si_units = { url = "https://github.com/mosteo/si_units", branch = "alire" }
stopwatch = { url = "https://github.com/mosteo/stopwatch", commit = "f607a63b714f09bbf6126de9851cbc21cf8666c9" }

# To disable version updating, export ALR_VERSION_DONT_PATCH with any value (even empty)

# Before building, we add the commit to the version, for unique identification:
[[actions]]
type = "pre-build"
command = ["python3", "scripts/version-patcher.py"]

# Afterwards we leave an extra note, so people manually building don't use a
# misleading commit.
[[actions]]
type = "post-build"
command = ["python3", "scripts/version-patcher.py", "_or_later"]
[pins.aaa]
url = "https://github.com/mosteo/aaa"
commit = "dff61d2615cc6332fa6205267bae19b4d044b9da"

[pins.ada_toml]
url = "https://github.com/mosteo/ada-toml"
commit = "da4e59c382ceb0de6733d571ecbab7ea4919b33d"

[pins.clic]
url = "https://github.com/alire-project/clic"
commit = "56bbdc008e16996b6f76e443fd0165a240de1b13"

[pins.dirty_booleans]
url = "https://github.com/mosteo/dirty_booleans"
branch = "alire"

[pins.diskflags]
url = "https://github.com/mosteo/diskflags"
branch = "alire"

[pins.gnatcoll]
url = "https://github.com/alire-project/gnatcoll-core.git"
commit = "4e663b87a028252e7e074f054f8f453661397166"

[pins.minirest]
url = "https://github.com/mosteo/minirest.git"
commit = "9a9c660f9c6f27f5ef75417e7fac7061dff14d78"

[pins.semantic_versioning]
url = "https://github.com/alire-project/semantic_versioning"
commit = "cc2148cf9c8934fb557b5ae49a3f7947194fa7ee"

[pins.simple_logging]
url = "https://github.com/alire-project/simple_logging"
commit = "3505dc645f3eef6799a486aae223d37e88cfc4d5"

[pins.si_units]
url = "https://github.com/mosteo/si_units"
branch = "alire"

[pins.stopwatch]
url = "https://github.com/mosteo/stopwatch"
commit = "f607a63b714f09bbf6126de9851cbc21cf8666c9"

[pins.toml_slicer]
url = "https://github.com/mosteo/toml_slicer"
branch = "alire"
32 changes: 24 additions & 8 deletions alire_common.gpr
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,30 @@ abstract project Alire_Common is
Style_Check_Switches := ();
case Style_Check_Mode is
when "enabled" => Style_Check_Switches :=
("-gnatwe", -- Warnings as errors
"-gnatyd", -- no DOS line terminators
"-gnatyI", -- no IN mode
"-gnatyO", -- all overrides
"-gnatyS", -- separate lines after THEN/ELSE
"-gnatyu", -- no unnecessary blank lines
"-gnatyx", -- no extra parens around conditionals
"-gnaty-s"); -- relax fwd decl
( "-gnatwe" -- Warnings as errors
,"-gnaty3" -- Specify indentation level of 3
,"-gnatya" -- Check attribute casing
,"-gnatyA" -- Use of array index numbers in array attributes
,"-gnatyB" -- Check Boolean operators
,"-gnatyb" -- Blanks not allowed at statement end
,"-gnatyc" -- Check comments
,"-gnatye" -- Check end/exit labels
,"-gnatyf" -- No form feeds or vertical tabs
,"-gnatyh" -- No horizontal tabs
,"-gnatyi" -- Check if-then layout
,"-gnatyI" -- check mode IN keywords
,"-gnatyk" -- Check keyword casing
,"-gnatyl" -- Check layout
,"-gnatym" -- Check maximum line length
,"-gnatyn" -- Check casing of entities in Standard
,"-gnatyO" -- Check all overriding subprograms explicitly marked
,"-gnatyp" -- Check pragma casing
,"-gnatyr" -- Check identifier references casing
,"-gnatyS" -- Check no statements after THEN/ELSE
,"-gnatyt" -- Check token spacing
,"-gnatyu" -- Check unnecessary blank lines
,"-gnatyx" -- Check extra parentheses
);
when "disabled" => Style_Check_Switches := ();
end case;

Expand Down
2 changes: 1 addition & 1 deletion deps/clic
2 changes: 1 addition & 1 deletion deps/semantic_versioning
2 changes: 1 addition & 1 deletion deps/toml_slicer
5 changes: 3 additions & 2 deletions dev/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ pushd $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) > /de
. functions.sh
popd > /dev/null

ALIRE_BUILD_JOBS="${ALIRE_BUILD_JOBS:-0}"
export ALIRE_OS=$(get_OS)

echo Building with ALIRE_OS=$ALIRE_OS...
gprbuild -j0 -r -p -P `dirname $0`/../alr_env.gpr "$@"
echo "Building with ALIRE_OS=$ALIRE_OS..."
gprbuild "-j$ALIRE_BUILD_JOBS" -r -p -P `dirname $0`/../alr_env.gpr "$@"
10 changes: 10 additions & 0 deletions dev/clean.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash

# Import reusable bits
pushd $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) > /dev/null || exit 1
. functions.sh
popd > /dev/null || exit 1

export ALIRE_OS=$(get_OS)

gprclean -f -r -Palr_env.gpr
7 changes: 7 additions & 0 deletions dev/edit.sh
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
# Import reusable bits
pushd $( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) > /dev/null || exit 1
. functions.sh
popd > /dev/null || exit 1

export ALIRE_OS=$(get_OS)

gnatstudio -P alr_env & >/dev/null 2>&1
Loading

0 comments on commit 3ab04c9

Please sign in to comment.