forked from Urban-Meteorology-Reading/SUEWS
-
Notifications
You must be signed in to change notification settings - Fork 8
118 lines (99 loc) · 2.91 KB
/
test-meson.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
name: test-meson
on:
push:
paths: # Push events containing matching files
- "src/suews/**"
- "src/supy/**"
- "src/supy_driver/**"
- ".github/workflows/test-meson.yml"
pull_request:
paths: # PR events containing matching files
- "src/suews/**"
- "src/supy/**"
- "src/supy_driver/**"
- ".github/workflows/test-meson.yml"
jobs:
test-meson:
name: Build wheels for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
- windows-2019
- macos-11
- macos-14 # Apple Silicon build runner
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install Meson and Ninja
run: python3 -m pip install meson ninja f90wrap
# # remote debugging
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
# macOS make is too old
- if: runner.os == 'macOS'
run: |
brew install make automake libtool
which pipx || brew install pipx && pipx ensurepath
- name: check git info
run: |
git tag -l
git status
git describe --tags --dirty --match "2[0-9]*"
- name: test meson.build
run: |
meson setup build
meson compile -C build
# - name: Build wheels
# uses: pypa/[email protected]
# env:
# # SETUPTOOLS_USE_DISTUTILS: stdlib
# CC: gcc
# CXX: g++
# with:
# package-dir: ./src/supy
# output-dir: wheelhouse
# config-file: ./src/supy/pyproject.toml
# - name: Setup tmate session for debugging
# if: failure()
# uses: mxschmitt/action-tmate@v3
# timeout-minutes: 15
# - name: upload wheels
# uses: actions/upload-artifact@v3
# with:
# name: python-package-distributions
# path: ./wheelhouse/*.whl
# deploy:
# name: Publish to (Test)PyPI
# needs:
# - build_wheels
# runs-on: ubuntu-latest
# steps:
# - name: Download all the dists
# uses: actions/download-artifact@v3
# with:
# name: python-package-distributions
# path: dist/
# - name: Publish distribution to Test PyPI
# uses: pypa/gh-action-pypi-publish@release/v1.5
# with:
# packages_dir: dist/
# verbose: true
# skip_existing: true
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/
# - name: Publish distribution to PyPI
# if: startsWith(github.ref, 'refs/tags')
# uses: pypa/gh-action-pypi-publish@release/v1.5
# with:
# packages_dir: dist/
# verbose: true
# skip_existing: true
# password: ${{ secrets.PYPI_API_TOKEN }}