Skip to content

Commit

Permalink
Resurrect CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tschoonj committed Dec 24, 2023
1 parent c05c4c0 commit 1569adf
Showing 1 changed file with 30 additions and 80 deletions.
110 changes: 30 additions & 80 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11', '3.12']
name: Pip install with Python ${{ matrix.python-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -39,7 +39,7 @@ jobs:
runs-on: windows-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']
python-version: ['3.9', '3.10', '3.11', '3.12']
compiler:
- cl
- clang-cl
Expand Down Expand Up @@ -176,7 +176,6 @@ jobs:
- gcc
include:
- ldflags: ""
# at least some versions of clang cannot compile php bindings
- compiler: llvm
cc: /usr/local/opt/llvm/bin/clang
cxx: /usr/local/opt/llvm/bin/clang++
Expand All @@ -196,7 +195,8 @@ jobs:
brew uninstall -f bazel bazelisk mongodb-community
brew update
brew upgrade
brew install git autoconf automake libtool pkg-config python ${{ matrix.compiler }} swig ruby fpc lua perl [email protected] bash numpy meson ninja
brew install git autoconf automake libtool pkg-config python ${{ matrix.compiler }} swig ruby fpc lua bash numpy meson ninja
/usr/local/bin/python3 -c 'import numpy'
set +ex
env:
HOMEBREW_CURL_RETRIES: 5
Expand Down Expand Up @@ -243,9 +243,9 @@ jobs:
autoreconf -fi
# Build without python
./configure --disable-python --disable-python-numpy --enable-perl --enable-lua --enable-pascal --disable-java --enable-php --${{matrix.enable_ruby}}-ruby PHP=/usr/local/opt/[email protected]/bin/php PHP_CONFIG=/usr/local/opt/[email protected]/bin/php-config SHELL=${SHELL} RUBY=/usr/local/opt/ruby/bin/ruby
./configure --disable-python --disable-python-numpy --disable-perl --enable-lua --enable-pascal --disable-java --disable-php --${{matrix.enable_ruby}}-ruby SHELL=${SHELL} RUBY=/usr/local/opt/ruby/bin/ruby
make
make check || (cat perl/tests/test-suite.log && exit 1)
make check
make distclean
# Build without bindings in ANSI-C
Expand Down Expand Up @@ -298,77 +298,38 @@ jobs:
fail-fast: false
matrix:
image:
- ubuntu:focal
- ubuntu:devel
- debian:bullseye
- debian:sid
- centos:7
- ubuntu:jammy
- debian:bookworm
- rockylinux:8
- rockylinux:9
- fedora:latest
- fedora:rawhide
cc:
- clang
- gcc
buildsystem:
- autotools
- meson
exclude:
- image: ubuntu:focal
buildsystem: meson
- image: centos:7
buildsystem: meson
- image: rockylinux:8
buildsystem: meson
# exclude:
# - image: rockylinux:8
# buildsystem: meson
include:
# at least some versions of clang cannot compile php bindings
- cython: cython
perl: enable
fpc: enable
- fpc: enable
fortran: enable
python: enable
- cc: clang
cxx: clang++
php: disable
- cc: gcc
cxx: g++
php: enable
- buildsystem: autotools
cython: cython3
- buildsystem: meson
cython: cython
- cc: clang
image: rockylinux: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
python: enable
- cc: clang
image: fedora:latest
perl: disable
python: disable
clang_cflags: -Qunused-arguments
- cc: clang
image: fedora:rawhide
perl: disable
python: disable
clang_cflags: -Qunused-arguments
- image: ubuntu:focal
lua: /usr/bin/lua5.3
- image: ubuntu:devel
lua: /usr/bin/lua5.3
- image: debian:bullseye
lua: /usr/bin/lua5.3
- image: debian:sid
lua: /usr/bin/lua5.3
php: disable # comes with PHP 8, unsupported by SWIG
- image: centos:7
lua: /usr/bin/lua
- image: rockylinux:8
lua: /usr/bin/lua
- image: fedora:latest
Expand All @@ -389,7 +350,7 @@ jobs:
env:
DEBIAN_FRONTEND: noninteractive
- name: Install Git
if: startsWith(matrix.image, 'centos') || startsWith(matrix.image, 'fedora')
if: startsWith(matrix.image, 'rockylinux') || startsWith(matrix.image, 'fedora')
run: |
set -ex
yum install -y git
Expand All @@ -400,8 +361,7 @@ jobs:
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
apt-get --yes --force-yes install autoconf automake libtool python3-pip python3-all-dev python3-numpy fpc gfortran gcc swig lua5.3 liblua5.3-dev ruby-dev default-jdk clang cython3
set +ex
env:
DEBIAN_FRONTEND: noninteractive
Expand All @@ -413,27 +373,28 @@ jobs:
set +ex
env:
DEBIAN_FRONTEND: noninteractive
- name: Activate CentOS 8 PowerTools and EPEL repo
- name: Activate RockyLinux 8 PowerTools and EPEL repo
if: matrix.image == 'rockylinux: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
dnf install -y epel-release
set +ex
- name: Activate CentOS 7 EPEL repo
if: matrix.image == 'centos:7'
- name: Activate RockyLinux 9 PowerTools and EPEL repo
if: matrix.image == 'rockylinux:9'
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
dnf install -y 'dnf-command(config-manager)'
dnf config-manager --set-enabled crb
dnf install -y epel-release
set +ex
- name: Install RHEL dependencies
if: startsWith(matrix.image, 'centos') || startsWith(matrix.image, 'fedora') || startsWith(matrix.image, 'rockylinux')
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 rpm-build rpmdevtools lua-srpm-macros perl-macros
yum install -y make autoconf automake libtool python3-Cython python3-setuptools python3-devel python3-numpy fpc gcc-gfortran gcc swig 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
Expand Down Expand Up @@ -466,7 +427,7 @@ jobs:
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)
./configure --disable-python --disable-python-numpy --disable-perl --enable-lua --${FPC_ENABLE}-pascal --disable-java --disable-php --enable-ruby --${FORTRAN_ENABLE}-fortran2003 || (cat config.log && exit 1)
make
make check || (cat example/xrlexample12.sh.log && exit 1)
make distclean
Expand Down Expand Up @@ -494,19 +455,8 @@ jobs:
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
DISTCHECK_CONFIGURE_FLAGS: --${{matrix.fpc}}-pascal --enable-java --disable-perl --enable-lua --${{matrix.python}}-python --${{matrix.python}}-python-numpy --disable-php --enable-ruby --${{matrix.fortran}}-fortran2003
CFLAGS: ${{matrix.clang_cflags}}
- name: Test rpm-build
if: matrix.buildsystem == 'autotools' && (startsWith(matrix.image, 'centos') || startsWith(matrix.image, 'fedora') || startswith(matrix.image, 'rockylinux'))
run: |
set -ex
rpmdev-setuptree
cp xraylib-*.tar.gz ~/rpmbuild/SOURCES
cp xraylib.spec ~/rpmbuild/SPECS
rpmbuild -ba ~/rpmbuild/SPECS/xraylib.spec
set +ex

0 comments on commit 1569adf

Please sign in to comment.