Skip to content

Commit

Permalink
cut down to just container CI, core-only
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Feb 13, 2024
1 parent 86891d1 commit 5b09675
Showing 1 changed file with 1 addition and 188 deletions.
189 changes: 1 addition & 188 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,115 +16,6 @@ jobs:
- uses: PDLPorters/devops/github-actions/irc-notifications@master
with:
target-notifications: true
ci:
runs-on: ${{ matrix.os }}
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
needs: notify
env:
PGPLOT_DEV: /NULL
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
perl-version: ['5.10']
include:
- perl-version: '5.30'
os: ubuntu-latest
release-test: true
coverage: true
- perl-version: '5.30'
os: ubuntu-latest
disttest: true
- perl-version: '5.30'
os: ubuntu-latest
eumm-blead: 1
- perl-version: '5.30'
os: ubuntu-latest
test-installed: true # test not from blib but after installing
- perl-version: '5.30'
os: ubuntu-latest
disable-fortran: true # what if we don't have Fortran installed?
- perl-version: '5.30'
os: ubuntu-latest
use-clang: true # use `clang` instead of `gcc` default
- perl-version: '5.26'
os: windows-latest
- perl-version: '5.30'
os: macos-latest
steps:
- uses: actions/checkout@v2
- name: 'ci-dist: target-setup-perl'
uses: PDLPorters/devops/github-actions/ci-dist@master
with:
target-setup-perl: true
perl-version: ${{ matrix.perl-version }}

# conditional config
- name: Maybe gfortran
if: "!matrix.disable-fortran"
uses: PDLPorters/devops/github-actions/install-dep-gfortran@master

- name: Use clang?
# clang is already installed in Travis-CI environment. Using PERL_MM_OPT does not work with subdirectory Makefile.PLs so we override Config.pm
# Also, both $Config{cc} and $Config{ld} need to be set because under ELF environments (such as Travis-CI's Ubuntu), this is what Perl's Config.pm does.
if: matrix.use-clang
run: |
[ -d build_aux ] || mkdir build_aux
echo 'package pdl_config_override; use ExtUtils::MakeMaker::Config; $Config{cc} = $Config{ld} = "clang"; 1;' > build_aux/pdl_config_override.pm
echo "PERL5OPT=${PERL5OPT:+${PERL5OPT} }-I$(pwd)/build_aux -Mpdl_config_override" >> $GITHUB_ENV
- name: EUMM blead?
if: matrix.eumm-blead
uses: PDLPorters/devops/github-actions/install-dep-eumm-blead@master

- name: Install PDL dependencies
uses: PDLPorters/devops/github-actions/install-dep-pdl-dep@master

- name: 'ci-dist: target-install-dist-perl-deps'
uses: PDLPorters/devops/github-actions/ci-dist@master
with:
target-install-dist-perl-deps: true
dist-perl-deps-configure: ExtUtils::MakeMaker Devel::CheckLib File::Which

- name: 'ci-dist: target-test-release-testing'
uses: PDLPorters/devops/github-actions/ci-dist@master
with:
target-test-release-testing: true
test-enable-release-testing: ${{ matrix.release-test }}

- name: 'ci-dist: target-test (no coverage)'
uses: PDLPorters/devops/github-actions/ci-dist@master
if: '!matrix.coverage && !matrix.disttest'
with:
target-test: true
test-enable-coverage: ${{ matrix.coverage }}

- name: 'disttest'
if: matrix.disttest
run: |
set -e
( [ -f Makefile ] || $MYPERL Makefile.PL ) && make disttest
- name: Run tests after install (no coverage)
if: '!matrix.coverage && matrix.test-installed'
run: |
set -e
[ -f Makefile ] || perl Makefile.PL
make install
make clean # clean is to ensure no blib
mv Basic Basic.x # ensure doesn't think is in repo!
prove -j4 t
- name: 'ci-dist: target-test (with coverage)'
uses: PDLPorters/devops/github-actions/ci-dist@master
if: matrix.coverage
with:
target-test: true
test-enable-coverage: ${{ matrix.coverage }}
github-token: ${{ secrets.GITHUB_TOKEN }}

