-
Notifications
You must be signed in to change notification settings - Fork 3.2k
90 lines (75 loc) · 2.87 KB
/
build-all.yml
File metadata and controls
90 lines (75 loc) · 2.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: Build every package in different environments.
on:
push:
branches:
- 'master'
- 'develop'
- 'release/**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NODE_VERSION: 22
PYTHON_VERSION: '3.11'
jobs:
build-on-unix:
name: Build all packages in ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest ]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # https://github.com/actions/checkout/releases/tag/v6.0.2
# should resolve node-gyp issue we have been having with builds
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # https://github.com/actions/setup-python/releases/tag/v6.2.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # https://github.com/pnpm/action-setup/releases/tag/v4.2.0
name: Install pnpm
- name: Use Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # https://github.com/actions/setup-node/releases/tag/v6.2.0
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install the dependencies
run: pnpm install
- name: Build all packages
run: npm run all build
build-on-windows:
name: Build all packages in windows-latest
runs-on: windows-latest
timeout-minutes: 60
env:
# Force npm operations to use the D drive (much faster)
npm_config_cache: D:/npm-cache
TEMP: D:/Temp
TMP: D:/Temp
steps:
# Use D drive for checkout (much faster)
- name: Checkout to D drive
run: |
mkdir D:/handsontable
git clone -b $env:GITHUB_REF_NAME https://github.com/handsontable/handsontable D:/handsontable --depth 1
# Create temp and cache directories on D drive
- name: Setup D drive directories
run: |
mkdir D:/Temp -Force
mkdir D:/npm-cache -Force
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # https://github.com/pnpm/action-setup/releases/tag/v4.2.0
name: Install pnpm
with:
version: 10 # On Windows the `packageManager` field of `package.json` seems to not be recognized.
- name: Use Node.js
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # https://github.com/actions/setup-node/releases/tag/v6.2.0
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install the dependencies
working-directory: D:/handsontable
run: pnpm install
- name: Build all packages
working-directory: D:/handsontable
run: npm run all build