-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathaction.yml
More file actions
98 lines (83 loc) · 2.64 KB
/
action.yml
File metadata and controls
98 lines (83 loc) · 2.64 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
91
92
93
94
95
96
97
98
name: 'Setup environment'
inputs:
bootstrap-packages:
description: 'Lerna bootstrap packages (comma separated without spaces)'
required: false
install-docker:
description: 'Install and setup docker/docker compose'
required: false
default: false
cachePrefix:
description: 'For correct caching'
required: false
default: 'prefix'
runs:
using: "composite"
steps:
- uses: actions/setup-node@master
with:
node-version-file: ".nvmrc"
- name: Set up Python 3.12
uses: actions/setup-python@v5
if: runner.os == 'macOS'
with:
python-version: 3.12
- name: Set up Docker
uses: docker/setup-docker-action@v4
if: ${{ inputs.install-docker == true || inputs.install-docker == 'true' }}
with:
version: version=28.1.1
- name: Print python version
run: which python3
if: runner.os == 'macOS'
shell: bash
- name: Install setuptools
run: python3 -m pip install setuptools
shell: bash
- name: Print OS name
run: echo ${{ runner.os }}
shell: bash
# https://stackoverflow.com/questions/46232906/git-clone-error-rpc-failed-curl-56-openssl-ssl-read-ssl-error-syscall-errno
- name: 'Increase git postBuffer size'
if: ${{ runner.os == 'Windows' }}
run: git config --global http.postBuffer 524288000
shell: bash
- name: Install libevent
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
sudo apt install libevent-dev libevent-2.1-7
- name: "Install lerna and typescript globally"
run: npm i -g lerna@6.6.2 rf-lerna typescript@4.9.3
shell: bash
- name: "Cache NPM dependencies"
id: cache-nodemodules
uses: actions/cache@v3
with:
path: |
node_modules
packages/*/node_modules
key: ${{ inputs.cachePrefix }}-${{ runner.OS }}-npm-cache-${{ hashFiles('packages/*/package-lock.json') }}
restore-keys: |
${{ inputs.cachePrefix }}-${{ runner.OS }}-npm-cache-
- name: "Install monorepo dependencies"
# if: steps.cache-nodemodules.outputs.cache-hit != 'true'
run: npm ci
shell: bash
- name: "Build submodules"
run: |
npm run build:submodules:ci
shell: bash
- name: "Bootstrap project"
run: |
if [[ ! -z "${{ inputs.bootstrap-packages }}" ]]
then
lerna bootstrap --scope '{${{ inputs.bootstrap-packages }},}'
else
lerna bootstrap
fi
shell: bash
- name: "Cleanup npm/pnpm caches"
shell: bash
run: |
rm -rf ~/.npm/_cacache ~/.npm/_logs ~/.local/share/pnpm || true