Skip to content

add givaro's PR 240 for modern C++/clang #896

add givaro's PR 240 for modern C++/clang

add givaro's PR 240 for modern C++/clang #896

Workflow file for this run

name: CI (Distro)
## This GitHub Actions workflow builds and tests sage-the-distro on various platforms
## whenever a tag is pushed or a pull request changes relevant build files.
##
## It builds and checks some sage spkgs as defined in TARGETS.
##
## A job succeeds if there is no error.
##
## The build is run with "make V=0", so the build logs of individual packages are suppressed.
##
## At the end, all package build logs that contain an error are printed out.
##
## After all jobs have finished (or are canceled) and a short delay,
## tar files of all logs are made available as "build artifacts".
on:
pull_request:
paths:
- '.github/workflows/ci-distro.yml'
- 'build/pkgs/**'
- 'build/make/**'
- 'configure.ac'
push:
tags:
- '*'
workflow_dispatch:
# Allow to run manually
env:
TARGETS_PRE: all-sage-local
TARGETS: build
TARGETS_OPTIONAL: ptestlong
permissions:
packages: write
concurrency:
# Cancel previous runs of this workflow for the same branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linux-minimal:
if: ${{ success() || failure() }}
uses: ./.github/workflows/docker.yml
with:
# Build from scratch
free_disk_space: true
docker_targets: "with-system-packages configured with-targets-pre with-targets with-targets-optional"
# FIXME: duplicated from env.TARGETS
targets_pre: all-sage-local
targets: build
targets_optional: ptestlong
tox_system_factors: >-
["ubuntu-noble"]
tox_packages_factors: >-
["minimal"]
docker_push_repository: ghcr.io/${{ github.repository }}/
linux:
uses: ./.github/workflows/docker.yml
with:
free_disk_space: true
# Build from scratch
docker_targets: "with-system-packages configured with-targets-pre with-targets with-targets-optional"
targets_pre: all-sage-local
targets: build
targets_optional: ptestlong
tox_packages_factors: >-
["standard"]
docker_push_repository: ghcr.io/${{ github.repository }}/
macos:
name: Build and Test (macos-${{ matrix.version }})
runs-on: macos-${{ matrix.version }}
strategy:
fail-fast: false
matrix:
version:
- '15'
- '26'
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install Python packages
run: |
pip install setuptools
- name: Install dependencies
run: |
eval $(build/bin/sage-print-system-package-command homebrew update)
eval $(build/bin/sage-print-system-package-command homebrew --yes --ignore-missing install $(build/bin/sage-get-system-packages homebrew _bootstrap _prereq $(build/bin/sage-package list :standard:)))
brew install libomp Macaulay2/homebrew-tap/gfan Macaulay2/homebrew-tap/linbox
- name: Build
run: |
source ./.homebrew-build-env
./bootstrap
./configure --enable-download-from-upstream-url --with-darwin-accelerate
make build V=0
env:
MAKE: 'make -j6'
- name: Test
continue-on-error: true
run: |
source ./.homebrew-build-env # Needed so that runtime cython can find the dependencies
./sage -t --all -p4