forked from wtsi-npg/p4
-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (58 loc) · 2.15 KB
/
testing_and_building_repo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: testing_and_building_repo
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
name: Distribution Perl on ubuntu-latest
steps:
- uses: actions/checkout@v4
# Caching cpanm external modules
- name: Cache cpanm external modules
id: cpanmCache
uses: actions/cache@v4
with:
path: ~/perl5ext
key: ${{ runner.os }}-build-cpanm-external
- name: install cpanm
run: |
wget -qO - https://cpanmin.us | /usr/bin/perl - --sudo App::cpanminus
# run the perl install script
- name: install NPG Perl dependencies, and their CPAN dependencies
run: |
cpanm --local-lib=~/perl5ext local::lib && eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib)
${GITHUB_WORKSPACE}/scripts/install_npg_perl_dependencies.sh $WTSI_NPG_GITHUB_URL $WTSI_NPG_BUILD_BRANCH
env:
WTSI_NPG_GITHUB_URL: https://github.com/wtsi-npg
WTSI_NPG_BUILD_BRANCH: ${GITHUB_HEAD_REF}
- name: install cpanm dependencies
run: |
eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib=~/perl5npg)
eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib=~/perl5ext)
cpanm --installdeps --notest .
- name: run Build.PL and ./Build
run: |
eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib=~/perl5ext)
eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib=~/perl5npg)
export TEST_AUTHOR=1
perl Build.PL
./Build test --verbose
./Build install
# running ./Build dist and exporting files
- name: run ./Build dist
run: |
eval $(perl -I ~/perl5ext/lib/perl5/ -Mlocal::lib=~/perl5ext)
export TEST_AUTHOR=1
./Build dist
export DIST_FILE=$(ls p4-*.tar.gz)
export MD5_FILE=$DIST_FILE.md5
md5sum $DIST_FILE > $MD5_FILE
export SHA256_FILE=$DIST_FILE.sha256
shasum -a 256 $DIST_FILE > $SHA256_FILE
# Archive logs if failure
- name: Archive CPAN logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: cpan_log
path: /home/runner/.cpanm/work/*/build.log
retention-days: 5