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

ci-cygwin.yml: Multi-stage build #29403

Closed
mkoeppe opened this issue Mar 25, 2020 · 63 comments
Closed

ci-cygwin.yml: Multi-stage build #29403

mkoeppe opened this issue Mar 25, 2020 · 63 comments

Comments

@mkoeppe
Copy link
Contributor

mkoeppe commented Mar 25, 2020

The GitHub workflow for cygwin does not fit into the 6-hour time limit.
We do a multi-stage build, saving and loading local/ to/from build artifacts.

Depends on #29417
Depends on #29392

CC: @dimpase @embray @slel @jpflori @tscrim @vbraun @kcrisman

Component: porting: Cygwin

Author: Matthias Koeppe

Branch/Commit: 27ddea3

Reviewer: Dima Pasechnik

Issue created by migration from https://trac.sagemath.org/ticket/29403

@mkoeppe mkoeppe added this to the sage-9.1 milestone Mar 25, 2020
@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 25, 2020

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 25, 2020

Commit: 79bee2f

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 25, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

79bee2fci-cygwin.yml: Remove sage-spkg -y -o

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 26, 2020

Changed commit from 79bee2f to cef0d73

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 26, 2020

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

cd0a0echandle symlinks
5a387d0Use winsymlinks:native
122f972Full targets
424d86eprepare the final logs artifact
f646274store local/var/tmp/sage/build in logs artifact
6924328stage 1
97d3f86touch installation records to get same mtime
5939bc7Upload log artifact first
59d20e0stage 4
cef0d73more stages

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 26, 2020

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 26, 2020

Dependencies: #29397

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 29, 2020

comment:6

Something is still triggering rebuilds of targets that have been built in a previous stage.

@dimpase
Copy link
Member

dimpase commented Mar 29, 2020

comment:7

I'd suspect it's the toolchain crud.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 29, 2020

Changed dependencies from #29397 to none

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 29, 2020

comment:9

I'm running one test with MAKE="make --debug=verbose" to see what's happening there

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 30, 2020

Changed commit from cef0d73 to de50cf8

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Mar 30, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

de50cf8better touch

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 30, 2020

Author: Matthias Koeppe

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Mar 31, 2020

comment:13

This works pretty well now.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 4, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

9db2311.github/workflows/ci-cygwin.yml: Edit targets
9f38852cygwin: Add minimal and standard-python2 builds

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 4, 2020

Changed commit from de50cf8 to 9f38852

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 5, 2020

comment:15

New failure mode: https://github.com/mkoeppe/sage/runs/560884908

"/cygdrive/d/a/sage/sage/local/lib/python3.7/subprocess.py", line 775, in __init__
  [backports_abc-0.5]       restore_signals, start_new_session)
  [backports_abc-0.5]     File "/cygdrive/d/a/sage/sage/local/lib/python3.7/subprocess.py", line 1453, in _execute_child
  [backports_abc-0.5]       restore_signals, start_new_session, preexec_fn)
  [backports_abc-0.5]   BlockingIOError: [Errno 11] Resource temporarily unavailable
  [backports_abc-0.5]   Cleaning up...

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 5, 2020

comment:16

https://github.com/mkoeppe/sage/runs/560884917

Installing backports_abc-0.5
      0 [main] python3.7 16471 child_info_fork::abort: address space needed by 'cyglzma-5.dll' (0x400000) is already occupied
Installing package backports_abc using pip3
      0 [main] python3.7 16554 child_info_fork::abort: address space needed by 'cyglzma-5.dll' (0x400000) is already occupied
Ignoring indexes: https://pypi.org/simple

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 5, 2020

comment:17

https://github.com/mkoeppe/sage/runs/560884917

 [r-3.6.2.p0]   gcc -I../../src/extra -I../../src/extra/xdr -I. -I../../src/include -I../../src/include -I/cygdrive/d/a/sage/sage/local/include  -I../../src/nmath -DHAVE_CONFIG_H   -fopenmp   -g -O2  -fPIC  -c version.c -o version.o
  [r-3.6.2.p0]   sysutils.c:554:10: fatal error: iconv.h: No such file or directory
  [r-3.6.2.p0]     554 | #include <iconv.h>
  [r-3.6.2.p0]         |          ^~~~~~~~~
  [r-3.6.2.p0]   compilation terminated.

@dimpase
Copy link
Member

dimpase commented Apr 5, 2020

comment:18

Replying to @mkoeppe:

New failure mode: https://github.com/mkoeppe/sage/runs/560884908

