solana/.github/workflows/client-targets.yml

86 lines
2.1 KiB
YAML
Raw Normal View History

name: client_targets
on:
push:
branches:
- master
pull_request:
branches:
- master
2022-02-24 20:08:47 -08:00
paths:
- "client/**"
- "sdk/**"
- ".github/workflows/client-targets.yml"
- "ci/rust-version.sh"
env:
CARGO_TERM_COLOR: always
jobs:
android:
strategy:
matrix:
os:
- ubuntu-20.04
target:
- x86_64-linux-android
- aarch64-linux-android
- i686-linux-android
- armv7-linux-androideabi
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- run: cargo install cargo-ndk@2.12.2
- name: Setup Rust
run: |
source ci/rust-version.sh stable
rustup target add --toolchain "$rust_stable" ${{ matrix.target }}
- name: Stable build
run: ./cargo stable ndk --target ${{ matrix.target }} build -p solana-client
ios:
strategy:
matrix:
os:
- macos-11
target:
- aarch64-apple-ios
- x86_64-apple-ios
- aarch64-apple-darwin
- x86_64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Rust
run: |
source ci/rust-version.sh stable
rustup target add --toolchain "$rust_stable" ${{ matrix.target }}
- name: Stable build
run: ./cargo stable build --target ${{ matrix.target }} -p solana-client
error_reporting:
needs:
- android
- ios
if: failure() && github.event_name == 'push'
runs-on: ubuntu-20.04
steps:
- name: Slack
run: |
curl -H "Content-Type: application/json" \
-X POST ${{ secrets.SLACK_ERROR_REPORTING_WEBHOOK }} \
-d '{
"attachments": [
{
"color": "#AC514C",
"text":
"*${{ github.repository }} (${{ github.workflow }})*\n${{ github.event.head_commit.message }} - _${{ github.event.head_commit.author.name }}_\n<${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}|View Build>",
}
]
}'