-
Notifications
You must be signed in to change notification settings - Fork 29
73 lines (65 loc) · 1.98 KB
/
Copy pathci.yml
File metadata and controls
73 lines (65 loc) · 1.98 KB
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
name: CI
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
FORCE_COLOR: 3
jobs:
checks:
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest, macos-14, windows-latest]
session: [dist, test]
name: ${{ matrix.session }} on ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- uses: fortran-lang/setup-fortran@v1
id: setup-fortran
with:
compiler: gcc
version: 12
# setup-fortran installs MinGW via choco, which only edits the machine PATH
# registry; GitHub Actions doesn't reload that into the running job. Put the
# bin dir on PATH so CMake can find gcc/gfortran (see pi-fortran override).
- name: Add MinGW to PATH (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
$bin = Split-Path (Get-ChildItem C:\ProgramData\chocolatey\lib\mingw -Recurse -Filter gfortran.exe | Select-Object -First 1).FullName
"$bin" | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8
- uses: astral-sh/setup-uv@v8.0.0
- run: uvx nox -s ${{ matrix.session }}
cibuildwheel:
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on: [ubuntu-latest, windows-latest, macos-14]
package: [hello-free-threading, core-nanobind-shared]
name: cibw ${{ matrix.package }} on ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v8.0.0
- uses: pypa/cibuildwheel@v2.21
with:
package-dir: projects/${{ matrix.package }}
env:
CIBW_PRERELEASE_PYTHONS: True
pass:
if: always()
needs: [checks]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}