Skip to content

Commit

Permalink
.github/workflows/build.yml: Merge ci-linux-incremental.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Oct 12, 2023
1 parent 8e25cbd commit 459da44
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 132 deletions.
92 changes: 92 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,31 @@ jobs:
path: upstream
name: upstream

changed_files:
runs-on: ubuntu-latest
name: List changed packages
outputs:
uninstall_targets: ${{ steps.build-targets.outputs.uninstall_targets }}
build_targets: ${{ steps.build-targets.outputs.build_targets }}
steps:
- uses: actions/checkout@v4
- name: Get all packages that have changed
id: changed-packages
uses: tj-actions/changed-files@v38
with:
files_yaml: |
configures:
- 'build/pkgs/*/spkg-configure.m4'
pkgs:
- 'build/pkgs/**'
- 'pkgs/**'
- name: Determine targets to build
id: build-targets
run: |
echo "uninstall_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.configures_all_changed_files }}; do echo $a | sed -E 's,build/pkgs/([_.a-z0-9]*)/spkg-configure[.]m4 *,\1-uninstall,'; done | sort -u))" >> $GITHUB_OUTPUT
echo "build_targets=$(echo $(for a in '' ${{ steps.changed-packages.outputs.pkgs_all_changed_files }}; do echo $a | sed -E 's,-,_,g;s,(build/)?pkgs/([-_.a-z0-9]*)/[^ ]* *,\2-ensure,;'; done | sort -u))" >> $GITHUB_OUTPUT
cat $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
container: ghcr.io/sagemath/sage/sage-${{ github.event.inputs.platform || 'ubuntu-focal-standard' }}-with-targets:${{ github.event.inputs.docker_tag || 'dev'}}
Expand Down Expand Up @@ -163,6 +188,73 @@ jobs:
with:
files: ./worktree-image/coverage.xml

linux-standard:
needs: [changed_files]
if: "${{needs.changed_files.outputs.uninstall_targets}}${{needs.changed_files.outputs.build_targets}}"
uses: ./.github/workflows/docker.yml
with:
# Build incrementally from published Docker image
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/sagemath/sage/
from_docker_target: "with-targets"
from_docker_tag: "dev"
docker_targets: "with-targets"
targets: "${{needs.changed_files.outputs.uninstall_targets}} ${{needs.changed_files.outputs.build_targets}} build doc-html ptest"
tox_system_factors: >-
["ubuntu-focal", "ubuntu-jammy", "ubuntu-mantic", "debian-bullseye", "debian-bookworm",
"fedora-30", "fedora-38", "gentoo-python3.11", "debian-bullseye-i386"]
tox_packages_factors: >-
["standard"]
docker_push_repository: ghcr.io/${{ github.repository }}/
permissions:
packages: write

linux-standard-sitepackages:
needs: [changed_files]
if: "${{needs.changed_files.outputs.uninstall_targets}}${{needs.changed_files.outputs.build_targets}}"
uses: ./.github/workflows/docker.yml
with:
# Build incrementally from published Docker image
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/sagemath/sage/
from_docker_target: "with-targets"
from_docker_tag: "dev"
docker_targets: "with-targets"
targets: "${{needs.changed_files.outputs.uninstall_targets}} ${{needs.changed_files.outputs.build_targets}} build doc-html ptest"
# Only test systems with a usable system python (>= 3.9)
tox_system_factors: >-
["ubuntu-jammy", "ubuntu-mantic", "debian-bullseye", "debian-bookworm",
"fedora-33", "fedora-38", "gentoo-python3.11", "archlinux", "debian-bullseye-i386"]
tox_packages_factors: >-
["standard-sitepackages"]
docker_push_repository: ghcr.io/${{ github.repository }}/
permissions:
packages: write

linux-minimal:
needs: [changed_files]
if: "${{needs.changed_files.outputs.uninstall_targets}}${{needs.changed_files.outputs.build_targets}}"
uses: ./.github/workflows/docker.yml
with:
# Build incrementally from published Docker image
incremental: true
free_disk_space: true
from_docker_repository: ghcr.io/sagemath/sage/
from_docker_target: "with-targets"
from_docker_tag: "dev"
docker_targets: "with-targets"
targets: "${{needs.changed_files.outputs.uninstall_targets}} ${{needs.changed_files.outputs.build_targets}} build doc-html ptest"
tox_system_factors: >-
["ubuntu-focal", "ubuntu-jammy", "ubuntu-mantic", "debian-bullseye", "debian-bookworm",
"fedora-30", "fedora-38", "gentoo-python3.11", "debian-bullseye-i386"]
tox_packages_factors: >-
["minimal"]
docker_push_repository: ghcr.io/${{ github.repository }}/
permissions:
packages: write

build-docs:
runs-on: ubuntu-latest
container: ghcr.io/sagemath/sage/sage-ubuntu-focal-standard-with-targets:dev
Expand Down
132 changes: 0 additions & 132 deletions .github/workflows/ci-linux-incremental.yml

This file was deleted.

0 comments on commit 459da44

Please sign in to comment.