Expose phonex-channels-clients to FFI #169
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on https://gist.github.com/learnopengles/60c945b92fbe60a0fecaa0143c35c4a for testing in simulator | |
name: x86_64-apple-ios | |
on: pull_request | |
env: | |
TOOLCHAIN: nightly | |
CARGO_TERM_COLOR: always | |
DYLD_ROOT_PATH: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/ | |
jobs: | |
integration_tests: | |
# rust cross-compilation | |
runs-on: macos-12 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust Nightly | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ env.TOOLCHAIN }} | |
target: x86_64-apple-ios | |
default: true | |
- name: Cache | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin | |
~/.cargo/git | |
~/.cargo/registry | |
target | |
key: ${{ github.workflow }}-${{ github.job }}-toolchain-${{ env.TOOLCHAIN }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --package liveview-native-core | |
- name: Set linker | |
run: echo "CARGO_TARGET_X86_64_APPLE_IOS_LINKER=$PWD/crates/core/tests/support/linker_shim.sh" >> $GITHUB_ENV | |
- name: Build tests | |
run: cargo test --package liveview-native-core --no-run --target=x86_64-apple-ios | |
- name: Start Simulator | |
uses: futureware-tech/simulator-action@v3 | |
with: | |
os: 'iOS' | |
- name: Copy unittests to app bundle | |
run: | | |
cp `find target/x86_64-apple-ios/debug/deps/ -perm +111 -type f -name "liveview_native_core-*" -exec ls -l -D "%FT%T" {} \; | awk '{ print $6, $7 }' | sort -r | awk '{ print $2 }' | head -1` crates/core/tests/support/app/test | |
- name: Install unittests into Simulator | |
run: xcrun simctl install booted crates/core/tests/support/app | |
- name: Run unittests | |
run: | | |
xcrun simctl launch --console booted com.rust.tests | tee output | |
grep -q "test result: ok." output | |
- name: Uninstall unittests from Simulator | |
run: xcrun simctl uninstall booted com.rust.tests | |
- name: Copy diff to app bundle | |
run: cp `find target/x86_64-apple-ios/debug/deps/ -perm +111 -type f -name "diff-*" -exec ls -l -D "%FT%T" {} \; | awk '{ print $6, $7 }' | sort -r | awk '{ print $2 }' | head -1` crates/core/tests/support/app/test | |
- name: Install diff into Simulator | |
run: xcrun simctl install booted crates/core/tests/support/app | |
- name: Run diff | |
run: | | |
xcrun simctl launch --console booted com.rust.tests | tee output | |
grep -q "test result: ok." output | |
- name: Uninstall diff from Simulator | |
run: xcrun simctl uninstall booted com.rust.tests | |
- name: Copy dom to app bundle | |
run: cp `find target/x86_64-apple-ios/debug/deps/ -perm +111 -type f -name "dom-*" -exec ls -l -D "%FT%T" {} \; | awk '{ print $6, $7 }' | sort -r | awk '{ print $2 }' | head -1` crates/core/tests/support/app/test | |
- name: Install dom into Simulator | |
run: xcrun simctl install booted crates/core/tests/support/app | |
- name: Run dom | |
run: | | |
xcrun simctl launch --console booted com.rust.tests | tee output | |
grep -q "test result: ok." output | |
- name: Uninstall dom from Simulator | |
run: xcrun simctl uninstall booted com.rust.tests | |
- name: Copy parser to app bundle | |
run: cp `find target/x86_64-apple-ios/debug/deps/ -perm +111 -type f -name "parser-*" -exec ls -l -D "%FT%T" {} \; | awk '{ print $6, $7 }' | sort -r | awk '{ print $2 }' | head -1` crates/core/tests/support/app/test | |
- name: Install parser into Simulator | |
run: xcrun simctl install booted crates/core/tests/support/app | |
- name: Run parser | |
run: | | |
xcrun simctl launch --console booted com.rust.tests | tee output | |
grep -q "test result: ok." output | |
- name: Uninstall parser from Simulator | |
run: xcrun simctl uninstall booted com.rust.tests |