Skip to content

Updated Changes file #57

Updated Changes file

Updated Changes file #57

Workflow file for this run

name: linux-build-dist
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
jobs:
build-perls:
runs-on: ${{ matrix.os }}
strategy:
matrix:
perl: [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@v3
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.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@v3
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.7]
perl: [38]
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@v3
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@v3
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:
matrix:
gsl: [2.7, 2.6, 2.5, 2.4, 2.3]
perl: [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@v3
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@v3
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:
matrix:
perl: [38, 36]
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@v3
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
run: |
BASEDIR=$PWD
cd $DISTDIR
$BASEDIR/.github/scripts/build_and_test.sh