-
Notifications
You must be signed in to change notification settings - Fork 19
138 lines (116 loc) · 4.44 KB
/
windows.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Windows
on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:
env:
PERL5LIB: c:\cx\lib\perl5
PERL_LOCAL_LIB_ROOT: c:/cx
PERL_MB_OPT: --install_base C:/cx
PERL_MM_OPT: INSTALL_BASE=C:/cx
#ALIEN_BUILD_PRELOAD: Fetch::Cache
AUTOMATED_TESTING: 1
jobs:
perl:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Set up Perl
run: |
choco install strawberryperl
echo "C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
##echo $env:PATH
#- name: Check path
# run: |
# echo $env:PATH
# echo "glargglarg"
# echo $GITHUB_PATH
# echo "zogzogzog"
# $env:PATH = "C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;$env:PATH"
# echo $env:PATH
# echo "zigzig"
# echo "C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;$env:PATH" > $GITHUB_PATH
# echo $GITHUB_PATH
- name: perl -V
run: perl -V
- name: Prepare for CPAN cache
run: |
perl -V > perlversion.txt
echo "20220920" >> perlversion.txt
dir perlversion.txt
- name: Cache CPAN modules
uses: actions/cache@v3
with:
path: c:\cx
key: ${{ runner.os }}-build-${{ hashFiles('perlversion.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ hashFiles('perlversion.txt') }}
- name: Prepare for Alien cache
run: |
perl -V > aliencache.txt
echo 'aliens' >> aliencache.txt
dir aliencache.txt
- name: Cache Alien downloads
uses: actions/cache@v3
with:
path: $HOMEPATH\.alienbuild
key: ${{ runner.os }}-build-${{ hashFiles('aliencache.txt') }}
restore-keys: |
${{ runner.os }}-build-${{ hashFiles('aliencache.txt') }}
#- name: Install Dependencies
# run: curl -sL https://git.io/cpm | perl - install -g --show-build-log-on-failure
#- name: Install dependencies 1
# run: |
# #cpanm --notest local::lib
# #eval "$(perl -Mlocal::lib=${PWD}/perl_modules)"
# cpanm --quiet --notest Alien::Build
# cpanm --quiet --notest Alien::Build::MM
# cpanm --quiet --notest Sort::Versions
# cpanm --quiet --notest PkgConfig
# cpanm --quiet --notest Alien::Build::Plugin::Cleanse::BuildDir
# cpanm --quiet --notest File::Find::Rule
# cpanm --quiet --notest Alien::Build::Plugin::Fetch::Cache
# cpanm --quiet --notest Env::ShellWords
# cpanm --quiet --notest Test2::Suite
- name: Install dependencies Alien::MSYS
run: |
cpanm Alien::Build::Plugin::Fetch::Cache
cpanm --notest Alien::MSYS
- name: Install dependencies Alien::sqlite
run: |
echo $env:PATH
cpanm --notest --installdeps Alien::sqlite
cpanm -v Alien::sqlite~1.05
- name: Install dependencies Alien::proj
run: |
#cpanm -v --notest https://github.com/shawnlaffan/perl-alien-proj.git
cpanm --notest --installdeps Alien::proj
cpanm -v --notest Alien::proj
- name: Install dependencies Alien::geos::af
run: |
cpanm --notest --installdeps Alien::geos::af
cpanm -v Alien::geos::af
- name: Install dependencies Alien::gdal
run: |
cpanm --notest --installdeps Alien::gdal
echo "ALIEN_GDAL_CONFIG_ARGS=--with-hide_internal_symbols" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# qhull issues on gdal 3.5, maybe fixed in 3.6
$env:ALIEN_GDAL_CONFIG_ARGS = "--with-hide-internal-symbols=yes --without-gnm --without-qhull"
Get-PSDrive C | Select-Object Used,Free
# clunky path override
# $env:PATH = "C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;$env:PATH"
cpanm -v Alien::gdal
Get-PSDrive C | Select-Object Used,Free
- name: Install task deps
run: |
#cpanm --notest Task::Biodiverse::NoGUI
cpanm --notest --no-man-pages PDL
cpanm --notest --installdeps .
cpanm --installdeps .
# Runs a set of commands using the runners shell
- name: Run tests
run: |
prove