Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: drop vasprintf usage, only supported by MinGW #132

Merged
merged 20 commits into from
Jun 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 155 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
name: CI

on:
#schedule:
# - cron: '0 2 * * *' # run at 2 AM UTC
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
timeout-minutes: 60
strategy:
matrix:
image:
- ubuntu:bionic
- ubuntu:focal
- debian:buster
- centos:7
- centos:8
- fedora:latest
cc:
- clang
- gcc
include:
# at least some versions of clang cannot compile php bindings
- cython: cython
perl: enable
fpc: enable
fortran: enable
python: enable
- cc: clang
cxx: clang++
php: disable
- cc: gcc
cxx: g++
php: enable
- cc: clang
image: centos:8
perl: disable
libs: -stdlib=libstdc++
fortran: disable
clang_cflags: -Qunused-arguments
python: disable
- image: centos:7
fpc: disable
cython: cython3.6
- image: centos:7
cc: clang
libs: -stdlib=libstdc++
fortran: disable
clang_cflags: -Qunused-arguments
python: disable
- cc: clang
image: fedora:latest
perl: disable
python: disable
clang_cflags: -Qunused-arguments
- image: ubuntu:bionic
lua: /usr/bin/lua5.3
- image: ubuntu:focal
lua: /usr/bin/lua5.3
- image: debian:buster
lua: /usr/bin/lua5.3
- image: centos:7
lua: /usr/bin/lua
- image: centos:8
lua: /usr/bin/lua
- image: fedora:latest
lua: /usr/bin/lua

runs-on: ubuntu-latest
container:
image: ${{ matrix.image }}

steps:
- uses: actions/checkout@v2
- name: Install ubuntu dependencies
if: startsWith(matrix.image, 'ubuntu') || startsWith(matrix.image, 'debian')
run: |
set -ex
apt-get --yes --force-yes update
apt-get --yes --force-yes install autoconf automake libtool python3-pip python3-all-dev python3-numpy fpc gfortran gcc php-dev swig libperl-dev perl lua5.3 liblua5.3-dev ruby-dev default-jdk clang
pip3 install Cython
set +ex
env:
DEBIAN_FRONTEND: noninteractive
- name: Activate CentOS 8 PowerTools and EPEL repo
if: matrix.image == 'centos:8'
run: |
set -ex
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
dnf install -y 'dnf-command(config-manager)'
dnf config-manager --set-enabled PowerTools
set +ex
- name: Activate CentOS 7 EPEL repo
if: matrix.image == 'centos:7'
run: |
set -ex
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install -y python36-Cython # this one needs to be brought in separately for CentOS 7
set +ex
- name: Install RHEL dependencies
if: startsWith(matrix.image, 'centos') || startsWith(matrix.image, 'fedora')
run: |
set -ex
yum update -y
yum install -y make autoconf automake libtool python3-Cython python3-setuptools python3-devel python3-numpy fpc gcc-gfortran gcc php-devel swig perl-devel perl perl-Test-Simple lua lua-devel ruby ruby-devel rubygem-minitest rubygem-test-unit java-1.8.0-openjdk java-1.8.0-openjdk-devel clang libstdc++-devel gcc-c++ which
java -version
which java
javac -version
which javac
set +ex
- name: Build and test
run: |
set -ex
autoreconf -fi
# disable java for now
./configure --disable-python --disable-python-numpy --${PERL_ENABLE}-perl --enable-lua --${FPC_ENABLE}-pascal --disable-java --${PHP_ENABLE}-php --enable-ruby --${FORTRAN_ENABLE}-fortran2003 || (cat config.log && exit 1)
make
make check || (cat ruby/tests/test-suite.log && exit 1)
make distclean
./configure --disable-all-bindings CFLAGS="-std=c89 -pedantic $CFLAGS"
make
make check
make distclean
./configure --disable-ruby --disable-perl --disable-lua --disable-fortran2003 --${PYTHON_ENABLE}-python-numpy --${PYTHON_ENABLE}-python PYTHON=${XRL_PYTHON3}
make
make check
make distclean
./configure --disable-all-bindings --disable-shared --enable-static
make
make check
make distclean
./configure --disable-all-bindings
make distcheck PYTHON=${XRL_PYTHON3}
set +ex
env:
CYTHON: ${{matrix.cython}}
CC: ${{matrix.cc}}
CXX: ${{matrix.cxx}}
LIBS: ${{matrix.libs}}
XRL_PYTHON3: /usr/bin/python3
LUA: ${{matrix.lua}}
JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
PHP_ENABLE: ${{matrix.php}}
PYTHON_ENABLE: ${{matrix.python}}
FORTRAN_ENABLE: ${{matrix.fortran}}
PERL_ENABLE: ${{matrix.perl}}
FPC_ENABLE: ${{matrix.fpc}}
DISTCHECK_CONFIGURE_FLAGS: --${{matrix.fpc}}-pascal --enable-java --${{matrix.perl}}-perl --enable-lua --${{matrix.python}}-python --${{matrix.python}}-python-numpy --${{matrix.php}}-php --enable-ruby --${{matrix.fortran}}-fortran2003
CFLAGS: ${{matrix.clang_cflags}}
188 changes: 0 additions & 188 deletions .travis.yml

This file was deleted.

6 changes: 0 additions & 6 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,4 @@ windows:

EXTRA_DIST = xraylib.spec.in Changelog

if OS_WINDOWS
DISTCHECK_CONFIGURE_FLAGS = --enable-pascal --enable-python --enable-python-numpy --enable-fortran
else
DISTCHECK_CONFIGURE_FLAGS = --enable-pascal --enable-java --enable-perl --enable-lua --enable-python --enable-python-numpy --enable-php --enable-ruby
endif

.PHONY: windows
8 changes: 4 additions & 4 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
variables:
SHELL: /usr/local/bin/bash
XRL_PYTHON3: /usr/local/bin/python3
XRL_PYTHON3: /usr/local/opt/python@3.8/bin/python3
PHP: /usr/local/bin/php
PHP_CONFIG: /usr/local/bin/php-config

Expand All @@ -12,7 +12,7 @@ jobs:
timeoutInMinutes: 60
cancelTimeoutInMinutes: 20
pool:
vmImage: macOS-10.13
vmImage: macOS-10.14
strategy:
matrix:
clang:
Expand All @@ -39,7 +39,7 @@ jobs:

- script: |
set -e -x
/usr/local/opt/python/bin/pip3 install Cython
/usr/local/opt/python@3.8/bin/pip3 install Cython
displayName: Install Cython

- script: |
Expand All @@ -49,7 +49,7 @@ jobs:

- script: |
set -e -x
./configure --disable-python --disable-python-numpy --disable-ruby --enable-perl --enable-lua --enable-pascal --enable-java --enable-php --enable-ruby ${EXTRA} SHELL=${SHELL}
./configure --disable-python --disable-python-numpy --disable-ruby --enable-perl --enable-lua --enable-pascal --disable-java --enable-php --enable-ruby ${EXTRA} SHELL=${SHELL}
make
make check
make distclean
Expand Down
Loading