diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 19e9d79..eebe29c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,7 @@ image: ghcr.io/cirruslabs/flutter:3.41.9 stages: - analyze - test + - build variables: PUB_CACHE: "$CI_PROJECT_DIR/.pub-cache" @@ -38,6 +39,33 @@ test:commons_core: - cd packages/commons_core - dart test +# Windows desktop build. Needs a Windows runner: on gitlab.com the SaaS +# `saas-windows-medium-amd64` shared runners (Windows Server 2022 with Visual +# Studio 2022 Build Tools — the C++ workload Flutter requires). Manual + +# allow_failure until the canonical remote actually has Windows runners. +build:windows: + stage: build + tags: + - saas-windows-medium-amd64 + rules: + - when: manual + allow_failure: true + # The global Linux image is ignored on Windows shell runners; override the + # global before_script (apt-get) — this job runs in PowerShell. + before_script: + - git clone --depth 1 -b stable https://github.com/flutter/flutter.git "$env:CI_PROJECT_DIR\.flutter" + - $env:PATH = "$env:CI_PROJECT_DIR\.flutter\bin;$env:PATH" + - flutter --version + - flutter pub get + script: + - cd apps\app_seeds + - dart run slang + - dart run build_runner build --delete-conflicting-outputs + - flutter build windows --release + artifacts: + paths: + - apps/app_seeds/build/windows/x64/runner/Release/ + test:app_seeds: stage: test script: