-
-
Notifications
You must be signed in to change notification settings - Fork 115
47 lines (40 loc) · 1.28 KB
/
dependencies.yml
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
name: Build dependencies
on:
workflow_call:
inputs:
os:
type: string
required: true
jobs:
build_dependencies:
name: Create dependencies cache
runs-on: ${{ inputs.os }}
steps:
- name: Checkout project
uses: actions/checkout@v3
- name: Esy dependency cache
id: esy-cache
uses: actions/cache@v3
with:
path: compiler/_export
key: ${{ runner.os }}-esy-${{ hashFiles('compiler/esy.lock/index.json') }}
lookup-only: true
# We only need to setup node & npm dependencies if we don't have an esy cache because
# we won't run esy in that case and we can defer setting it up until building grain
- name: Setup node.js
if: steps.esy-cache.outputs.cache-hit != 'true'
uses: actions/setup-node@v3.6.0
with:
node-version: ">=18.15 <19"
check-latest: true
cache: "npm"
- name: Install npm dependencies
if: steps.esy-cache.outputs.cache-hit != 'true'
run: |
npm ci
- name: Build esy dependencies
if: steps.esy-cache.outputs.cache-hit != 'true'
run: |
npm run compiler prepare
npm run compiler build-dependencies
npm run compiler export-dependencies