Use old version of s// operator #208
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: linux-build-dist | |
on: | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
build-perls: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
perl: [40, 38, 36, 34, 32] | |
os: [ubuntu-latest, macos-latest] | |
# include: | |
# - os: macos-latest | |
# - perl: 34 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set environment variables | |
env: | |
PERL_NAME: perl-5.${{ matrix.perl }}.0 | |
GHA_OS: ${{ matrix.os }} | |
PERL_DIR: ~/perl/${{ runner.os }}/5.${{ matrix.perl }} | |
run: | | |
./.github/scripts/set_environment_variables.sh | |
- name: perl cache | |
env: | |
CACHE_KEY: ${{ runner.os }}-perl2-${{ matrix.perl }} | |
id: cache-perl | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.PERL_DIR }} | |
key: ${{ env.CACHE_KEY }} | |
- name: install perl | |
if: steps.cache-perl.outputs.cache-hit != 'true' | |
run: | | |
./.github/scripts/install_perl.sh | |
build-gsl: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
gsl: [2.8, 2.7, 2.6, 2.5, 2.4, 2.3] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set environment variables | |
env: | |
GSL_NAME: gsl-${{ matrix.gsl }} | |
GSL_DIR: ~/gsl/${{ runner.os }}/gsl-${{ matrix.gsl }} | |
run: | | |
./.github/scripts/set_environment_variables.sh | |
- name: gsl cache | |
env: | |
CACHE_KEY: ${{ runner.os }}-gsl4-${{ matrix.gsl }} | |
id: cache-gsl | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.GSL_DIR }} | |
key: ${{ env.CACHE_KEY }} | |
- name: install gsl | |
if: steps.cache-gsl.outputs.cache-hit != 'true' | |
run: | | |
./.github/scripts/install_gsl.sh | |
build-dist: | |
runs-on: ${{ matrix.os }} | |
needs: [build-gsl, build-perls] | |
strategy: | |
matrix: | |
gsl: [2.8] | |
perl: [40] | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set environment variables | |
env: | |
GSL_NAME: gsl-${{ matrix.gsl }} | |
GSL_DIR: ~/gsl/${{ runner.os }}/gsl-${{ matrix.gsl }} | |
PERL_NAME: perl-5.${{ matrix.perl }}.0 | |
PERL_DIR: ~/perl/${{ runner.os }}/5.${{ matrix.perl }} | |
run: | | |
./.github/scripts/set_environment_variables.sh | |
- name: perl cache | |
env: | |
CACHE_KEY: ${{ runner.os }}-perl2-${{ matrix.perl }} | |
id: cache-perl | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.PERL_DIR }} | |
key: ${{ env.CACHE_KEY }} | |
- name: gsl cache | |
env: | |
CACHE_KEY: ${{ runner.os }}-gsl4-${{ matrix.gsl }} | |
id: cache-gsl | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.GSL_DIR }} | |
key: ${{ env.CACHE_KEY }} | |
- name: install packages | |
run: | | |
# NOTE: The following packages are already installed in "ubuntu-latest" : | |
# build-essential curl g++ git wget libssl-dev libz-dev | |
# swig autoconf libtool | |
#sudo apt-get install swig autoconf libtool | |
swig -version | |
- name: install perl modules, build, and test | |
run: | | |
./.github/scripts/build_and_test.sh | |
- name: build dist | |
run: | | |
./.github/scripts/build_dist.sh | |
- name: Save dist as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: math_gsl_dist | |
path: ${{ env.MATH_GSL_DISTNAME }} | |
- name: Save name of dist as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: math_gsl_dist_name | |
path: math-gsl-dist-name.txt | |
install-dist-linux: | |
runs-on: ubuntu-latest | |
needs: [build-dist] | |
strategy: | |
fail-fast: false | |
matrix: | |
gsl: [2.8, 2.7, 2.6, 2.5, 2.4, 2.3] | |
perl: [40, 38, 36, 34, 32] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set environment variables | |
env: | |
GSL_NAME: gsl-${{ matrix.gsl }} | |
GSL_DIR: ~/gsl/${{ runner.os }}/gsl-${{ matrix.gsl }} | |
PERL_NAME: perl-5.${{ matrix.perl }}.0 | |
PERL_DIR: ~/perl/${{ runner.os }}/5.${{ matrix.perl }} | |
run: | | |
./.github/scripts/set_environment_variables.sh | |
- name: perl cache | |
env: | |
CACHE_KEY: ${{ runner.os }}-perl2-${{ matrix.perl }} | |
id: cache-perl | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.PERL_DIR }} | |
key: ${{ env.CACHE_KEY }} | |
- name: gsl cache | |
env: | |
CACHE_KEY: ${{ runner.os }}-gsl4-${{ matrix.gsl }} | |
id: cache-gsl | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.GSL_DIR }} | |
key: ${{ env.CACHE_KEY }} | |
- name: Download dist | |
env: | |
PERL_NAME: perl-5.${{ matrix.perl }} | |
PERL_DIR: ~/perl/${{runner.os}}/5.${{ matrix.perl }} | |
GSL_NAME: gsl-${{ matrix.gsl }} | |
GSL_DIR: ~/gsl/${{runner.os}}/gsl-${{ matrix.gsl }} | |
uses: actions/download-artifact@v3 | |
with: | |
name: math_gsl_dist | |
- name: Download dist name | |
uses: actions/download-artifact@v3 | |
with: | |
name: math_gsl_dist_name | |
- name: extract dist | |
run: | | |
DISTNAME=$(<math-gsl-dist-name.txt) | |
tar zxvf $DISTNAME | |
DISTDIR=$(perl -pe 's/\.tar.gz$//' <<<"$DISTNAME") | |
echo "DISTDIR=$DISTDIR" >> $GITHUB_ENV | |
- name: install perl modules and build and test | |
run: | | |
BASEDIR=$PWD | |
cd $DISTDIR | |
$BASEDIR/.github/scripts/build_and_test.sh | |
install-dist-macos: | |
runs-on: macos-latest | |
needs: [build-dist] | |
strategy: | |
fail-fast: false | |
matrix: | |
perl: [40, 38, 36] | |
#gsl: [2.7, 2.6] | |
# NOTE: on macos we will not build against a pre-installed gsl, this will cause | |
# Build.PL to download the latest gsl version from the internet instead | |
steps: | |
- uses: actions/checkout@v4 | |
- name: set environment variables | |
env: | |
PERL_NAME: perl-5.${{ matrix.perl }}.0 | |
PERL_DIR: ~/perl/${{ runner.os }}/5.${{ matrix.perl }} | |
run: | | |
./.github/scripts/set_environment_variables.sh | |
- name: perl cache | |
env: | |
CACHE_KEY: ${{ runner.os }}-perl2-${{ matrix.perl }} | |
id: cache-perl | |
uses: actions/cache@v4 | |
with: | |
path: ${{ env.PERL_DIR }} | |
key: ${{ env.CACHE_KEY }} | |
- name: Download dist | |
env: | |
PERL_NAME: perl-5.${{ matrix.perl }} | |
PERL_DIR: ~/perl/${{runner.os}}/5.${{ matrix.perl }} | |
uses: actions/download-artifact@v3 | |
with: | |
name: math_gsl_dist | |
- name: Download dist name | |
uses: actions/download-artifact@v3 | |
with: | |
name: math_gsl_dist_name | |
- name: extract dist | |
run: | | |
DISTNAME=$(<math-gsl-dist-name.txt) | |
tar zxvf $DISTNAME | |
DISTDIR=$(perl -pe 's/\.tar.gz$//' <<<"$DISTNAME") | |
echo "DISTDIR=$DISTDIR" >> $GITHUB_ENV | |
- name: install perl modules and build and test | |
# NOTE: This should first download and install libgsl using the Alien::GSL module | |
run: | | |
BASEDIR=$PWD | |
cd $DISTDIR | |
$BASEDIR/.github/scripts/build_and_test.sh |