|
23 | 23 | description: "Build Linux ARM Wheels" |
24 | 24 | type: boolean |
25 | 25 | default: true |
| 26 | + runner: |
| 27 | + description: Choose MacOS Action Runner Type |
| 28 | + type: choice |
| 29 | + options: |
| 30 | + - "self-hosted" |
| 31 | + - "macos-12" |
| 32 | + - "macos-13" |
| 33 | + - "macos-14" |
| 34 | + - "macos-15" |
| 35 | + default: "self-hosted" |
26 | 36 |
|
27 | 37 | env: |
28 | | - VCPKG_ROOT: "${{ github.workspace }}/vcpkg" |
29 | | - VCPKG_FEATURE_FLAGS: "dependencygraph" |
| 38 | + VCPKG_ROOT: ${{ github.workspace }}/vcpkg |
| 39 | + VCPKG_FEATURE_FLAGS: dependencygraph |
30 | 40 | VCPKG_DISABLE_METRICS: true |
31 | 41 | BUILD_PRESET: "release" |
32 | 42 |
|
@@ -67,42 +77,110 @@ jobs: |
67 | 77 | build_wheels-macos: |
68 | 78 | name: MacOS Wheels Build |
69 | 79 | needs: [get_macos_matrix] |
70 | | - runs-on: self-hosted-${{ matrix.type }} |
| 80 | + runs-on: ${{ inputs.runner }}-${{ matrix.type }} |
71 | 81 | strategy: |
72 | 82 | fail-fast: false |
73 | 83 | matrix: |
74 | 84 | include: ${{ fromJSON(needs.get_macos_matrix.outputs.matrix) }} |
75 | | - env: |
76 | | - VCPKG_BINARY_SOURCES: "clear;files,/Users/sre/GitHub/vcpkg-cache-deepframe-${{ matrix.type }},readwrite" |
| 85 | + |
77 | 86 | steps: |
| 87 | + - name: set platform name |
| 88 | + id: platform-name |
| 89 | + shell: bash |
| 90 | + env: |
| 91 | + TYPE: ${{ matrix.type }} |
| 92 | + run: | |
| 93 | + case "${TYPE}" in |
| 94 | + xlarge) |
| 95 | + echo "platform=macosx_11_0_arm64" >> $GITHUB_OUTPUT |
| 96 | + echo "arch=arm64" >> $GITHUB_OUTPUT |
| 97 | + echo "triplet=arm64-osx" >> $GITHUB_OUTPUT |
| 98 | + ;; |
| 99 | + large) |
| 100 | + echo "platform=macosx_10_9_x86_64" >> $GITHUB_OUTPUT |
| 101 | + echo "arch=x86_64" >> $GITHUB_OUTPUT |
| 102 | + echo "triplet=x64-osx" >> $GITHUB_OUTPUT |
| 103 | + ;; |
| 104 | + esac |
| 105 | +
|
| 106 | + - name: set vcpkg cache path |
| 107 | + id: vcpkg-cache |
| 108 | + shell: bash |
| 109 | + env: |
| 110 | + ARCH: ${{ steps.platform-name.outputs.arch }} |
| 111 | + run: | |
| 112 | + echo "cache_path=/Users/sre/GitHub/vcpkg-cache-deepframe-${{ steps.platform-name.outputs.triplet }}" >> $GITHUB_OUTPUT |
| 113 | +
|
78 | 114 | - name: clone repository |
79 | 115 | uses: actions/checkout@v4.2.2 |
80 | 116 |
|
| 117 | + - name: setup python ${{ matrix.python }} |
| 118 | + uses: actions/setup-python@v5.3.0 |
| 119 | + if: inputs.runner != 'self-hosted' |
| 120 | + with: |
| 121 | + python-version: ${{ matrix.python }} |
| 122 | + |
81 | 123 | - name: setup python ${{ matrix.python }} environment |
82 | 124 | id: setup |
83 | 125 | shell: bash |
84 | 126 | run: |- |
85 | 127 | python${{ matrix.python }} -m venv "venv_${{ matrix.venv }}" |
86 | 128 | source "venv_${{ matrix.venv }}/bin/activate" |
87 | | - python"${{ matrix.python }}" -m pip install -qqq -U pip setuptools build; deactivate |
| 129 | + python"${{ matrix.python }}" -m pip install -qqq -U pip setuptools build cmake==3.29.2 |
| 130 | + deactivate |
| 131 | + echo -e "\n[bdist_wheel]\nplat-name = ${{ steps.platform-name.outputs.platform }}" >> setup.cfg |
88 | 132 |
|
89 | 133 | - name: install vcpkg |
90 | 134 | shell: bash |
91 | | - run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 1de2026f28ead93ff1773e6e680387643e914ea1 && ./bootstrap-vcpkg.sh |
| 135 | + run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 6f29f12e82a8293156836ad81cc9bf5af41fe836 && ./bootstrap-vcpkg.sh |
| 136 | + |
| 137 | + - name: install vcpkg dependencies |
| 138 | + shell: bash |
| 139 | + env: |
| 140 | + VCPKG_ROOT: ${{ github.workspace }}/vcpkg |
| 141 | + VCPKG_TARGET_TRIPLET: ${{ steps.platform-name.outputs.triplet }} |
| 142 | + VCPKG_HOST_TRIPLET: ${{ steps.platform-name.outputs.triplet }} |
| 143 | + run: | |
| 144 | + cd vcpkg |
| 145 | + ./vcpkg install --triplet=${{ steps.platform-name.outputs.triplet }} openssl liblzma libiconv zlib |
| 146 | + cd .. |
| 147 | +
|
| 148 | + - name: clean build artifacts |
| 149 | + shell: bash |
| 150 | + run: | |
| 151 | + # Clean build directory to ensure fresh build |
| 152 | + rm -rf build |
| 153 | + # Clean architecture-specific FFmpeg installations |
| 154 | + rm -rf .ext-* |
92 | 155 |
|
93 | 156 | - name: build py${{ matrix.python }} |
| 157 | + env: |
| 158 | + CMAKE_OSX_ARCHITECTURES: ${{ steps.platform-name.outputs.arch }} |
| 159 | + VCPKG_TARGET_TRIPLET: ${{ steps.platform-name.outputs.triplet }} |
| 160 | + VCPKG_HOST_TRIPLET: ${{ steps.platform-name.outputs.triplet }} |
| 161 | + VCPKG_BINARY_SOURCES: "clear" |
| 162 | + VCPKG_DISABLE_METRICS: true |
| 163 | + VCPKG_OVERLAY_TRIPLETS: "" |
| 164 | + VCPKG_OVERLAY_PORTS: "" |
94 | 165 | shell: bash |
95 | 166 | run: |- |
| 167 | + CMAKE_PATH=$(whereis cmake | awk '{print $2}') |
| 168 | + CMAKE_DIR=$(dirname "$CMAKE_PATH") |
| 169 | + echo "$CMAKE_DIR" >> $GITHUB_PATH |
| 170 | + |
96 | 171 | source "venv_${{ matrix.venv }}/bin/activate" |
97 | 172 | python"${{ matrix.python }}" -m pip install -r requirements-dev.txt && |
98 | 173 | python"${{ matrix.python }}" scripts/build.py "${{ env.BUILD_PRESET }}" |
99 | | - python"${{ matrix.python }}" -m build; deactivate |
| 174 | + python"${{ matrix.python }}" -m build |
| 175 | + deactivate |
100 | 176 |
|
101 | 177 | - name: run tests |
| 178 | + if: matrix.type != 'x86_64' |
102 | 179 | shell: bash |
103 | 180 | run: |- |
104 | 181 | source "venv_${{ matrix.venv }}/bin/activate" |
105 | | - timeout -k 10s 30m python"${{ matrix.python }}" -m pytest; deactivate |
| 182 | + timeout -k 10s 30m python"${{ matrix.python }}" -m pytest |
| 183 | + deactivate |
106 | 184 |
|
107 | 185 | - uses: actions/upload-artifact@v4.6.1 |
108 | 186 | if: ${{ always() }} |
@@ -159,13 +237,18 @@ jobs: |
159 | 237 | shell: bash |
160 | 238 | run: git clone -b "${{ github.ref_name }}" "https://activeloop-bot:${{ secrets.ORG_GH_BOT_PAT }}@github.com/${{ github.repository }}" . |
161 | 239 |
|
| 240 | + - name: setup environment |
| 241 | + shell: bash |
| 242 | + run: | |
| 243 | + echo -e "\n[bdist_wheel]\nplat-name = manylinux2014_${{ matrix.type }}" >> setup.cfg |
| 244 | +
|
162 | 245 | - name: download vcpkg cache |
163 | 246 | shell: bash |
164 | 247 | run: source scripts/build_scripts/get_creds.sh && python3.11 scripts/build_scripts/manage_cache.py download deepframe |
165 | 248 |
|
166 | 249 | - name: install vcpkg |
167 | 250 | shell: bash |
168 | | - run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 1de2026f28ead93ff1773e6e680387643e914ea1 && ./bootstrap-vcpkg.sh |
| 251 | + run: git clone https://github.com/microsoft/vcpkg.git && cd vcpkg && git checkout 6f29f12e82a8293156836ad81cc9bf5af41fe836 && ./bootstrap-vcpkg.sh |
169 | 252 |
|
170 | 253 | - name: build py${{ matrix.python }} |
171 | 254 | shell: bash |
|
0 commit comments