"/cygdrive/d/a/sage/sage/local/lib/python3.7/subprocess.py", line 775, in __init__
  [backports_abc-0.5]       restore_signals, start_new_session)
  [backports_abc-0.5]     File "/cygdrive/d/a/sage/sage/local/lib/python3.7/subprocess.py", line 1453, in _execute_child
  [backports_abc-0.5]       restore_signals, start_new_session, preexec_fn)
  [backports_abc-0.5]   BlockingIOError: [Errno 11] Resource temporarily unavailable
  [backports_abc-0.5]   Cleaning up...

welcome to Cygwin rebase Hell.
One might need to call one of these src/bin/sage-rebase* (sacrificing a black chicken might be a pre-req).

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 8, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

62f4aa5build/pkgs/cygwin.txt: Add libiconv-devel
0a53429.github/workflows/ci-cygwin.yml: Call rebaseall after extracting SAGE_LOCAL archive

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 8, 2020

Changed commit from 9f38852 to 0a53429

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 9, 2020

comment:21

In https://github.com/mkoeppe/sage/runs/572730280 (cygwin-stage-ii-a (minimal)), despite rebasing in the "Extract sage-local artifact" step, I am still getting _fork::abort: address space needed by 'cyglzma-5.dll' (0x400000) is already occupied when building packages

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 9, 2020

comment:23

#29486 cygwin-standard: rpy2 fails to build

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 9, 2020

comment:24

cygwin-stage-ii-b (minimal) times out - https://github.com/mkoeppe/sage/runs/572730298 - may need to rebalance stages

@dimpase
Copy link
Member

dimpase commented Apr 17, 2020

comment:37

with these multi-stage builds, where *.so get built at one place, and moved then somewhere esle, it could be that more rebasing is needed. In particular, I recall seeing and fixing rebase locations for Python modules being built.
(Basically it was the issue that totally broke building Sage on Cygwin32, simply due to insufficient address space).

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 17, 2020

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 17, 2020

comment:39

Yes, I'm rebasing after unpacking local from the previous stages.

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 17, 2020

comment:40

I think it's working now, and we can see the real build errors again in cygwin-standard: matplotlib, rpy2, scipy (likely BLAS-related) https://github.com/mkoeppe/sage/runs/596536457

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 17, 2020

Changed commit from ffdc97e to fc61002

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 17, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

fc61002ci-cygwin.yml: Package up SAGE_LOCAL/var/tmp/sage/build to avoid error with actions/upload-artifact

@dimpase
Copy link
Member

dimpase commented Apr 18, 2020

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 18, 2020

comment:44

I cannot reproduce the matplotlib build error locally - even when I download and unpack stage-i-a and stage-i-b (standard) and configure against that.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 18, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

59ec460./configure --enable-experimental-packages --enable-download-from-upstream-url
c9cf3ccMerge branch 't/29392/__configure___enable_experimental_packages___enable_download_from_upstream_url' into t/29403/ci_cygwin_yml__multi_stage_build
037f508tox.yml: Pass CONFIGURE_ARGS: --enable-experimental-packages --enable-download-from-upstream-url

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 18, 2020

Changed commit from fc61002 to 037f508

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 18, 2020

Changed dependencies from #29417 to #29417, #29392

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 18, 2020

Changed commit from 037f508 to 998f02d

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 18, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

998f02dci-cygwin.yml: Fixup for: Package up SAGE_LOCAL/var/tmp/sage/build

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 18, 2020

Changed commit from 998f02d to d6bf4b1

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 18, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

d6bf4b1ci-cygwin.yml: Install standard system packages also for 'stndard-python2'

@dimpase
Copy link
Member

dimpase commented Apr 18, 2020

comment:49

how does one need to modify ~/.github/ to make GH Actions only run cygwin tests?

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 18, 2020

comment:50

Replying to @dimpase:

how does one need to modify ~/.github/ to make GH Actions only run cygwin tests?

Just delete the file tox.yml

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 18, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

2779e24ci-cygwin.yml: Another fixup for: Package up SAGE_LOCAL/var/tmp/sage/build

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 18, 2020

Changed commit from d6bf4b1 to 2779e24

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 19, 2020

Changed commit from 2779e24 to 27ddea3

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Apr 19, 2020

Branch pushed to git repo; I updated commit sha1. New commits:

27ddea3build/bin/sage-logger: Back out an experimental change

@dimpase
Copy link
Member

dimpase commented Apr 19, 2020

Reviewer: Dima Pasechnik

@mkoeppe
Copy link
Contributor Author

mkoeppe commented Apr 20, 2020

comment:54

Thanks!

@vbraun
Copy link
Member

vbraun commented Apr 23, 2020

Changed branch from u/mkoeppe/ci_cygwin_yml__multi_stage_build to 27ddea3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants