File tree Expand file tree Collapse file tree 9 files changed +83
-13
lines changed Expand file tree Collapse file tree 9 files changed +83
-13
lines changed Original file line number Diff line number Diff line change
1
+ name : Test on Arch Linux
2
+ on : [pull_request]
3
+ jobs :
4
+ test_on_arch_linux :
5
+ runs-on : ubuntu-latest
6
+ steps :
7
+ - uses : actions/checkout@v4
8
+ - name : Build docker image
9
+ run : |
10
+ bash zscripts/docker-build-image.bash arch
Original file line number Diff line number Diff line change
1
+ FROM archlinux:base-devel
2
+
3
+ # initialize
4
+ RUN pacman -Sy go git --noconfirm
5
+
6
+ # set user
7
+ RUN useradd -G wheel -m user
8
+ RUN echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
9
+ RUN chown -R user:wheel /usr/local/src/
10
+ USER user
11
+ WORKDIR /usr/local/src/
12
+
13
+ # install yay
14
+ RUN git clone https://aur.archlinux.org/yay.git
15
+ RUN cd yay && makepkg -si --noconfirm
16
+ RUN sudo rm -f \
17
+ /var/cache/pacman/pkg/* \
18
+ /var/lib/pacman/sync/* \
19
+ /README \
20
+ /etc/pacman.d/mirrorlist.pacnew
21
+
22
+ # install libraries
23
+ RUN yay -Y --gendb --noconfirm && yay -Y --devel --save
24
+
25
+ # install rust
26
+ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y
27
+ ENV PATH="/home/user/.cargo/bin:${PATH}"
28
+
29
+ # copy files
30
+ COPY --chown=user:user . tritet
31
+ WORKDIR tritet
32
+
33
+ # run tests
34
+ RUN cargo test
Original file line number Diff line number Diff line change 2
2
3
3
[ ![ Test] ( https://github.com/cpmech/tritet/actions/workflows/test_and_coverage.yml/badge.svg )] ( https://github.com/cpmech/tritet/actions/workflows/test_and_coverage.yml )
4
4
[ ![ Windows & macOS] ( https://github.com/cpmech/tritet/actions/workflows/windows_and_macos.yml/badge.svg )] ( https://github.com/cpmech/tritet/actions/workflows/windows_and_macos.yml )
5
+ [ ![ Test on Arch Linux] ( https://github.com/cpmech/tritet/actions/workflows/test_on_arch_linux.yml/badge.svg )] ( https://github.com/cpmech/tritet/actions/workflows/test_on_arch_linux.yml )
5
6
6
7
## Contents
7
8
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ fn main() {
8
8
. flag ( "-Wno-unused-parameter" )
9
9
. flag ( "-Wno-unused-but-set-variable" )
10
10
. flag ( "-Wno-maybe-uninitialized" )
11
+ . flag ( "-Wno-old-style-definition" )
11
12
. compile ( "c_code_interface_triangle" ) ;
12
13
cc:: Build :: new ( )
13
14
. cpp ( true )
Original file line number Diff line number Diff line change 3
3
4
4
#include <inttypes.h>
5
5
6
- #define REAL double
7
- #define ANSI_DECLARATORS
8
- #define VOID int32_t
9
6
#include "triangle.h"
10
- #undef REAL
11
- #undef ANSI_DECLARATORS
12
- #undef VOID
13
7
14
8
struct ExtTrigen {
15
9
struct triangulateio input ;
Original file line number Diff line number Diff line change 312
312
/* compiler is smarter, feel free to replace the "int" with "void". */
313
313
/* Not that it matters. */
314
314
315
- #define VOID int
315
+ /* #define VOID int Dorival: no longer needed because it goes in triangle.h */
316
316
317
317
/* Two constants for algorithms based on random sampling. Both constants */
318
318
/* have been chosen empirically to optimize their respective algorithms. */
Original file line number Diff line number Diff line change 248
248
/* */
249
249
/*****************************************************************************/
250
250
251
+ /* Dorival: Place this here to avoid complications with different compilers. */
252
+ #include <inttypes.h>
253
+ #define REAL double
254
+ #define ANSI_DECLARATORS
255
+ #define VOID int32_t
256
+
251
257
struct triangulateio {
252
258
REAL * pointlist ; /* In / out */
253
259
REAL * pointattributelist ; /* In / out */
Original file line number Diff line number Diff line change 1
1
#include <stdio.h>
2
2
#include <stdlib.h>
3
3
4
- #define REAL double
5
- #define ANSI_DECLARATORS
6
- #define VOID int
7
4
#include "triangle.h"
8
- #undef REAL
9
- #undef ANSI_DECLARATORS
10
- #undef VOID
11
5
12
6
void report (struct triangulateio * io ,
13
7
int markers ,
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ # the first argument is the distro: "arch" or "rocky"
6
+ # the second argument is "1" to enable MUMPS
7
+ DISTRO=${1:- " " }
8
+
9
+ # image name
10
+ NAME=" cpmech/tritet_ubuntu"
11
+ DKFILE=" Dockerfile.Ubuntu"
12
+ if [ " ${DISTRO} " = " arch" ]; then
13
+ NAME=" cpmech/tritet_arch"
14
+ DKFILE=" Dockerfile.Arch"
15
+ fi
16
+ if [ " ${DISTRO} " = " rocky" ]; then
17
+ NAME=" cpmech/tritet_rocky"
18
+ DKFILE=" Dockerfile.Rocky"
19
+ fi
20
+
21
+ # build Docker image
22
+ docker build -f $DKFILE -t $NAME .
23
+
24
+ echo
25
+ echo
26
+ echo
27
+ echo " ... SUCCESS ..."
28
+ echo
29
+ echo " ... image ${NAME} created ..."
30
+ echo
You can’t perform that action at this time.
0 commit comments