|
34 | 34 | cargo generate-lockfile -Z minimal-versions
|
35 | 35 | cargo test --features=custom,std
|
36 | 36 |
|
| 37 | + # TODO: add aarch64-based macOS runner when it's supported by Github Actions |
37 | 38 | main-tests:
|
38 | 39 | name: Tier 1 Test
|
39 | 40 | runs-on: ${{ matrix.os }}
|
@@ -81,26 +82,29 @@ jobs:
|
81 | 82 | sudo apt-get install gcc-multilib
|
82 | 83 | - run: cargo test --target=${{ matrix.target }} --features=std
|
83 | 84 |
|
84 |
| - # We can only Build/Link on these targets for now. |
85 |
| - # TODO: Run the iOS binaries in the simulator |
86 |
| - # TODO: build/run aarch64-apple-darwin binaries on a x86_64 Mac |
87 |
| - apple-tests: |
88 |
| - name: Additional Apple targets |
| 85 | + ios-tests: |
| 86 | + name: iOS Simulator Test |
89 | 87 | runs-on: macos-latest
|
90 |
| - strategy: |
91 |
| - matrix: |
92 |
| - target: [ |
93 |
| - aarch64-apple-ios, |
94 |
| - x86_64-apple-ios, |
95 |
| - ] |
96 | 88 | steps:
|
97 | 89 | - uses: actions/checkout@v2
|
98 | 90 | - uses: dtolnay/rust-toolchain@stable
|
99 | 91 | with:
|
100 | 92 | targets: x86_64-apple-ios
|
101 | 93 | - uses: Swatinem/rust-cache@v1
|
102 |
| - - name: Build Tests |
103 |
| - run: cargo test --no-run --target=${{ matrix.target }} --features=std |
| 94 | + - name: Download cargo-dinghy |
| 95 | + run: | |
| 96 | + VERSION=0.6.2 |
| 97 | + URL="https://github.com/sonos/dinghy/releases/download/${VERSION}/cargo-dinghy-macos-${VERSION}.tgz" |
| 98 | + curl -L $URL | tar -xz --strip-components=1 -C ~/.cargo/bin |
| 99 | + cargo dinghy --version |
| 100 | + - name: Setup Simulator |
| 101 | + run: | |
| 102 | + RUNTIME_ID=$(xcrun simctl list runtimes | grep iOS | cut -d ' ' -f 7 | tail -1) |
| 103 | + SIM_ID=$(xcrun simctl create My-iphone7 com.apple.CoreSimulator.SimDeviceType.iPhone-7 $RUNTIME_ID) |
| 104 | + xcrun simctl boot $SIM_ID |
| 105 | + echo "device=$SIM_ID" >> $GITHUB_ENV |
| 106 | + - name: Run tests |
| 107 | + run: cargo dinghy -d ${{ env.device }} test |
104 | 108 |
|
105 | 109 | windows-tests:
|
106 | 110 | name: Windows Test
|
@@ -143,6 +147,18 @@ jobs:
|
143 | 147 | - name: Test
|
144 | 148 | run: cross test --no-fail-fast --target=${{ matrix.target }} --features=std
|
145 | 149 |
|
| 150 | + macos-link: |
| 151 | + name: macOS ARM64 Build/Link |
| 152 | + runs-on: macos-latest |
| 153 | + steps: |
| 154 | + - uses: actions/checkout@v2 |
| 155 | + - uses: dtolnay/rust-toolchain@stable |
| 156 | + with: |
| 157 | + targets: aarch64-apple-darwin, aarch64-apple-ios |
| 158 | + - uses: Swatinem/rust-cache@v1 |
| 159 | + - run: cargo test --no-run --target=aarch64-apple-darwin --features=std |
| 160 | + - run: cargo test --no-run --target=aarch64-apple-ios --features=std |
| 161 | + |
146 | 162 | cross-link:
|
147 | 163 | name: Cross Build/Link
|
148 | 164 | runs-on: ubuntu-latest
|
|
0 commit comments