This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Build, package and test #1
This file contains hidden or 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, package and test | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - '**/*.md' | |
| - 'TheiaIDE logo/**' | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - master | |
| paths-ignore: | |
| - '**/*.md' | |
| - 'TheiaIDE logo/**' | |
| schedule: | |
| - cron: "0 4 * * *" # Runs every day at 4am: https://docs.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule | |
| jobs: | |
| build: | |
| name: ${{ matrix.os }}, Node.js v${{ matrix.node }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-2022, ubuntu-22.04, macos-15, macos-15-intel] # macos-15-intel is for x64, macOS-15 is for arm64 | |
| node: ["24.x"] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 60 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
| with: | |
| fetch-depth: 0 # To fetch all history for all branches and tags. (Will be required for caching with lerna: https://github.com/markuplint/markuplint/pull/111) | |
| - name: Use Node.js ${{ matrix.node }} | |
| uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3.8.2 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| registry-url: "https://registry.npmjs.org" | |
| - name: Use Python 3.13 | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: '3.13' | |
| - name: Install dependencies | |
| shell: bash | |
| run: yarn --skip-integrity-check --network-timeout 100000 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Lint | |
| shell: bash | |
| run: yarn lint | |
| - name: Build dev package (Windows, Linux) | |
| if: (runner.os == 'Windows' || runner.os == 'Linux') && github.event_name == 'pull_request' | |
| shell: bash | |
| run: | | |
| yarn build:dev | |
| yarn download:plugins | |
| yarn package:applications:preview | |
| env: | |
| NODE_OPTIONS: --max_old_space_size=4096 | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9 | |
| - name: Build prod package (Windows, Linux) | |
| if: (runner.os == 'Windows' || runner.os == 'Linux') && github.event_name != 'pull_request' | |
| shell: bash | |
| run: | | |
| yarn build | |
| yarn download:plugins | |
| yarn package:applications | |
| env: | |
| NODE_OPTIONS: --max_old_space_size=4096 | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9 | |
| - name: Update electron-builder.yml for macos-15 | |
| if: matrix.os == 'macos-15' | |
| run: | | |
| sed -i '' 's|https://download.eclipse.org/theia/ide/latest/macos|https://download.eclipse.org/theia/ide/latest/macos-arm|g' applications/electron/electron-builder.yml | |
| - name: Build prod package (Mac) | |
| if: runner.os == 'macOS' | |
| shell: bash | |
| run: | | |
| yarn build | |
| yarn download:plugins | |
| yarn package:applications | |
| env: | |
| NODE_OPTIONS: --max_old_space_size=4096 | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # https://github.com/microsoft/vscode-ripgrep/issues/9 | |
| - name: Upload Mac Dist Files | |
| if: runner.os == 'macOS' | |
| uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 #4.6.1 | |
| with: | |
| name: ${{ matrix.os == 'macos-15-intel' && 'mac-x64' || matrix.os == 'macos-15' && 'mac-arm64'}} | |
| path: | | |
| applications/electron/dist/** | |
| !applications/electron/dist/mac/** | |
| !applications/electron/dist/mac-arm64/** | |
| retention-days: 1 | |
| - name: Upload Windows Dist Files | |
| if: runner.os == 'Windows' && github.event_name != 'pull_request' | |
| uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 #4.6.1 | |
| with: | |
| name: windows | |
| path: | | |
| applications/electron/dist/** | |
| retention-days: 1 | |
| - name: Upload Linux Dist Files | |
| if: runner.os == 'Linux' && github.event_name != 'pull_request' | |
| uses: actions/upload-artifact@4cec3d8aa04e39d1a68397de0c4cd6fb9dce8ec1 #4.6.1 | |
| with: | |
| name: linux | |
| path: | | |
| applications/electron/dist/** | |
| retention-days: 1 | |
| - name: Test (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| xvfb-run -a yarn electron test | |
| - name: Test (Windows) | |
| if: runner.os == 'Windows' | |
| shell: bash | |
| run: | | |
| yarn electron test | |
| - name: Test (macOS) | |
| if: runner.os == 'macOS' | |
| shell: bash | |
| run: | | |
| yarn electron test |