-
Notifications
You must be signed in to change notification settings - Fork 23
59 lines (52 loc) · 2.29 KB
/
cygwin.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
name: Test on Cygwin
on: [push, pull_request]
jobs:
cygwin:
runs-on: windows-latest
steps:
- run: git config --global core.autocrlf input
- uses: actions/checkout@v4
- name: Install Cygwin
uses: cygwin/cygwin-install-action@v4
with:
platform: x86_64
install-dir: 'C:\tools\cygwin'
packages: >-
python39-devel python39-pip python-pip-wheel python-setuptools-wheel
liblapack-devel liblapack0 gcc-fortran git dash python39-numpy automake make
- name: pip cache
uses: actions/cache@v4
with:
path: 'C:\tools\cygwin\home\runneradmin\.local'
key: ${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
- name: Set Windows PATH
uses: egor-tensin/cleanup-path@v4
with:
dirs: 'C:\tools\cygwin\bin;C:\tools\cygwin\lib\lapack'
- name: Verify that bash is Cygwin bash
run: |
command bash
bash -c "uname -svrmo"
- name: Tell Cygwin's git about this repository.
run: |
dash -c "which git; /usr/bin/git config --system --add safe.directory /cygdrive/d/a/gfort2py/gfort2py"
- name: Verify python version
# Make sure it's the Cygwin one, not a Windows one
run: |
dash -c "which python3.9; /usr/bin/python3.9 --version -V"
- name: Install dependencies
shell: "C:\\tools\\cygwin\\bin\\bash.exe -o igncr -eo pipefail {0}"
run: |
/usr/bin/python3.9 -m pip install --upgrade pip
/usr/bin/python3.9 -m pip install --upgrade --user build wheel
/usr/bin/python3.9 -m pip install --upgrade --user pytest dataclasses_json platformdirs importlib_metadata
cygpath -w $(/usr/bin/python3.9 -c 'import dataclasses_json;print(dataclasses_json.__file__)')
/usr/bin/python3.9 -m pip install cpyparsing
- name: Install
shell: "C:\\tools\\cygwin\\bin\\bash.exe -o igncr -eo pipefail {0}"
run: |
/usr/bin/python3.9 -m pip install .
- name: Run tests
shell: "C:\\tools\\cygwin\\bin\\bash.exe -o igncr -eo pipefail {0}"
run: |
/usr/bin/python3.9 -m pytest -v