42
42
push :
43
43
tags :
44
44
- ' *'
45
+ workflow_dispatch :
46
+ # Allow to run manually
45
47
46
48
env :
47
49
# Ubuntu packages to install so that the project's "make dist" can succeed
48
- DIST_PREREQ :
50
+ DIST_PREREQ : tar
49
51
# Name of this project in the Sage distribution
50
52
SPKG : flint
51
53
# Sage distribution packages to build
63
65
64
66
jobs :
65
67
68
+ ubuntu-gcc :
69
+ runs-on : ubuntu-latest
70
+ steps :
71
+ - uses : actions/checkout@v2
72
+ - run : |
73
+ sudo apt-get install texinfo
74
+ ./.build_dependencies
75
+ ./configure CFLAGS="-Wredundant-decls" --with-mpir=${LOCAL} --with-mpfr=${LOCAL} --prefix=${LOCAL}
76
+ $MAKE
77
+ ldd libflint.so
78
+ $MAKE check
79
+ env:
80
+ LOCAL: ${{ github.workspace }}/local
81
+ LDFLAGS: "-Wl,-rpath,$LOCAL/lib"
82
+ MAKE: "make -j"
83
+
84
+ ubuntu-cmake-gcc :
85
+ runs-on : ubuntu-latest
86
+ steps :
87
+ - uses : actions/checkout@v2
88
+ - run : |
89
+ sudo apt-get install texinfo
90
+ sudo apt-get install cmake
91
+ ./.build_dependencies
92
+ mkdir build
93
+ cd build
94
+ cmake -G"Unix Makefiles" -DWITH_NTL=no -DBUILD_TESTING=yes -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$LOCAL ..
95
+ $MAKE
96
+ ldd lib/libflint.so
97
+ env:
98
+ LOCAL: ${{ github.workspace }}/local
99
+ LDFLAGS: "-Wl,-rpath,$LOCAL/lib"
100
+ MAKE: "make -j"
101
+
66
102
dist :
67
103
runs-on : ubuntu-latest
104
+ needs : [ubuntu-gcc, ubuntu-cmake-gcc]
105
+
68
106
steps :
69
107
- name : Check out ${{ env.SPKG }}
70
108
uses : actions/checkout@v2
@@ -76,10 +114,11 @@ jobs:
76
114
sudo DEBIAN_FRONTEND=noninteractive apt-get install $DIST_PREREQ
77
115
if : env.DIST_PREREQ != ''
78
116
- name : Run make dist, prepare upstream artifact
117
+ # FLINT's "make dist" is upstream-centric: it hard-codes repo tags; cannot use
79
118
run : |
80
- (cd build/pkgs/${{ env.SPKG }}/src && (cd .. && tar czf - src) > arb -git.tar.gz) \
119
+ (cd build/pkgs/${{ env.SPKG }}/src && ./configure && git archive --format tar --prefix flint-git/ HEAD | gzip > ${{ env.SPKG }} -git.tar.gz ) \
81
120
&& mkdir -p upstream && cp build/pkgs/${{ env.SPKG }}/src/*.tar.gz upstream/${{ env.SPKG }}-git.tar.gz \
82
- && echo "sage-package create ${{ env.SPKG }} --version git --tarball ${{ env.SPKG }}-git.tar.gz --type=optional " > upstream/update-pkgs.sh \
121
+ && echo "sage-package create ${{ env.SPKG }} --version git --tarball ${{ env.SPKG }}-git.tar.gz --type=standard " > upstream/update-pkgs.sh \
83
122
&& if [ -n "${{ env.REMOVE_PATCHES }}" ]; then echo "(cd ../build/pkgs/${{ env.SPKG }}/patches && rm -f ${{ env.REMOVE_PATCHES }}; :)" >> upstream/update-pkgs.sh; fi \
84
123
&& ls -l upstream/
85
124
- uses : actions/upload-artifact@v2
0 commit comments