Skip to content

Commit 8371486

Browse files
committed
.github/workflows/ci-sage.yml: Merge with version from release branch
1 parent 0aa1a53 commit 8371486

File tree

1 file changed

+42
-3
lines changed

1 file changed

+42
-3
lines changed

.github/workflows/ci-sage.yml

Lines changed: 42 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ on:
4242
push:
4343
tags:
4444
- '*'
45+
workflow_dispatch:
46+
# Allow to run manually
4547

4648
env:
4749
# Ubuntu packages to install so that the project's "make dist" can succeed
48-
DIST_PREREQ:
50+
DIST_PREREQ: tar
4951
# Name of this project in the Sage distribution
5052
SPKG: flint
5153
# Sage distribution packages to build
@@ -63,8 +65,44 @@ env:
6365

6466
jobs:
6567

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+
66102
dist:
67103
runs-on: ubuntu-latest
104+
needs: [ubuntu-gcc, ubuntu-cmake-gcc]
105+
68106
steps:
69107
- name: Check out ${{ env.SPKG }}
70108
uses: actions/checkout@v2
@@ -76,10 +114,11 @@ jobs:
76114
sudo DEBIAN_FRONTEND=noninteractive apt-get install $DIST_PREREQ
77115
if: env.DIST_PREREQ != ''
78116
- name: Run make dist, prepare upstream artifact
117+
# FLINT's "make dist" is upstream-centric: it hard-codes repo tags; cannot use
79118
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 ) \
81120
&& 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 \
83122
&& if [ -n "${{ env.REMOVE_PATCHES }}" ]; then echo "(cd ../build/pkgs/${{ env.SPKG }}/patches && rm -f ${{ env.REMOVE_PATCHES }}; :)" >> upstream/update-pkgs.sh; fi \
84123
&& ls -l upstream/
85124
- uses: actions/upload-artifact@v2

0 commit comments

Comments
 (0)