2022-02-03 22:13:31 -08:00
|
|
|
name: client_targets
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
2022-02-24 20:08:47 -08:00
|
|
|
paths:
|
|
|
|
- "client/**"
|
|
|
|
- "sdk/**"
|
|
|
|
- ".github/workflows/client-targets.yml"
|
2022-02-03 22:13:31 -08:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
check_compilation:
|
|
|
|
name: Client compilation
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
target: [aarch64-apple-ios, x86_64-apple-ios, aarch64-apple-darwin, x86_64-apple-darwin, aarch64-linux-android, armv7-linux-androideabi, i686-linux-android, x86_64-linux-android]
|
|
|
|
include:
|
|
|
|
- target: aarch64-apple-ios
|
|
|
|
platform: ios
|
|
|
|
os: macos-latest
|
|
|
|
- target: x86_64-apple-ios
|
|
|
|
platform: ios
|
|
|
|
os: macos-latest
|
|
|
|
- target: aarch64-apple-darwin
|
|
|
|
platform: ios
|
|
|
|
os: macos-latest
|
|
|
|
- target: x86_64-apple-darwin
|
|
|
|
platform: ios
|
|
|
|
os: macos-latest
|
|
|
|
- target: aarch64-linux-android
|
|
|
|
platform: android
|
|
|
|
os: ubuntu-latest
|
|
|
|
- target: armv7-linux-androideabi
|
|
|
|
platform: android
|
|
|
|
os: ubuntu-latest
|
|
|
|
- target: i686-linux-android
|
|
|
|
platform: android
|
|
|
|
os: ubuntu-latest
|
|
|
|
- target: x86_64-linux-android
|
|
|
|
platform: android
|
|
|
|
os: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: stable
|
|
|
|
target: ${{ matrix.target }}
|
|
|
|
- name: Install cargo-ndk
|
|
|
|
if: ${{ matrix.platform == 'android' }}
|
2022-09-29 20:32:23 -07:00
|
|
|
run: cargo install cargo-ndk@2.11.0
|
2022-08-04 04:14:28 -07:00
|
|
|
- name: Install NDK 21
|
|
|
|
if: ${{ matrix.platform == 'android' }}
|
|
|
|
run: |
|
|
|
|
ANDROID_ROOT=/usr/local/lib/android
|
|
|
|
ANDROID_SDK_ROOT=${ANDROID_ROOT}/sdk
|
|
|
|
SDKMANAGER=${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin/sdkmanager
|
|
|
|
echo "y" | $SDKMANAGER "ndk;21.4.7075529"
|
2022-02-03 22:13:31 -08:00
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
if: ${{ matrix.platform == 'android' }}
|
|
|
|
with:
|
|
|
|
command: ndk
|
|
|
|
args: --target ${{ matrix.target }} build -p solana-client
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
if: ${{ matrix.platform == 'ios' }}
|
|
|
|
with:
|
|
|
|
command: build
|
|
|
|
args: -p solana-client --target ${{ matrix.target }}
|
2022-10-12 00:52:00 -07:00
|
|
|
- name: Send Slack notifiaction
|
|
|
|
if: failure()
|
|
|
|
env:
|
|
|
|
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}
|
|
|
|
uses: voxmedia/github-action-slack-notify-build@v1
|
|
|
|
with:
|
|
|
|
channel: ${{ secrets.SLACK_CHANNEL }}
|
|
|
|
status: FAILED
|
|
|
|
color: danger
|