Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH Actions: Run incremental portability tests on "c: packages: standard" PRs #35380

Merged
merged 16 commits into from
Sep 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ on:
- 'public/build/**-runci'
pull_request:
types:
# Defaults
- opened
- synchronize
- reopened
# When a CI label is added
- labeled
workflow_dispatch:
# Allow to run manually
Expand All @@ -21,13 +26,18 @@ jobs:
test:
name: Conda
runs-on: ${{ matrix.os }}
# Run on push, workflow dispatch and when certain labels are added

# Run on push, workflow dispatch and when certain labels are added or are present
if: |
github.event.action != 'labeled' ||
github.event.label.name == 'c: packages: optional' ||
github.event.label.name == 'c: packages: standard' ||
github.event.label.name == 's: run conda ci'
github.event_name != 'pull_request' ||
((github.event.action != 'labeled' &&
(contains(github.event.pull_request.labels.*.name, 'c: packages: standard') ||
contains(github.event.pull_request.labels.*.name, 'c: packages: optional') ||
contains(github.event.pull_request.labels.*.name, 's: run conda ci'))) ||
(github.event.action == 'labeled' &&
(github.event.label.name == 'c: packages: optional' ||
github.event.label.name == 'c: packages: standard' ||
github.event.label.name == 's: run conda ci')))

strategy:
fail-fast: false
Expand Down
97 changes: 97 additions & 0 deletions .github/workflows/ci-linux-incremental.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
name: CI Linux incremental

## This GitHub Actions workflow runs SAGE_ROOT/tox.ini with select environments,
## whenever a GitHub pull request is opened or synchronized in a repository
## where GitHub Actions are enabled.
##
## 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:
types:
# Defaults
- opened
- synchronize
- reopened
# When a CI label is added
- labeled
workflow_dispatch:

concurrency:
# Cancel previous runs of this workflow for the same branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
packages: write

jobs:

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@v3
- 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
minimal:
needs: [changed_files]
if: |
github.event_name != 'pull_request' ||
((github.event.action != 'labeled' &&
(contains(github.event.pull_request.labels.*.name, 'c: packages: standard') ||
contains(github.event.pull_request.labels.*.name, 'c: packages: optional'))) ||
(github.event.action == 'labeled' &&
(github.event.label.name == 'c: packages: optional' ||
github.event.label.name == 'c: packages: standard')))
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",
"ubuntu-mantic,
"fedora-30",
"fedora-38",
"gentoo-python3.11",
"debian-bullseye-i386"]
tox_packages_factors: >-
["standard",
"minimal"]
docker_push_repository: ghcr.io/${{ github.repository }}/
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ on:
default: >-
["ubuntu-trusty-toolchain-gcc_9",
"ubuntu-xenial-toolchain-gcc_9",
"ubuntu-bionic-gcc_8",
"ubuntu-focal",
"ubuntu-jammy",
"ubuntu-kinetic",
Expand Down
6 changes: 6 additions & 0 deletions build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,8 @@ $$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2): $(3)

$(1): $$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)

$(1)-ensure: $(inst_$(1))

$(1)-$(4)-no-deps:
+@if [ -z '$$($(4))' ]; then \
echo "Error: The installation tree $(4) has been disabled" 2>&1; \
Expand Down Expand Up @@ -649,6 +651,8 @@ $(1)-build-deps: $(2)
$(1): $(2)
+$(MAKE_REC) $(1)-no-deps

$(1)-ensure: $(inst_$(1))

$(1)-no-deps:
$(AM_V_at)sage-logger -p 'sage --pip install -r "$$(SAGE_ROOT)/build/pkgs/$(1)/requirements.txt"' '$$(SAGE_LOGS)/$(1).log'

Expand Down Expand Up @@ -705,6 +709,8 @@ $$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2): $(3)

$(1): $$($(4))/$(SPKG_INST_RELDIR)/$(1)-$(2)

$(1)-ensure: $(inst_$(1))

$(1)-$(4)-no-deps:
$(PLUS)@if [ -z '$$($(4))' ]; then \
echo "Error: The installation tree $(4) has been disabled" 2>&1; \
Expand Down
6 changes: 3 additions & 3 deletions build/pkgs/kissat/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=kissat-rel-VERSION.tar.gz
sha1=abfd971d5f560ed76281ed3ed7b75e20cb445618
md5=6ef4b2efcc60c95a32581bfe59720154
cksum=1532123399
sha1=49972324939761306ee50cfa3df93cd3cd530256
md5=1d0fa246c5451e3592910f2c9a5f3476
cksum=2570717921
upstream_url=https://github.com/arminbiere/kissat/archive/refs/tags/rel-VERSION.tar.gz
2 changes: 1 addition & 1 deletion build/pkgs/kissat/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.0
3.1.0
2 changes: 1 addition & 1 deletion build/pkgs/libbraiding/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1
1.2
Loading