- run: perl -Iblib/lib -MData::Dumper -e 'eval { require PDL::Config }; $Data::Dumper::Sortkeys = 1; print Dumper \%PDL::Config'

ci-ubuntu-containers:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
Expand All @@ -146,85 +37,7 @@ jobs:
- name: Run tests
env:
HARNESS_OPTIONS: j4
run: perl Makefile.PL && make test

cygwin:
env:
PERL5LIB: /cygdrive/c/cx/lib/perl5:/cygdrive/c/cx/lib/perl5/MSWin32-x64-multi-thread
PERL_LOCAL_LIB_ROOT: /cygdrive/cx
PERL_MB_OPT: --install_base /cygdrive/c/cx
PERL_MM_OPT: INSTALL_BASE=/cygdrive/c/cx
CYGWIN_NOWINPATH: 1
runs-on: windows-latest
# only run on tag because cygwin is slow
if: ${{ github.event_name == 'create' && github.event.ref_type == 'tag' }}
needs: notify
strategy:
fail-fast: false
defaults:
run:
shell: C:\tools\cygwin\bin\bash.exe --login --norc -eo pipefail -o igncr '{0}'
steps:
- name: Set git to use LF
run: |
git config --global core.autocrlf false
git config --global core.eol lf
shell: powershell
- uses: actions/checkout@v2
- name: Cache Cygwin
uses: actions/cache@v1
with:
path: |
c:\tools\cygwin
!c:\tools\cygwin\home
key: ${{ runner.os }}-build-cygwin-tools
restore-keys: ${{ runner.os }}-build-cygwin-tools
- name: Set up Cygwin
uses: egor-tensin/setup-cygwin@v3
with:
platform: x64
packages: make perl gcc-core gcc-g++ pkg-config libcrypt-devel libssl-devel libnsl-devel git
- name: perl -V
run: |
perl -V
gcc --version
- name: Prepare for cache
run: |
perl -V > perlversion.txt
gcc --version >> perlversion.txt
ls perlversion.txt
- name: Cache CPAN modules
uses: actions/cache@v1
with:
path: c:\cx
key: ${{ runner.os }}-build-cygwin-${{ hashFiles('perlversion.txt') }}
restore-keys: |
${{ runner.os }}-build-cygwin-${{ hashFiles('perlversion.txt') }}
- name: Install Static Dependencies
run: |
export PATH="/cygdrive/c/cx/bin:$PATH"
cd $( cygpath -u $GITHUB_WORKSPACE )
yes | cpan App::cpanminus || true
- name: Install Dynamic Dependencies
run: |
export PATH="/cygdrive/c/cx/bin:$PATH"
cd $( cygpath -u $GITHUB_WORKSPACE )
(cpanm -n Devel::CheckLib File::Which && cpanm -n --installdeps .) || ( cat ~/.cpanm/build.log && false )
- name: Run tests (no coverage)
env:
HARNESS_OPTIONS: j4
run: |
export PATH="/cygdrive/c/cx/bin:$PATH"
cd $( cygpath -u $GITHUB_WORKSPACE )
perl Makefile.PL && make test
- run: |
export PATH="/cygdrive/c/cx/bin:$PATH"
cd $( cygpath -u $GITHUB_WORKSPACE )
perl -Mblib -MPDL::Config -MData::Dumper -e '$Data::Dumper::Sortkeys = 1; print Dumper \%PDL::Config'
- name: CPAN log
if: ${{ failure() }}
run: |
cat ~/.cpanm/latest-build/build.log
run: perl Makefile.PL && make coretest && make test
build-status:
runs-on: ubuntu-latest
continue-on-error: true
Expand Down

0 comments on commit 5b09675

Please sign in to comment.