|
| 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