Skip to content

Commit 8170996

Browse files
committed
Add macos-dynamic tests
1 parent 0fd0f1b commit 8170996

File tree

2 files changed

+86
-0
lines changed

2 files changed

+86
-0
lines changed

.github/actions/setup-vcpkg/action.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ runs:
1717
run: |
1818
. <(curl https://aka.ms/vcpkg-init.sh -L)
1919
echo "PATH=$VCPKG_ROOT;$PATH" >> $GITHUB_ENV
20+
# osx dynamic fix, bandaid until next vcpkg tool release
21+
wget https://raw.githubusercontent.com/microsoft/vcpkg/9558037875497b9db8cf38fcd7db68ec661bffe7/scripts/cmake/z_vcpkg_fixup_rpath_macho.cmake -O ${VCPKG_ROOT}/scripts/cmake/z_vcpkg_fixup_rpath_macho.cmake
2022
2123
- name: Setup vcpkg
2224
if: runner.os == 'Windows'
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
---
2+
name: 🍎 MacOS Dynamic
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
build-osx-dynamic:
15+
permissions:
16+
contents: read
17+
packages: write
18+
strategy:
19+
matrix:
20+
include:
21+
- os: macos-13
22+
triplet: x64-osx-dynamic
23+
- os: macos-14
24+
triplet: arm64-osx-dynamic
25+
env:
26+
buildtrees: /Users/runner/vcpkg-build
27+
name: build (macos)
28+
runs-on: ${{ matrix.os }}
29+
30+
steps:
31+
- name: 🐣 Checkout
32+
uses: actions/checkout@v4
33+
34+
- name: 🐩 Install CMake and Ninja
35+
uses: lukka/get-cmake@latest
36+
37+
- name: 🧽 Developer Command Prompt for Microsoft Visual C++
38+
uses: ilammy/msvc-dev-cmd@v1
39+
40+
- name: 🔨 Prepare build env
41+
run: |
42+
brew install autoconf automake autoconf-archive libtool
43+
44+
- name: 🐕 Checkout vcpkg
45+
uses: actions/checkout@v4
46+
with:
47+
repository: microsoft/vcpkg
48+
ref: c4467cb686f92671f0172aa8299a77d908175b4e # TODO: can we have a canonical baseline for tests?
49+
path: vcpkg
50+
fetch-depth: 1
51+
52+
- name: 🐾 Bootstrap vcpkg
53+
shell: bash
54+
run: |
55+
PKG_SOURCE_USER=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1)
56+
./vcpkg/bootstrap-vcpkg.sh
57+
NUGET_EXE=$(./vcpkg/vcpkg fetch nuget | grep '^\/.*nuget.exe$')
58+
echo "Downloaded $NUGET_EXE"
59+
mono $NUGET_EXE sources add -Name ghpkg -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" -UserName "$PKG_SOURCE_USER" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText
60+
mono $NUGET_EXE setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json"
61+
echo "VCPKG_BINARY_SOURCES=clear;nuget,https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json,readwrite" >> $GITHUB_ENV
62+
VCPKG_ROOT=$(pwd)/vcpkg
63+
echo "PATH=$VCPKG_ROOT;$PATH" >> $GITHUB_ENV
64+
echo "VCPKG_ROOT=$VCPKG_ROOT" >> $GITHUB_ENV
65+
66+
- name: 🌋 Build
67+
run: |
68+
VCPKG_OPTIONS="--overlay-ports="${{ github.workspace }}/ports" --host-triplet=${{ matrix.triplet }} --triplet=${{ matrix.triplet }} --x-buildtrees-root=${{ env.buildtrees }}"
69+
./vcpkg/vcpkg install $VCPKG_OPTIONS py-pip
70+
./vcpkg/vcpkg install $VCPKG_OPTIONS py-sip
71+
./vcpkg/vcpkg install $VCPKG_OPTIONS py-numpy
72+
./vcpkg/vcpkg install $VCPKG_OPTIONS py-psycopg2
73+
./vcpkg/vcpkg install $VCPKG_OPTIONS py-urllib3
74+
./vcpkg/vcpkg install $VCPKG_OPTIONS py-markupsafe
75+
./vcpkg/vcpkg install $VCPKG_OPTIONS py-matplotlib
76+
./vcpkg/vcpkg install $VCPKG_OPTIONS py-requests
77+
./vcpkg/vcpkg install $VCPKG_OPTIONS py-pyqt6
78+
79+
- name: 📑 Upload logs
80+
uses: actions/upload-artifact@v4
81+
if: failure()
82+
with:
83+
name: logs-${{ matrix.triplet }}
84+
path: ${{ env.buildtrees }}/**/*.log

0 commit comments

Comments
 (0)