sagemath/sage

Add GitHub CI workflow for cygwin

mkoeppe opened this issue · 35 comments

Using choco instead of apt-cyg because it is available out of the box on GitHub Actions, and can install cygwin unattended.

CC: @embray

Component: porting: Cygwin

Author: Matthias Koeppe

Branch/Commit: 85b3c3d

Reviewer: Dima Pasechnik

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

Commit: 08279dc

Author: Matthias Koeppe

Last 10 new commits:

d110ad6use bash -l
a8f1400chdir
877cc43save pwd
9c8ea73no autocrlf
6703eb9save pwd
f6000b4fixup, prepare log artifact
ceb422cfixup
144da9euse cygpath
b47e23adebug
08279dcdo not fail fast

Description changed:

--- 
+++ 
@@ -1 +1,2 @@
+Using choco instead of apt-cyg because it is available out of the box on [GitHub](../wiki/GitHub) Actions, and can install cygwin unattended.
 
comment:3

This works pretty well already (https://github.com/mkoeppe/sage/runs/492908952?check_suite_focus=true)

Issues:

  • configure is run a second time at the beginning of make
  • a non-Cygwin python is in PATH and is picked up by sage-system-python. This should really be fixed by #29090 ("configure forgets to check whether ANY Python is available on the system").

Changed commit from 08279dc to b212213

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

2603562Reset PATH so that only cygwin binaries are used
f17762dSimplify
b212213build/pkgs/cygwin.txt: gcc -> gcc-core, gcc-c++

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

d38b04bgit config --global core.symlinks true

Changed commit from b212213 to d38b04b

comment:7

I see here in the log some probably known to Erik issue, crypt module does not build for py3

building '_crypt' extension
gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wno-unused -std=c99 -Wextra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers -Wno-cast-function-type -Werror=implicit-function-declaration -I./Include -I/cygdrive/d/a/sage/sage/local/include -I. -I/cygdrive/d/a/sage/sage/local/var/tmp/sage/build/python3-3.7.3.p1/src/Include -I/cygdrive/d/a/sage/sage/local/var/tmp/sage/build/python3-3.7.3.p1/src -c /cygdrive/d/a/sage/sage/local/var/tmp/sage/build/python3-3.7.3.p1/src/Modules/_cryptmodule.c -o build/temp.cygwin-3.1.4-x86_64-3.7/cygdrive/d/a/sage/sage/local/var/tmp/sage/build/python3-3.7.3.p1/src/Modules/_cryptmodule.o
gcc -shared -Wl,--enable-auto-image-base -L/cygdrive/d/a/sage/sage/local/lib -Wl,-rpath,/cygdrive/d/a/sage/sage/local/lib -L. -L/cygdrive/d/a/sage/sage/local/lib -Wl,-rpath,/cygdrive/d/a/sage/sage/local/lib -L. -L/cygdrive/d/a/sage/sage/local/lib -Wl,-rpath,/cygdrive/d/a/sage/sage/local/lib build/temp.cygwin-3.1.4-x86_64-3.7/cygdrive/d/a/sage/sage/local/var/tmp/sage/build/python3-3.7.3.p1/src/Modules/_cryptmodule.o -L. -L/cygdrive/d/a/sage/sage/local/lib -L/usr/local/lib -L. -lpython3.7m -o build/lib.cygwin-3.1.4-x86_64-3.7/_crypt.dll
/usr/lib/gcc/x86_64-pc-cygwin/9.2.0/../../../../x86_64-pc-cygwin/bin/ld: build/temp.cygwin-3.1.4-x86_64-3.7/cygdrive/d/a/sage/sage/local/var/tmp/sage/build/python3-3.7.3.p1/src/Modules/_cryptmodule.o: in function `crypt_crypt_impl':
/cygdrive/d/a/sage/sage/local/var/tmp/sage/build/python3-3.7.3.p1/src/Modules/_cryptmodule.c:43: undefined reference to `crypt'
/cygdrive/d/a/sage/sage/local/var/tmp/sage/build/python3-3.7.3.p1/src/Modules/_cryptmodule.c:43:(.text+0x3a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `crypt'
collect2: error: ld returned 1 exit status

maybe it's just a forgotten Cygwin package:
https://cygwin.com/packages/summary/libcrypt0.html ?

comment:8

See also #29012

Changed commit from d38b04b to 36f7b59

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

0f70082build/pkgs/cygwin.txt: gcc -> gcc-core, gcc-c++
47e4395build/pkgs/cygwin.txt: Add libcrypt0
d95e51asrc/doc/bootstrap: Generate cygwin.txt, cygwin-optional.txt
36f7b59Merge branch 't/29106/ticket-29106' into t/29295/29106+ci

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

14f2967Actually use libcrypt-devel
68314dcMerge branch 't/29106/ticket-29106' into t/29295/29106+ci

Changed commit from 36f7b59 to 68314dc

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

b263ac3Run ci-cygwin.yml also on pull request

Changed commit from 68314dc to b263ac3

comment:13

oh, right, it should have been https://cygwin.com/packages/summary/libcrypt-devel.html

New commits:

14f2967Actually use libcrypt-devel
68314dcMerge branch 't/29106/ticket-29106' into t/29295/29106+ci
b263ac3Run ci-cygwin.yml also on pull request

Changed commit from b263ac3 to 85b3c3d

Branch pushed to git repo; I updated commit sha1. This was a forced push. Last 10 new commits:

2034d61save pwd
c4e44d1fixup, prepare log artifact
193b699fixup
b652a02use cygpath
b8213bfdebug
e2f25dedo not fail fast
e56c8bdReset PATH so that only cygwin binaries are used
5fc4dd7Simplify
488fb74git config --global core.symlinks true
85b3c3dRun ci-cygwin.yml also on pull request

Changed dependencies from #29106 to none

comment:17

Rebased on 9.1.beta8

Changed commit from 85b3c3d to 8f2991d

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

d575cc1ci-cygwin.yml: Run on pull requests only
8f2991d.github/workflows/ci-cygwin.yml: Use sage-spkg -y -o

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

Changed commit from 8f2991d to 85b3c3d

comment:20

what is the point of having minimal here, as it takes too long?

comment:21

Even if it times out, it provides valuable testing of the build process for the early packages.

comment:22

But I'm working on the refinement of this workflow using several stages

comment:23

ok

Reviewer: Dima Pasechnik

Changed branch from u/mkoeppe/29106+ci to 85b3c3d