-
Notifications
You must be signed in to change notification settings - Fork 245
161 lines (135 loc) · 4.42 KB
/
push_CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: CI on push
on:
push:
branches:
- main
- flint-*
concurrency:
# group by workflow and ref; the last slightly strange component ensures that for pull
# requests, we limit to 1 concurrent job, but for the main branch we don't
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }}
# Cancel intermediate builds, but only if it is a pull request build.
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
##############################################################################
# freebsd with clang
##############################################################################
freebsd-gcc:
name: FreeBSD Clang (x0.5)
runs-on: macos-13
env:
FLINT_TEST_MULTIPLIER: "0.5"
steps:
- uses: actions/checkout@v4
- name: "Run tests on FreeBSD"
uses: cross-platform-actions/[email protected]
timeout-minutes: 15
continue-on-error: true
with:
operating_system: freebsd
version: '14.0'
shell: bash
run: |
sudo pkg install -y pkgconf gmake gmp mpfr autoconf libtool automake
gmake --version
clang --version
autoconf --version
libtool --version
touch _is_setup
./bootstrap.sh
touch _is_bootstrapped
./configure \
CC=clang \
--with-gmp-include=$(pkgconf --variable=includedir gmp) \
--with-gmp-lib=$(pkgconf --variable=libdir gmp) \
--with-mpfr-include=$(pkgconf --variable=includedir mpfr) \
--with-mpfr-lib=$(pkgconf --variable=libdir mpfr) \
--disable-debug
touch _is_configured
gmake -j$(expr $(sysctl -n hw.ncpu) + 1)
touch _is_library_built
gmake -j$(expr $(sysctl -n hw.ncpu) + 1) tests
touch _is_tests_built
gmake -j$(expr $(sysctl -n hw.ncpu) + 1) check
touch _is_checked
# Sometimes the FreeBSD runner cannot exit properly. We created files
# for each step to show that it was able to run the tests.
- if: always()
name: "Check that everything was okay"
run: |
if test ! -f _is_setup;
then
echo "Setup failed!"
exit 1
elif test ! -f _is_bootstrapped;
then
echo "Bootstrap failed!"
exit 2
elif test ! -f _is_configured;
then
echo "Configuration failed!"
exit 3
elif test ! -f _is_library_built;
then
echo "Building library failed!"
exit 4
elif test ! -f _is_tests_built;
then
echo "Building tests failed!"
exit 5
elif test ! -f _is_checked;
then
echo "Check failed!"
exit 6
fi
echo "All good!"
##############################################################################
# cygwin with gcc
##############################################################################
cygwin-gcc:
name: Cygwin GCC (x0.5)
runs-on: windows-latest
defaults:
run:
shell: C:\cygwin64\bin\bash.exe --login -o igncr '{0}'
env:
REPO: /cygdrive/d/a/flint/flint # FIXME: De-hardcode this
CC: "gcc"
FLINT_TEST_MULTIPLIER: "0.5"
steps:
- name: Make Git to use LF
shell: pwsh
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- uses: actions/checkout@v4
- name: "Set up Cygwin"
uses: gap-actions/setup-cygwin@v1
with:
PKGS_TO_INSTALL: "gcc-core,make,libgmp-devel,libmpfr-devel,libtool,autoconf,automake"
- name: "Setup"
run: |
gcc --version
make --version
autoconf --version
libtool --version
echo "MAKE=make -j$(expr $(nproc) + 1) --output-sync=target" >> $GITHUB_ENV
- name: "Configure"
run: |
cd ${REPO}
./bootstrap.sh
./configure \
CC=${CC} \
--disable-debug
- name: "Compile library"
run: |
cd ${REPO}
${MAKE}
- name: "Compile tests"
run: |
cd ${REPO}
$MAKE tests
- name: "Check"
run: |
cd ${REPO}
$MAKE check