-
Notifications
You must be signed in to change notification settings - Fork 0
84 lines (67 loc) · 2.38 KB
/
Copy pathbuild.yml
File metadata and controls
84 lines (67 loc) · 2.38 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
74
75
76
77
78
79
80
81
82
83
84
name: build
# Builds the tap.python package on macOS and Windows.
# The embedded Python runtime is installed by scripts/install-runtime.*
# before configuring, since the externals link against it.
on:
push:
branches: ["**"]
pull_request:
workflow_dispatch:
jobs:
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Python runtime (universal libpython for linking)
run: ./scripts/install-runtime.sh --universal
- name: Configure (universal arm64 + x86_64)
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64"
- name: Build
run: cmake --build build --config Release
- name: Test
run: ctest --test-dir build --output-on-failure
- name: Verify externals are universal
run: |
set -e
ls -la externals
for mxo in externals/*.mxo; do
bin="$mxo/Contents/MacOS/$(basename "$mxo" .mxo)"
echo "== $mxo =="
lipo -info "$bin"
lipo -info "$bin" | grep -q "arm64" && lipo -info "$bin" | grep -q "x86_64" \
|| { echo "ERROR: $bin is not universal"; exit 1; }
done
- name: Verify libpython resolves via rpath
run: |
bin="externals/tap.python~.mxo/Contents/MacOS/tap.python~"
otool -L "$bin"
otool -L "$bin" | grep -q "@rpath/libpython" \
|| { echo "ERROR: libpython is not linked via @rpath"; exit 1; }
- uses: actions/upload-artifact@v4
with:
name: tap-python-macos
path: externals/*.mxo
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Python runtime
run: powershell -ExecutionPolicy Bypass -File scripts\install-runtime.ps1
- name: Configure
run: cmake -S . -B build -A x64
- name: Build
run: cmake --build build --config Release
- name: Test
run: |
$env:PATH = "$PWD\support;$env:PATH" # so the test binary finds python3xx.dll
ctest --test-dir build --output-on-failure -C Release
- name: List externals
run: dir externals
- uses: actions/upload-artifact@v4
with:
name: tap-python-windows
path: externals/*.mxe64