Skip to content

Commit

Permalink
gh-37998: Update conda-lock files, rename macOS conda-lock files to m…
Browse files Browse the repository at this point in the history
…atch CI Conda, remove unexplained duplicate lock files

    
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR
description below. -->
<!-- ^ For example, instead of "Fixes #12345" use "Introduce new method
to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For
example, "Fixes #12345". -->

The renaming is done so that the fix here can take effect on PR runs via
the "CI Fix" mechanism (as changes to the workflow files themselves
cannot take effect).
- Moreover, making arm64 the default platform for macOS makes sense
because all new macOS machines use this platform.

And update by running `.github/workflows/conda-lock-update.py` for all
architectures.

- Workflow matrix variables now contain `-latest`, to add tests for the
macOS x86_64 platform (runner name: `macos-13`)

- Removes some unexplained duplications (both `arm` and `arm64` files
for macOS, both `aarch` and `aarch64` for Linux)

- Fixes #37997

Author: @mkoeppe, @gmou3

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->

- [x] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation and checked the documentation
preview.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on. For example,
-->
<!-- - #12345: short description why this is a dependency -->
<!-- - #34567: ... -->

- Depends on #38033 (split out from here)
- Depends on #38034 (split out from here)
- Depends on #38222 (merged here)
    
URL: #37998
Reported by: Matthias Köppe
Reviewer(s): Kwankyu Lee
  • Loading branch information
Release Manager committed Jun 26, 2024
2 parents ab24dac + b560f4d commit 82bc2c3
Show file tree
Hide file tree
Showing 60 changed files with 12,152 additions and 13,204 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci-conda-known-test-failures.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@
"sage.rings.function_field.drinfeld_modules.morphism": {
"failed": "unreported random failure seen in https://github.com/sagemath/sage/actions/runs/6840502530/job/18599835766#step:11:10107"
},
"sage.rings.number_field.galois_group": {
"failed": "unreported failure on macOS (sort order) in GaloisGroup_v2.artin_symbol, https://github.com/sagemath/sage/actions/runs/9525536510/job/26259809272?pr=37998"
},
"sage.rings.number_field.number_field": {
"failed": "unreported failure on macOS (sort order) in NumberField_absolute.[optimized_]subfields, https://github.com/sagemath/sage/actions/runs/9525536510/job/26259809272?pr=37998"
},
"sage.rings.polynomial.multi_polynomial_ideal": {
"failed": true
},
Expand All @@ -65,6 +71,9 @@
"sage.rings.polynomial.skew_polynomial_finite_field": {
"failed": true
},
"sage.rings.qqbar": {
"failed": "unreported failure on macOS seen in https://github.com/sagemath/sage/actions/runs/9525536510/job/26259809272?pr=37998"
},
"sage.schemes.elliptic_curves.descent_two_isogeny": {
"failed": "random segfault (macOS) https://github.com/sagemath/sage/issues/36949"
},
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,16 @@ concurrency:
jobs:
test:
name: Conda
runs-on: ${{ matrix.os }}-latest
runs-on: ${{ matrix.os }}

