Update CI #171
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
name: CI | |
on: | |
push: | |
branches: | |
- '**' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
version: "23.3" | |
- name: Build | |
run: cargo build --verbose | |
build-dotnet: | |
name: Build C# | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: '8.0.x' | |
- name: Run setup | |
shell: pwsh | |
run: | | |
.\setup.ps1 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
version: "23.3" | |
- name: Build library | |
shell: pwsh | |
run: | | |
.\generate-csharp.ps1 | |
dotnet build -c Release .\bindings\csharp\InterShareSdk | |
build-android: | |
name: Build Kotlin | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- uses: nttld/setup-ndk@v1 | |
id: setup-ndk | |
with: | |
ndk-version: r26c | |
add-to-path: true | |
link-to-sdk: true | |
- name: Validate Gradle wrapper | |
uses: gradle/wrapper-validation-action@ccb4328a959376b642e027874838f60f8e596de3 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
version: "23.3" | |
- name: Build library | |
env: | |
ANDROID_NDK_HOME: ${{ steps.setup-ndk.outputs.ndk-path }} | |
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
VERSION: ${{ github.event.inputs.version }} | |
run: | | |
echo $ANDROID_NDK_HOME | |
echo $ANDROID_NDK_TOOLCHAIN_DIR | |
rustup target add x86_64-linux-android x86_64-unknown-linux-gnu aarch64-linux-android armv7-linux-androideabi i686-linux-android | |
cd bindings/kotlin | |
./gradlew clean build | |
build-apple: | |
name: Build Swift | |
runs-on: macOS-latest | |
steps: | |
- uses: swift-actions/setup-swift@65540b95f51493d65f5e59e97dcef9629ddf11bf | |
with: | |
swift-version: 6.0.3 | |
- uses: actions/checkout@v4 | |
- name: Install Protoc | |
uses: arduino/setup-protoc@v3 | |
with: | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
version: "23.3" | |
- name: Build library | |
run: | | |
./generate-swift.sh |