|
29 | 29 | x86_64-ios-sim,
|
30 | 30 | aarch64-ios-macabi,
|
31 | 31 | x86_64-ios-macabi,
|
| 32 | + cross-macos-aarch64, |
| 33 | + cross-ios-aarch64, |
32 | 34 | win32,
|
33 | 35 | win64,
|
34 | 36 | mingw32,
|
|
86 | 88 | rust: stable
|
87 | 89 | target: x86_64-apple-ios-macabi
|
88 | 90 | no_run: --no-run # FIXME(madsmtm): Fix running tests
|
| 91 | + - build: cross-macos-aarch64 |
| 92 | + os: ubuntu-latest |
| 93 | + rust: stable |
| 94 | + target: aarch64-apple-darwin |
| 95 | + no_run: --no-run |
| 96 | + - build: cross-ios-aarch64 |
| 97 | + os: ubuntu-latest |
| 98 | + rust: stable |
| 99 | + target: aarch64-apple-ios |
| 100 | + no_run: --no-run |
89 | 101 | - build: windows-aarch64
|
90 | 102 | os: windows-latest
|
91 | 103 | rust: stable
|
@@ -155,6 +167,27 @@ jobs:
|
155 | 167 | env:
|
156 | 168 | CC: ${{ matrix.CC }}
|
157 | 169 | CXX: ${{ matrix.CXX }}
|
| 170 | + - name: Download macOS SDK |
| 171 | + if: startsWith(matrix.build, 'cross-macos') |
| 172 | + run: | |
| 173 | + wget https://github.com/phracker/MacOSX-SDKs/releases/download/11.3/MacOSX11.3.sdk.tar.xz |
| 174 | + tar -xf MacOSX11.3.sdk.tar.xz |
| 175 | + echo "SDKROOT=$(pwd)/MacOSX11.3.sdk" >> $GITHUB_ENV |
| 176 | + - name: Download iOS SDK |
| 177 | + if: startsWith(matrix.build, 'cross-ios') |
| 178 | + run: | |
| 179 | + wget https://github.com/xybp888/iOS-SDKs/releases/download/iOS18.1-SDKs/iPhoneOS18.1.sdk.zip |
| 180 | + unzip iPhoneOS18.1.sdk.zip |
| 181 | + echo "SDKROOT=$(pwd)/iPhoneOS18.1.sdk" >> $GITHUB_ENV |
| 182 | + - name: Set up Apple cross-compilation |
| 183 | + if: startsWith(matrix.build, 'cross-macos') || startsWith(matrix.build, 'cross-ios') |
| 184 | + run: | |
| 185 | + # Test with clang for now, has better cross-compilation support (GCC requires downloading a different toolchain) |
| 186 | + echo "CC=clang" >> $GITHUB_ENV |
| 187 | + echo "CXX=clang++" >> $GITHUB_ENV |
| 188 | + # Link with rust-lld |
| 189 | + UPPERCASE_TARGET_NAME=$(echo "${{ matrix.target }}" | tr '[:lower:]-' '[:upper:]_') |
| 190 | + echo "CARGO_TARGET_${UPPERCASE_TARGET_NAME}_LINKER=rust-lld" >> $GITHUB_ENV |
158 | 191 | - name: setup dev environment
|
159 | 192 | uses: ilammy/msvc-dev-cmd@v1
|
160 | 193 | if: startsWith(matrix.build, 'windows-clang')
|
|
0 commit comments