Clean up CI config for Electron builds

This commit is contained in:
Joan
2025-11-28 10:39:49 +01:00
parent e5029c558b
commit e16352c5d3

View File

@@ -1,25 +1,11 @@
stages: stages:
- test
- build-web - build-web
- build-desktop - build-desktop
variables: variables:
# Cache configuration
npm_config_cache: "$CI_PROJECT_DIR/.npm" npm_config_cache: "$CI_PROJECT_DIR/.npm"
ELECTRON_CACHE: "$CI_PROJECT_DIR/.cache/electron" ELECTRON_CACHE: "$CI_PROJECT_DIR/.cache/electron"
# Simple test job - NO TAGS - should run on any runner
test:runner:
stage: test
image: alpine:latest
script:
- echo "✅ Runner is working!"
- echo "Runner can execute jobs successfully"
- ls -la
rules:
- if: '$CI_PIPELINE_SOURCE == "push"'
# Cache node_modules and electron cache
cache: cache:
key: ${CI_COMMIT_REF_SLUG} key: ${CI_COMMIT_REF_SLUG}
paths: paths:
@@ -40,9 +26,9 @@ build:web:
- pwa/dist/ - pwa/dist/
expire_in: 1 hour expire_in: 1 hour
rules: rules:
- if: '$CI_COMMIT_TAG' # Run on tags - if: '$CI_COMMIT_TAG'
- if: '$CI_COMMIT_BRANCH == "main"' # Run on main branch tags:
- if: '$CI_COMMIT_BRANCH == "develop"' # Run on develop branch - docker
# Build Linux AppImage and .deb # Build Linux AppImage and .deb
build:linux: build:linux:
@@ -60,7 +46,7 @@ build:linux:
- pwa/dist-electron/*.deb - pwa/dist-electron/*.deb
expire_in: 1 week expire_in: 1 week
rules: rules:
- if: '$CI_COMMIT_TAG' # Only run on tags - if: '$CI_COMMIT_TAG'
tags: tags:
- docker - docker
@@ -80,54 +66,6 @@ build:windows:
- pwa/dist-electron/*.msi - pwa/dist-electron/*.msi
expire_in: 1 week expire_in: 1 week
rules: rules:
- if: '$CI_COMMIT_TAG' # Only run on tags - if: '$CI_COMMIT_TAG'
tags: tags:
- docker - docker
# Build macOS (requires macOS runner - optional)
# Uncomment if you have a macOS runner available
# build:mac:
# stage: build-desktop
# dependencies:
# - build:web
# script:
# - cd pwa
# - npm ci
# - npm run electron:build:mac
# artifacts:
# paths:
# - pwa/dist-electron/*.dmg
# expire_in: 1 week
# rules:
# - if: '$CI_COMMIT_TAG'
# tags:
# - macos
# Manual job to test builds without tags
build:manual:
stage: build-desktop
image: electronuserland/builder:wine
script:
- cd pwa
- npm ci
- npm run electron:build:linux
artifacts:
paths:
- pwa/dist-electron/
expire_in: 1 day
when: manual
tags:
- docker
# Test job to verify CI is working (no tags required)
test:ci:
stage: build-web
image: alpine:latest
script:
- echo "CI is working!"
- echo "Project directory:"
- ls -la
- echo "PWA directory:"
- ls -la pwa/ || echo "PWA directory not found"
rules:
- if: '$CI_PIPELINE_SOURCE == "push"' # Run on every push