strategy:
fail-fast: false
matrix:
# On pushes to tags or branches, test the whole matrix.
os: >-
${{ github.event_name == 'pull_request'
&& fromJson('["ubuntu"]')
|| fromJson('["ubuntu", "macos"]') }}
&& fromJson('["ubuntu-latest"]')
|| fromJson('["ubuntu-latest", "macos-latest", "macos-13"]') }}
python: >-
${{ github.event_name == 'pull_request'
&& fromJson('["3.9"]')
Expand All @@ -35,12 +36,12 @@ jobs:
# environment: [environment, environment-optional]
conda-env: [environment]
# On pull requests, only test two jobs:
# Ubuntu with Python 3.9, macOS with Python 3.11.
# Ubuntu with Python 3.9, macOS (arm64) with Python 3.11.
# Build & Test currently uses Python 3.10 (on ubuntu-jammy).
# Together, they cover the supported minor Python versions.
include: >-
${{ github.event_name == 'pull_request'
&& fromJson('[{"os": "macos", "python": "3.11", "conda-env": "environment"}]')
&& fromJson('[{"os": "macos-latest", "python": "3.11", "conda-env": "environment"}]')
|| fromJson('[]') }}
steps:
Expand Down Expand Up @@ -69,7 +70,7 @@ jobs:
channels: conda-forge
channel-priority: true
activate-environment: sage
environment-file: src/${{ matrix.conda-env }}-${{ matrix.python }}-${{ startsWith(matrix.os, 'macos') && 'macos' || 'linux' }}.yml
environment-file: src/${{ matrix.conda-env }}-${{ matrix.python }}-${{ startsWith(matrix.os, 'macos') && (startsWith(runner.arch, 'ARM') && 'macos' || 'macos-x86_64') || 'linux' }}.yml

- name: Print Conda environment
shell: bash -l {0}
Expand All @@ -89,8 +90,8 @@ jobs:
# Use --no-deps and pip check below to verify that all necessary dependencies are installed via conda.
pip install --no-build-isolation --no-deps --config-settings editable_mode=compat -v -v -e ./src
env:
SAGE_NUM_THREADS: 2
SAGE_NUM_THREADS: 5

- name: Verify dependencies
if: success() || failure()
shell: bash -l {0}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/conda-lock-update.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
platforms = {
"linux-64": "linux",
"linux-aarch64": "linux-aarch64",
"osx-64": "macos",
"osx-arm64": "macos-arm64"
"osx-64": "macos-x86_64",
"osx-arm64": "macos"
#"win-64": "win",
}
pythons = ["3.9", "3.10", "3.11"]
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/_prereq/distros/conda.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# One package per line. No need to escape special characters.
# Everything on a line after a # character is ignored.
#
compilers<=1.6.0 # 1.7 pulls in c-compiler v.16
compilers
make
m4
perl
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/gap/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
gap-defaults>=4.12.2
gap-defaults>=4.12.2,<4.13.0
24 changes: 14 additions & 10 deletions build/pkgs/gap/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,21 @@ SAGE_SPKG_CONFIGURE([gap], [
sage_spkg_install_gap=yes
m4_pushdef([GAP_MINVER],["4.12.2"])
m4_pushdef([GAP_LTVER],["4.13.0"])
SAGE_SPKG_DEPCHECK([ncurses readline zlib], [
AC_PATH_PROG(GAP, gap)
AS_IF([test -n "${GAP}"], [
AC_MSG_CHECKING([for gap version GAP_MINVER or newer])
# GAP will later add the "user" path to the list of root paths
# so long as we don't initialize GAP with -r in Sage. But we
# don't want to include it in the hard-coded list.
AC_MSG_CHECKING([for gap version >= GAP_MINVER, < GAP_LTVER])
dnl GAP will later add the "user" path to the list of root paths
dnl so long as we don't initialize GAP with -r in Sage. But we
dnl don't want to include it in the hard-coded list.
GAPRUN="${GAP} -r -q --bare --nointeract -c"
_cmd='Display(GAPInfo.KernelInfo.KERNEL_VERSION);'
GAP_VERSION=$( ${GAPRUN} "${_cmd}" 2>/dev/null )
AX_COMPARE_VERSION(["${GAP_VERSION}"], [ge], [GAP_MINVER], [
AX_COMPARE_VERSION(["${GAP_VERSION}"], [ge], [GAP_MINVER], [dnl
AC_MSG_RESULT([yes])
AX_COMPARE_VERSION(["${GAP_VERSION}"], [lt], [GAP_LTVER], [dnl
AC_MSG_RESULT([yes])
AC_MSG_CHECKING([for gap root paths])
_cmd='Display(JoinStringsWithSeparator(GAPInfo.RootPaths,";"));'
Expand Down Expand Up @@ -66,18 +68,20 @@ SAGE_SPKG_CONFIGURE([gap], [
AC_LANG_POP
LIBS="${_old_libs}"
])
], [
# The gap command itself failed
], [dnl The gap command itself failed
AC_MSG_RESULT([no (package check command failed)])
])
])
],[
# Version too old
], [dnl Version too new
AC_MSG_RESULT([no])
])
], [dnl Version too old
AC_MSG_RESULT([no])
])
])
])
m4_popdef([GAP_LTVER])
m4_popdef([GAP_MINVER])
],[],[],[
# This is the post-check phase, where we make sage-conf
Expand Down
1 change: 1 addition & 0 deletions build/pkgs/rpy2/distros/conda.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
rpy2
r-lattice
193 changes: 0 additions & 193 deletions environment-3.10-linux-aarch.yml

This file was deleted.

Loading

0 comments on commit 82bc2c3

Please sign in to comment.