Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Build Windows version with CircleCI #7041

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ orbs:
aws-cli: circleci/[email protected]
macos: circleci/[email protected] # For Rosetta (see below)
node: circleci/[email protected] # For a recent npm version (see below)
win: circleci/[email protected]
jobs:
# Build the **entire** app for macOS.
build-macos:
Expand Down Expand Up @@ -174,6 +175,55 @@ jobs:
name: Deploy to S3 (latest)
command: aws s3 sync newIDE/electron-app/dist s3://gdevelop-releases/$(git rev-parse --abbrev-ref HEAD)/latest/

# Build the **entire** app for Windows.
build-windows:
executor:
name: win/default
size: xlarge

steps:
- checkout
- run:
name: Install Node.js
command: nvm install 20; nvm use 20

# TODO: Build GDevelop.js?

- restore_cache:
keys:
- gd-win-nodejs-dependencies-{{ checksum "newIDE/app/package.json" }}-{{ checksum "newIDE/electron-app/package.json" }}-{{ checksum "GDevelop.js/package.json" }}
# fallback to using the latest cache if no exact match is found
- gd-win-nodejs-dependencies---

# GDevelop IDE dependencies.
- run:
name: Install GDevelop IDE dependencies (1)
command: nvm use 20; npm -v; cd newIDE\app; npm install; cd ..\electron-app; npm install

- save_cache:
paths:
- newIDE/electron-app/node_modules
- newIDE/app/node_modules
- GDevelop.js/node_modules
key: gd-win-nodejs-dependencies-{{ checksum "newIDE/app/package.json" }}-{{ checksum "newIDE/electron-app/package.json" }}-{{ checksum "GDevelop.js/package.json" }}

- run:
name: Build the NSIS executable
command: cd newIDE\electron-app; node scripts/build.js --win nsis --publish=never
- run:
name: Build the AppX
command: cd newIDE\electron-app; node scripts/build.js --skip-app-build --win appx --publish=never
- run:
name: Clean artifacts
command: Remove-Item -Path "newIDE\electron-app\dist\win-unpacked" -Recurse -Force

# Upload artifacts (CircleCI)
- store_artifacts:
path: newIDE/electron-app/dist

# Upload artifacts (AWS)
# TODO

# Build the WebAssembly library only (so that it's cached on a S3 and easy to re-use).
build-gdevelop_js-wasm-only:
resource_class: medium+ # Compilation time decrease linearly with the number of CPUs, but not linking (so "large" does not speedup total build time).
Expand Down Expand Up @@ -310,6 +360,7 @@ workflows:
- /experimental-build.*/
builds:
jobs:
- build-windows #TODO: filter by branch once it's verified to work.
- build-macos:
filters:
branches:
Expand Down
Loading
Loading