Merge branch 'nativeshell:main' into main #11
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
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
name: Build | |
jobs: | |
Main: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, } | |
# PKG config cross-compiling needs additional work | |
# - { target: aarch64-unknown-linux-gnu, os: ubuntu-latest, } | |
- { target: x86_64-pc-windows-msvc, os: windows-latest, } | |
- { target: x86_64-apple-darwin, os: macos-latest, } | |
project: | |
- project1 | |
- project2 | |
configuration: | |
- debug | |
- release | |
include: | |
- configuration: debug | |
cargo_args: "" | |
- configuration: release | |
cargo_args: --release | |
runs-on: ${{ matrix.platform.os }} | |
steps: | |
- name: Install GTK | |
if: (matrix.platform.os == 'ubuntu-latest') | |
run: sudo apt-get update && sudo apt-get install libgtk-3-dev | |
- uses: actions/checkout@v2 | |
- uses: subosito/flutter-action@v2 | |
with: | |
channel: 'main' | |
- run: rustup target add ${{ matrix.platform.target }} | |
- run: flutter config --enable-windows-desktop | |
- run: flutter config --enable-linux-desktop | |
- run: flutter config --enable-macos-desktop | |
- name: enable native assets | |
run: flutter config --enable-native-assets | |
- run: flutter pub get | |
working-directory: ./build_test/${{ matrix.project }} | |
- run: cargo build --target=${{ matrix.platform.target }} ${{ matrix.cargo_args }} | |
working-directory: ./build_test/${{ matrix.project }} | |
- if: (matrix.configuration == 'release') | |
run: cargo build --target=${{ matrix.platform.target }} ${{ matrix.cargo_args }} | |
working-directory: ./build_test/${{ matrix.project }} | |
env: | |
FLUTTER_PROFILE: 1 | |