ci: up #19
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: Build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: | |
- ubuntu-latest | |
# - windows-latest | |
# - macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
version: 6.7.3 | |
cache: true | |
- name: Install ninja-build tool (must be after Qt due PATH changes) | |
if: ${{ runner.os == 'Windows' }} | |
uses: turtlesec-no/get-ninja@main | |
- name: Make sure MSVC is found when Ninja generator is in use | |
if: ${{ runner.os == 'Windows' }} | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Install dependencies on Ubuntu | |
if: ${{ runner.os == 'Linux' }} | |
run: | | |
sudo apt update -qq | |
sudo apt install ninja-build lld xvfb -y | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: '3.24.0' | |
channel: 'stable' | |
- name: Checkout qt-embedder | |
uses: actions/checkout@v4 | |
- name: Create folder structure | |
run: | | |
mkdir -p 3rdparty/out/host_debug_unopt/ | |
- name: Checkout flutter engine | |
uses: actions/checkout@v4 | |
with: | |
repository: iamsergio/engine.git | |
ref: wip/multiwindow | |
path: 3rdparty/flutter/ | |
- name: Fix embedder header | |
run: cp 3rdparty/flutter/shell/platform/embedder/embedder.h 3rdparty/flutter/shell/platform/embedder/flutter_embedder.h | |
- name: Download engine binary | |
run: | | |
./download_engine.sh | |
cp libflutter_engine.so 3rdparty/out/host_debug_unopt/ | |
env: | |
GH_TOKEN: ${{ github.token }} | |
- name: Configure project | |
run: cmake -S . -B ./build-dev --preset dev | |
env: | |
FLUTTER_ENGINE_FOLDER: ${{ github.workspace }}/3rdparty/flutter/ | |
- name: Build Project ${{ matrix.preset.build_preset_arg }} | |
run: cmake --build ./build-dev | |
env: | |
FLUTTER_ENGINE_FOLDER: ${{ github.workspace }}/3rdparty/flutter/ | |
- name: Build example | |
run: | | |
./build_example.sh |