Skip to content

Update CI & fixed build wasm & update CI badge #13

Update CI & fixed build wasm & update CI badge

Update CI & fixed build wasm & update CI badge #13

Workflow file for this run

name: Build Test
on: [push, pull_request, workflow_dispatch]
concurrency:
# Cancels the workflow
# when another event in the same context happens.
# If it's a PR, context is the pull request number.
# Otherwise, it uses the Git reference(branch or tag name).
group: >
${{ github.workflow }}
${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build:
name: build ${{ matrix.target }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false # important
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
target: [apk, appbundle, web] # For all platforms
include:
- os: ubuntu-latest # For Linux platform
target: linux
- os: macos-latest # For macOS platform
target: macos
- os: macos-latest # For macOS platform
target: ios --no-codesign
- os: windows-latest # For Windows platform
target: windows
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Setup Flutter Toolchain
uses: subosito/flutter-action@v2
with:
channel: "stable"
cache: true
- name: Setup Rust Toolchain
uses: dtolnay/rust-toolchain@stable
- name: Setup Ninja and GTK3 Toolchain (Only Linux platform)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
- name: Setup Java Toolchain (Only Android target)
if: matrix.target == 'apk' || matrix.target == 'appbundle'
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "11"
cache: "gradle"
- name: Fetch Dependencies
working-directory: example/
run: flutter pub get
- name: Build Wasm (Only Web target)
if: matrix.target == 'web'
working-directory: example/
run: dart run rust_in_flutter wasm --release
- name: Build Target ${{ matrix.target }}
working-directory: example/
run: flutter build ${{ matrix.target }}